Is there a way to do it? I need to have a reference of the object Instantiated with addressables to change it’s properties.
This is an example instantiated direct from prefab (that way I can easily have the reference and do some changes) :
for(int i = 0; i < pool.size; i++)
{
//GameObject obj = Instantiate(pool.prefab);
var obj = Addressables.InstantiateAsync(pool.tag);
obj.SetActive(false);
objectPool.Enqueue(obj);
}
I need to do the same but with Addressables (Something like this):
for(int i = 0; i < pool.size; i++)
{
GameObject obj = Addressables.InstantiateAsync(pool.tag);
obj.SetActive(false);
objectPool.Enqueue(obj);
}