- Home /
can i use addressables.instantiateasync when LoadSceneAsync ?
link texti have a simple project.just two scene and one prefab. i want LoadSceneAsync with additive mode and instantiateasync the prefab same time. it is work fine on "Use Asset Database" mode. but when i change the play mode to "Use Existing build" mode.(i had build the content already) i can see the scene has be loaded in hierarchy view , but not the prefab.
Where is the mistake? is it a bug?
void Update()
{
if (Input.GetKeyDown("space"))
{
LoadScene();
LoadPrefab("item_0");
}
}
async Task LoadScene()
{
var t = Addressables.LoadSceneAsync("Temp", UnityEngine.SceneManagement.LoadSceneMode.Additive, false,1);
await t.Task;
}
async Task LoadPrefab(string name)
{
var t = Addressables.InstantiateAsync(name, transform);
await t.Task;
}
unity version is 2020.2.3 . addressable is 1.16.16. i have post the project here. click "space" key after game start.
Your answer
Follow this Question
Related Questions
Getting A Redirected URL 1 Answer
questions about addressables 0 Answers
Looking for Guidance re: Remote-Hosted Addressables 1 Answer
Download an Addressable bundle in background for iOS 0 Answers
Addressables Unknown Assembly Error 2 Answers