Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - Tiles

Pages: [1] 2 3
1
Have that undo rascal too. I was wrong, you provided the solution already. I was just too blind to read it. I´ve had a look at the 3.x code now to compare what is different. And have used that code snippets from the 3.x code to fix the 2.7 code then.

Problems solved. Warnings are gone. Thanks for help :)

2
Okay, seems that i got at least the LookLikeControls fixed. I wish there would be an examplecode in the Unity manual ...

Example:

  1.     public override void OnInspectorGUI ()
  2.     {
  3.         //EditorGUIUtility.LookLikeControls(15f);
  4.         EditorGUIUtility.labelWidth=15f;
  5.         EditorGUIUtility.fieldWidth=15f;
  6.  
  7. ...

Great changing Unity, thanks. Now i have two lines where i had just one before ...  ::)

Remains the SceneUndo problem ...

3
Quote
If you can't upgrade to the latest -- which I would strongly advise by the way -- then your only other option is to resolve the errors yourself in a similar fashion. NGUI 2 line has been deprecated and will not be receiving any new updates.

I already tried to update to NGui 3 before, and i failed. The scaling of my font is destroyed with the update. The project is nearly done. It`s not worth the hassle to rebuild my gui just because of a not good working update. It already works.

I don`t want an upgrade for 2.7x. I just want to resolve those two remaining problems. By myself. And as told above, i already have solved quite a few problems with the undo. Unfortunately the advices in the warnings are everything but clear. And i am in trouble with the two remaining cases. So i need a bit help here. That`s why i ask here, at the NGui Support forum.

Honestly, i am a bit disappointed that i cannot get a clear answer how to fix this issues.

Quote
Also, just because it's a red warning, doesn't mean it won't work. ;)

This is not true. Unity moans about conflicts then, and refuses to start the game until the error is fixed.




4
Thanks Nicki, but both options are out of question, unfortunately.

I've upraded to NGui 3.x before, and the scaling of my font was fubar then. That`s no option really for my current project.

And ignoring the warnings means to have lots of disturbing warnings in the console that pops up every time i modify some of my scripts. Other warnings sinks in the masses then, making the search for mistakes very cumbersome.

The warnings says already what to do. I just don`t understand what is meant for the mentioned two cases. The explanations are too vague, the Unity manual is of no help neither. And i haven`t found the right way yet. Every changing leaded to a red warning so far.

5
I`ve updated my project to Unity 4.31 before a few moments. This is the third attempt. Now i get thrown to death with obsolete warnings. Most of them comes from NGui. I´ve tackled most of the Undo.RegisterObject vs RegisterUndo warnings already. But there are some of them left where i am lost. Like this one:

  1. Assets/NGUI/Scripts/Editor/NGUIMenu.cs(99,30): warning CS0618: `UnityEditor.Undo.RegisterSceneUndo(string)' is obsolete: `Use DestroyObjectImmediate, RegisterCreatedObjectUndo or RegisterUndo instead.'

When i replace the Undo.RegisterSceneUndo by RegisterUndo then i get a red warning.

And i get a whole bunch of LookLikeControls warnings where i am absolutely lost with. When i try to change the code as suggested, then i end in red warnings too.

It`s messages like this:

  1. Assets/NGUI/Scripts/Editor/UIScrollBarInspector.cs(14,34): warning CS0618: `UnityEditor.EditorGUIUtility.LookLikeControls(float)' is obsolete: `LookLikeControls and LookLikeInspector modes are deprecated. Use EditorGUIUtility.labelWidth and EditorGUIUtility.fieldWidth to control label and field widths.'
  2.  

What do i need to do here?

6
Thanks :)

I will simply stick with 2.7x for my current project. It`s a little bit too challenging for me. The GUI part is finished and working. So no pressure to upgrade really. I may use version 3.x for further projects then :)

7
Have it. I needed to move the content of the NGUI\Editor folder to Plugins\Editor too. That one`s not documented.

Thanks for help :)

