Forum rules - please read before posting.

playerMenus.RebuildMenus() Warning in Unity 5.5.0f3

edited December 2016 in Technical Q&A
Hi, just reporting I've been getting a warning when I call:
 
AC.KickStarter.playerMenus.RebuildMenus()

The error is as follows:

Destroying assets is not permitted to avoid data loss.
If you really want to remove an asset use DestroyImmediate (theObject, true);
UnityEngine.Object:Destroy(Object)
AC.PlayerMenus:RebuildMenus(MenuManager) (at Assets/AdventureCreator/Scripts/Controls/PlayerMenus.cs:108)

Clunia.<Init>c__Iterator0:MoveNext() (at Assets/CustomScripts/AC VR/Plugins/UI/General/ReInitMenus.cs:17)

UnityEngine.SetupCoroutine:InvokeMoveNext(IEnumerator, IntPtr) 

Note that all I'm doing in that (ReInitMenus) script is call RebuildMenus (line 17), and the code line still seems to take effect properly. But it always throws that error. Anyway,I didn't get this warning when I was using unity 5.4. (Also note that I'm using a coroutine with a .2f delay to run the code, so that I can call it from OnEnable)

Comments

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.