Addressables-Sample icon indicating copy to clipboard operation
Addressables-Sample copied to clipboard

WaitForCompletion() not working?

Open ahmetteksas opened this issue 3 years ago • 1 comments

`[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

ahmetteksas avatar May 22 '22 22:05 ahmetteksas

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)

rafaeldolfe avatar Oct 25 '23 07:10 rafaeldolfe