EDIT. The move has unfortunately changed the scaling of my font. Nothing fits anymore. The letters are much too small now. Seems that i have to stay with version 2.7.

8
Thanks ArenMook.

This throws two new errors now though:

  1. Assets/Plugins/Editor/UIFilledSpriteInspector.cs(14,40): error CS0246: The type or namespace name `UISpriteInspector' could not be found. Are you missing a using directive or an assembly refer
  2.  
  3. Assets/Plugins/Editor/UISlicedSpriteInspector.cs(14,40): error CS0246: The type or namespace name `UISpriteInspector' could not be found. Are you missing a using directive or an assembly reference?
  4.  

9
Thanks ArenMook. Yes, i use Javascript :)

UISprite is located in NGUI\Scripts\UI\UISprite.cs

What do i need to do to fix the errors now? Move the whole NGUI folder into Plugins?

10
I try to update my project to the latest NGUI version at the moment. But i have some trouble with that.

First, the update description was not really helpful. I did open a new scene, did delete the NGUI folder, and get nevertheless thrown to death with a thousand warnings then with importing the new NGUI version. I had to delete the NGUI stuff in the Plugins folder too. And i had to install the Upgrade Tools (2.7.0 to 3.X), and move their content to the Plugins folder. Which reduces the number of error messages to three. But now i am stuck.

Where did i something wrong? What do i have to fix here to get rid of the last three warnings? I am happy about any help here :)

  1. Assets/Plugins/Runtime/UIFilledSprite.cs(13,31): error CS0246: The type or namespace name `UISprite' could not be found. Are you missing a using directive or an assembly reference?
  2.  
  3. Assets/Plugins/Runtime/UIInputSaved.cs(12,29): error CS0246: The type or namespace name `UIInput' could not be found. Are you missing a using directive or an assembly reference?
  4.  
  5. Assets/Plugins/Runtime/UISlicedSprite.cs(13,31): error CS0246: The type or namespace name `UISprite' could not be found. Are you missing a using directive or an assembly reference?

11
NGUI 3 Support / Re: Label problem, set text by code offsets the text
« on: August 04, 2013, 02:58:51 AM »
Ha, so simple. Indeed, that was it. You`re a genious. Many thanks :)

12
NGUI 3 Support / Re: Label problem, set text by code offsets the text
« on: August 02, 2013, 03:26:43 AM »
Indeed. Changing the text shouldn`t change the position. That`t why i am so baffled :)

I have made a short video where you can see the problem a bit more clear. The label is selected while that.

1.5 MB: http://www.reinerstilesets.de/ext/unity/textchangingposition_x264.mp4

Just that i have mentioned it. The tween script doesn`t have any influence here. The problem is still there when i remove it.

13
NGUI 3 Support / Label problem, set text by code offsets the text
« on: August 01, 2013, 06:45:18 AM »
I am a bit baffled at the moment. Something i did a few dozen times before makes trouble now. I set the text of the label to another string by code at runtime. And the position of the string changes by that.

It`s a small string that i set to "Press Enter" while a conversation, and at the last paragraph to "Move on"

I have reduced the trouble maker to the text positions. When i use the upper left corner as the center of the text, then everything is fine. When i use the center of the string, then i get an offset when i change the text. I need the center because i scale this string in and out to animate it.

I have solved it by offsetting the text in the first place, and change the string to whatever i need. So that the string is offset in every case. But that`s not really a nice solution.

Is this a known issue? Do you know a better workaround or a fix here?

14
That fixed the issue. Many thanks :)

15
NGUI 3 Support / Update to 2.63 throws a warning about UpdateManager
« on: July 13, 2013, 01:35:59 PM »
Unity 4.15 free. I´ve updated to Ngui 2.63. And get a warning now:

  1. Assets/NGUI/Examples/Scripts/Other/UpdateManager.cs(41,16): warning CS0436: The type `UpdateManager' conflicts with the imported type `UpdateManager'. Ignoring the imported type definition

What do i need to fix this?

Pages: [1] 2 3