Hello,
There are times where we need to instantiate multiple prefabs instantly. Like leaderboard table that has around 100 elements. We usually instantiate them using coroutines like;
IEnumerator InstantiateStuff()
{
foreach(GameObject _gameObject in gameObjects)
{
yield return new WaitForSeconds(0.2f);
Instantiate(_gameObject, transform.parent);
}
}
to prevent the main thread from freezing. But is there a more “proper” way to instantiate objects faster and more efficient way?
Edit: We’re aware of object pooling but due to memory restrictions, we can’t use pooling option efficiently.