Author Topic: Trying to adapt a NGUI script  (Read 5492 times)

sicga123

  • Guest
Trying to adapt a NGUI script
« on: February 22, 2013, 02:30:13 PM »
Hi

First off I'd just like to say that I don't normally use C# and have no idea about the underlying framework. However, I am trying to alter one of the NGUI Inventory example scripts. Basically I am trying to alter the DragDropSurface script.

I simply wanted to add 'public string mytagName;'  to the script. I thought this would show up in the inspector, however it doesn't. I'm wondering whether I am missing something in regard to Unity because even commenting out a public bool that is already there does nor alter the script in the inspector for a hame object it is attached to i.e. that variable check box still shows even after commenting out. Am I missing something basic I should be doing and that I should really know about. I don't know whether this point is if any relevance but so that I can use unityscript with NGUI I followed the instructions and put all the relevant folders into a Plugins/NGUI  folder.  Any assistance would be greatly appreciated.

subliminalman

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 4
    • View Profile
Re: Trying to adapt a NGUI script
« Reply #1 on: February 22, 2013, 02:45:39 PM »
You have it right. Unity has to build and parse the code though so sometimes there is a lag when adding new attributes.   :D

sicga123

  • Guest
Re: Trying to adapt a NGUI script
« Reply #2 on: February 23, 2013, 04:07:52 AM »
@subliminalman

I thought that and waited for some time to no avail. I'll go back and give it another go. It's good to know that it's not something I'm doing, I don't actually use C# but there's nothing difficult about copying a code already there and changing a variable name, so it seems all a bit weird. Bloody Unity.