Potential import errors

  • [pre][/pre]Hello, I just downloaded the tower defense asset and imported into Unity and things have gone wrong in a hurry. I followed the directions from the youtube video and updated for Unity 4. I already had the NGUI pro version, so I skipped that part of it. When I opened the 'menu' scene and started following along with the PDF, everything seemed like it was working, but when I clicked 'play' just to make sure, I got the message "All compiler errors must be fixed before you can enter play mode" and the message at the bottom of the window was "Quaternion is invalid (0.595269, 0.011152, -0.036220, 0.844793) length=1.069456". This error message appeared on all the scenes, not just 'menu'. So I quit Unity and then re-opened it hoping that there was just some minor error that would disappear, but now things are worse. All of the menus have disappeared from the scenes. I did not delete them. I've described everything I've done and at no point did I hit delete. They're just gone. Their info still shows up in the inspector and the project. I have no idea what is going on. I'm running the latest version of Unity and newest NGUI on a Macbook OSX 10.8.4. Please help.

  • Hi Joshua,

    I think it would be better to delete and reimport all assets again, as I don't know what could possibly went wrong in this process. Please make sure to import them in the correct order as seen in the video. If you experience any errors (red sign), please let me know.

  • I am having the exact same errors as the above user. Started a whole new project, imported in order, followed all instructions. Restarted Unity , reimported everything. Have done this several times with same "compiler errors" and will not run. Any ideas on this ?

  • ok found a RED warning - assets/3d tower defense starter kit/scripts/gui/guiimpl.cs(195,26):error cs1501:no overload for method 'raycast' takes '2' arguments

    So what do i need to change in this line of code to fix that ?
    if (UICamera.Raycast(UICamera.lastTouchPosition, out hit))

  • *So what do i need to change in this line of code to fix that ?
    if (UICamera.Raycast(UICamera.lastTouchPosition, out hit))

    Thanks for letting me know. It seems that in the recent version of NGUI, this method does only accept one argument. This line should be:

    if (UICamera.Raycast(UICamera.lastTouchPosition))

    You can ignore the other yellow warnings for now.

  • That fixed it right up, thank you so much !!!!  :)

  • Hey, I just started having trouble when I started up too. But I have this error in the file: "GUIImpl.cs"

    And the error is

    public UIFilledSprite relSprite;

    Could anyone please help me with this?

  • Hi Zekodon,

    it looks like you are using a very old version. UIFilledSprite has been removed in NGUI a while ago, and the most recent version of our tower defense kit does not use NGUI at all.

    Please either download the newest version 1.7 in combination with Unity 4.6 beta 20 UI, or send me an email with your invoice no. to receive the most recent NGUI-compatible version, 1.6a.

  • :) Thank you! I  must have lost track of an update.

    It works now! ;D

Log in to reply