Author Topic: Problem with UnityScript  (Read 3648 times)

Scellow

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 3
    • View Profile
Problem with UnityScript
« on: January 20, 2014, 11:13:17 AM »
Hi,
I followed the F.A.Q. to make NGUI to work with US but i still get an error


  1. --NGUI
  2. -----Examples
  3. -----Plugins
  4. --------NGUI
  5. -----------Interaction
  6. -----------Internal
  7. -----------Tweening
  8. -----------UI
  9. -----Ressources
  10. -----Scripts
  11. --------Editor

  1. Assets/Test/Scripts/Gui/NGUI_List_Save_Button.js(37,21): BCE0005: Unknown identifier: 'NGUITools'.
  2.  

  1. #pragma strict
  2. var slotButton : GameObject;
  3. var playerManager : PlayerManager;
  4.  
  5.  
  6. function Awake()
  7. {
  8.         playerManager = GetComponent(PlayerManager);
  9. }
  10.  
  11. function Start()
  12. {
  13.  
  14.         CreateButton();
  15.  
  16. }
  17.  
  18. function Update()
  19. {
  20.  
  21. }
  22.  
  23.  
  24. function CreateButton()
  25. {
  26.         for (var i=0; i<playerManager.saveHolder.Count;i++)
  27.         {
  28.                 var parent : GameObject;
  29.                 var child : GameObject;
  30.  
  31.             parent = GameObject.Find("Panel_Button");
  32.             child = NGUITools.AddChild(parent,slotButton);
  33.             child.transform.localPosition = new Vector3( 0+i*60 , 0 );
  34.  
  35.         }
  36. }
  37.  


ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: Problem with UnityScript
« Reply #1 on: January 21, 2014, 02:00:26 AM »
The "Plugins" folder should be outside the "NGUI" folder.

Scellow

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 3
    • View Profile
Re: Problem with UnityScript
« Reply #2 on: January 21, 2014, 07:57:06 AM »
The "Plugins" folder should be outside the "NGUI" folder.

Oh thanks a lot! I don't know why i missed this lol
Thanks a lot for NGUI the best Unity plugin!