I am getting an error message in Xcode that I think is happening because Unity is unloading unused assets because they aren’t in the scene. The issue is that enemy prefabs are instantiated in waves throughout the level, and I think they are getting unloaded before they are instantiated. I read about DontDestroyOnLoad, but the prefabs needed are not in the scene on load anyways, so I don’t think that will help? A lot of the prefabs are in every level, so maybe it could help? Either way, is there a way to prevent unity from unloading these prefabs so that I can instantiate them in the scene safely? Or should I use Resource.Load when I Instantiate instead of the standard way in the doc? This post is related to a previous post I have, if you feel like reading deeper about the issue the link is below. Thanks guys!
create a pool and initialize all your objects at the beginning of the scene. there will be references so you wont get this message and you’ll get better performance later in your level when you actually want to create them.