Tasharen Entertainment Forum

Support => NGUI 3 Support => Topic started by: spooky on June 10, 2014, 11:39:57 AM

Title: Bugs in NGUITools
Post by: spooky on June 10, 2014, 11:39:57 AM
When using NGUITools.AddChild(); the project will not successfully build, because the '#if UNITY_EDITOR' is missing from before 'Unity.Undo.RegisterCreatedObjectUndo()' in one of the variations of the function. I fixed it, so now I'm unable to find where.

Also, when using Web Player, NGUITools produces a mysterious error during runtime if the Prefab Toolbar is open. Commenting out 'comp.SendMessage(funcName, SendMessageOptions.DontRequireReceiver);' stops the error, but prevents NGUI from rendering prefab icons. Closing the toolbar also prevents the error.
Title: Re: Bugs in NGUITools
Post by: ArenMook on June 11, 2014, 04:29:04 AM
Be sure to grab the latest version. The #if UNITY_EDITOR should already be there.

As for the second issue, I'm guessing it happens in the editor only? You can likely fix it by replacing the #if statement above that line with this:
  1. #if !UNITY_EDITOR && (UNITY_WEBPLAYER || UNITY_FLASH || UNITY_METRO || UNITY_WP8)