Forum rules - please read before posting.

Add scene issue

When I use Action:Add scene to load  a subscene,it runs smoothly at the first time.But after that,every time when this scene added,the program was stuck for a short time.I traced the codes and found in below


Object[] prefabAssets = Resources.LoadAll ("SaveableData/Prefabs", typeof (GameObject));
if (prefabAssets == null || prefabAssets.Length == 0)
{
=====>prefabAssets = Resources.LoadAll ("", typeof (GameObject));
}

prefabAssets = Resources.LoadAll ("", typeof (GameObject));
I'm sure this line caused this problem.

How to resolve this problem?Thanks.

Comments

  • See the "Performance and optimisation" chapter of the Manual, specifically the end of point 2.

    Basically, you want to move any Resources files required by save games into subfolders.  If you have none for a given type, create a "dummy" prefab folder with a dummy asset inside it.
  • I create a folder "SaveableData/Prefabs" inside Resources and create an empty GameObject,now my game runs normally,thank you.
Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Welcome to the official forum for Adventure Creator.