Actually I just now tried renaming the superfluous copy of EditorGUIUtility, and I got the same error with InvDatabaseInspector.
Starting a new scene doesn't seem to help. Is there a particular directory in the project these files need to reside in, or something?
The other Asset Store content I'm using is Ultimate FPS Camera by VisionPunk. I don't know where that developer may have left remnants of his copy of NGUI, so I don't know how to uninstall it.
Okay, I just created a new project and I still got those errors. Deleting one makes the other work. Unfortunately, I need both.
Is the problem caused by the fact that there's more than one folder named Editor? If I move all the scripts into the same Editor folder, and delete the extra one, will it start working? This page seems to suggest that that's not how it works. But I can't think of any other reason why the scripts would be preventing each other from compiling.
Any thoughts? NGUI and Ultimate FPS Camera are both pretty popular. I'd be amazed if I were the first person to try using them both in the same project!
EditorGUIUtility is a Unity class. It sounds like you should delete the file altogether.
Thanks for the tip about using UICamera's Event Receiver Mask. That certainly did the trick.
Just bought and imported the newest NGUI version (1.91) into Unity 3.5 and am getting the following compilation errors:
- Assets/NGUI/Scripts/Editor/BMFontReader.cs(47,34): error CS0433: The imported type `BMFont' is defined multiple times
- Assets/NGUI/Scripts/Editor/UIWidgetInspector.cs(16,19): error CS0433: The imported type `UIWidget' is defined multiple times
In addition to my comment above, I noticed that the NGUI toolbar menu at the top of the Unity Editor is no longer there. Just incase it servers any purpose to know, I upgraded from the Free version by just importing on top of it.
@Zemnoph7: You can't just import on top of it. The readme file has instructions on how to do it properly. You need to delete the free version before importing the full version.
Ah of course, thank you works great now. Just another quick question, just want to get your opinion I guess, what are your thoughts about using NGUI for all inputs in the game? I know its possible, but would there be some drawbacks to say putting all game objects in the GUI draw layer and handling all input through NGUI?
Gah sorry one more question. I'm playing around with the Popup Menu and it appears that if I have 2 of them in the scene and they are placed one over the other, if either ones popup background part expands over the other one, the Labels of the other one are still shown through the background of the expanded one. Doesn't matter if they are in different panels or completely different depths / z values. The labels always display through. Am I just missing something with depths here? btw working with a 3D gui
You should use NGUI for all UI-related input, but when it comes to input in regards to controlling your character you will still want to rely on the Unity's Input class.
As for the popup -- are you using one atlas here? Make sure the depth value on the widgets of one popup matches the depth values of another.
Hi Aren, I have 2 doubts. Always when adding a Sprite, the size of the newly created sprite respects the aspect ratio of the image I chose. After that, I may scale it to fit in a window or something, but I don't mess with the proportions. But when adding buttons, the newly generated buttons do not respect the original image, making me resize them aproximately.
Is there a way to avoid this? To make the button's dimension same as the image selected for it?
And escondly and more important, how do I access to a input label value? I tried declaring the LABEL (Not the container nor background) as a GameObject and trying to acces myObject.Text but that doesn't work. The value is null.
How can I do this?
Thanks very much!
Buttons use sliced sprites -- it's a different type of a widget. You aren't limited to what the Widget Tool has in store. Just create your own sprite with the background for your button, then add some text on top and voila, your new custom button. Just don't forget to add a collider.
Perfectly, will do that with my next buttons.
And I couldn't follow you on the UllInput.text, how can I access it? Currently my setup is as follows.
The 2 GameObjects point to a object with the UiLabel script.
I was playing with the trial version of NGUI this weekend and then purchased the full version today. When I went to create a progress bar on the full version, I noticed that Number Of Steps variable is now a slider and maxes out at 11. In the trial version I was able to input any number I wanted into this field to create as smooth of a progress bar as I wanted. Is there a way around this?