Addressables-Sample
Addressables-Sample copied to clipboard
WaitForCompletion() not working?
`[ServerRpc] private void ServerSpawnPlayer() { GameObject playerPrefab = Addressables.LoadAssetAsync<GameObject>("Player").WaitForCompletion();
GameObject playerInstance = Instantiate(playerPrefab);
Spawn(playerInstance, Owner);
}`
why is this line red? "Addressables.LoadAssetAsync<GameObject>("Player")"
please do not suggest me the link below because ı wrote same thing on the linked example, everything is the same, nothing changes !. I use 2021.1.6f1 version. Please fix the bug as soon as possible.
https://docs.unity3d.com/Packages/[email protected]/manual/SynchronousAddressables.html#api
As far as I understand, the version of Addressables used in this sample project is not updated to the latest Addressables version. Therefore, it simply doesn't have the WaitForCompletion method available. I tried updating the Addressables version to the latest, and my editor picked up the WaitForCompletion method on the handle.
(This comes with other issues though, I got seemingly unfixable Library compile errors as a consequence)