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 - BehindTheStone

Pages: 1 2 [3] 4 5 ... 9
31
NGUI 3 Support / Problems with Atlas-Creation
« on: March 07, 2014, 08:47:49 AM »
Hey there.

Today some weird stuff is going on with the Atlas-Creation.

1. Completely empty Scene. Imported latest NGUI Version.
2. Added some Sprites (.PSD Files) to my Project
3. Opened up the Atlas Maker, selected all the Sprites and hit "Create"
4. Hit on "View Sprites" and got this:



Clearly this is not what I want.

And another thing. Sometimes this isn't even working, the results above are the "best" I could achieve today. Almost 50% of the time the Atlas isn't created and I get an MissingReferenceException regarding "Texture2D":

"MissingReferenceException: The object of type 'Texture2D' has been destroyed but you are still trying to access it.
Your script should either check if it is null or you should not destroy the object.
UnityEngine.Texture.get_width ()
UIAtlasMaker.PackTextures (UnityEngine.Texture2D tex, System.Collections.Generic.List`1 sprites) (at Assets/NGUI/Scripts/Editor/UIAtlasMaker.cs:144)
UIAtlasMaker.UpdateTexture (.UIAtlas atlas, System.Collections.Generic.List`1 sprites) (at Assets/NGUI/Scripts/Editor/UIAtlasMaker.cs:531)
UIAtlasMaker.UpdateAtlas (.UIAtlas atlas, System.Collections.Generic.List`1 sprites) (at Assets/NGUI/Scripts/Editor/UIAtlasMaker.cs:646)
UIAtlasMaker.UpdateAtlas (System.Collections.Generic.List`1 textures, Boolean keepSprites) (at Assets/NGUI/Scripts/Editor/UIAtlasMaker.cs:629)
UIAtlasMaker.OnGUI () (at Assets/NGUI/Scripts/Editor/UIAtlasMaker.cs:976)
System.Reflection.MonoMethod.Invoke (System.Object obj, BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) (at /Users/builduser/buildslave/monoAndRuntimeClassLibs/build/mcs/class/corlib/System.Reflection/MonoMethod.cs:222)
"

I also tried to delete and reimport NGUI, but it didn't help at all :/


EDIT_01:

Just tried this on a completely new and empty Project. Same stuff. It's working with weird results or it doesn't and gives me this error.

32
NGUI 3 Support / Re: Label in "Default"-Layer looks weird
« on: February 19, 2014, 05:10:27 PM »
Well, that doesn't get rid of the "problem", does it? When I scale the UIPanel-Object down, let's say to 0.1/0.1/0.1 the Text-Object gets smaller, too, but there will be some labels which have different Widths/Heights because of the size of the signs/speach bubbles/etc.
I can't set the UIPanel-Object in a uniform way to handle all Labels in the Level and I don't want to create for each Label an own UIPanel :/

33
NGUI 3 Support / Re: Label in "Default"-Layer looks weird
« on: February 19, 2014, 02:43:09 PM »
I don't change the scale of the label. It's set to 1/1/1. As said, I only change the dimensions IN the UILabel component, not the Transform.

34
NGUI 3 Support / Label in "Default"-Layer looks weird
« on: February 18, 2014, 11:41:25 AM »
Hey there.

So I wanted to use some Labels outside my UI because nGUI has that neat "ShrinkContent" option I like to use when the language of the game changes. Of course there is text outside the UI like speech bubbles or signs and so on.

1. I made an empty GameObject (Default-Layer) and attached the UIPanel to it
2. Created a Label-Object which immediately was set as child of the Panel, good so far.
3. Writing the text
4. Weird behaviour started when I try to change Dimensions

This is what it looks like when I create it and write something down


And this is what it looks liek when I change the dimensions to something like 8x4



What am I doing wrong?

35
NGUI 3 Support / Re: Can you set a Slider value with UISlider.current.value
« on: February 17, 2014, 04:24:52 AM »
Well, you just could reference the Slider, like this:

  1. UISlider m_slider;
  2.  
  3. void Start()
  4. {
  5. m_slider = GetComponent<UISlider>();
  6.  
  7. m_slider.value = 0.5f;
  8. }

36
NGUI 3 Support / Re: Progresss bar at zero still shows sprite
« on: February 12, 2014, 04:24:15 AM »
Well, you could do it by code.
Something like this

  1. if(bar.value <= 0)
  2. {
  3.    // deactivate sprite
  4. }

37
NGUI 3 Support / Re: A suggestion
« on: February 07, 2014, 12:29:17 PM »
Don't get your point, sandolkakos. Why shouldn't people who use nGUI for serious projects show their UI made with nGUI?

38
NGUI 3 Support / Re: PlayStation Vita
« on: January 30, 2014, 03:14:03 PM »
No, but keep us posted :D

39
NGUI 3 Support / Re: NGUI Image Button Issue
« on: January 30, 2014, 12:47:47 AM »
Yes, it does.

But I found actually a work-around for my problem. In the attached ImageButton-Script the "Disabled"-State is empty. As said above I wanted to use the "Disabled"-Behaviour of the UIButton-Script.
But I tried this: in the Disabled-State I selected the same Sprite from the "Normal" and "Hover"-State -> that way everything works and no weird "bugs" with the atlas. With both Scripts attached the Button changes it's color when disabled (UIButton-Script) and displays the correct sprite (same as in "Normal").

40
NGUI 3 Support / Re: NGUI Image Button Issue
« on: January 29, 2014, 01:48:27 PM »
Yep, I have the same issue on the latest version. I can't tell when it happens, it's happening sometimes and sometimes not.
My Button has the UIButton and the UIImageButton-Scripts attached. I use the ImageButton for changing the normal and pressed state and the UIButton for disabling the button.
When the Button is hit it is disabled, after some time it's enabled again. Maybe that's the reason? The change from pressed to disabled is too fast?

(Also double-checked "Normal"-State. I removed the sprite from the atlas and added it again. Still happens.)

41
NGUI 3 Support / Using NGUI-Components in a different layer?
« on: January 27, 2014, 01:52:19 PM »
Hey there,

(Using the latest NGUI Version)

In older Versions, like NGUI 2.X, it was possible to use the components on empty GameObjects in different layers and not the specific created Layer for the UI.

Now, when I create an empty GameObject and attach any NGUI-Component it automatically is made a child of my UIRoot and changes immediately the Layer from Default to my GUI-Layer.
I would like to use some Components from NGUI IN my Default-Layer like the Label-Component to write some Text in the Level.

A nice solution to this?

42
NGUI 3 Support / Re: Setting up a basic ScrollView
« on: January 25, 2014, 12:10:31 PM »
Your GUI and everything displayed on your GUI have to be on a complete different Layer. Don't forget to uncheck that Layer from your MainCamera aswell!

43
NGUI 3 Support / Re: Huge Framerate-Drop when Menu Shows up
« on: January 25, 2014, 10:47:48 AM »
Ha, I tried that now. Made the Book a child of a panel and tweened the panel back down and up.
The result on the iPhone 4:

the FPS do still drop, but from 60FPS to 55FPS and stays between 55-60FPS.

So~~~why is that? Where is the big difference tweening a single Sprite with Sprite/Label-Children and tweening a single Panel with Sprite/Label-Children :D ?

44
NGUI 3 Support / Re: Huge Framerate-Drop when Menu Shows up
« on: January 25, 2014, 10:22:36 AM »
I don't have Unity Pro, I'm afraid.
And even when I had Pro: how am I supposed to get the slowdown when it only happens on iPhone 4?

I'm tweening the Widgets, yes. But only the Book, which is a UISprite. All the other stuff displayed on the book are children of these UISprite.
To be honest, there are only three panels in the UI:
- UIRoot
- the Questmenu
- the Diarymenu

the two last ones are within the Book.
Should I make a Hierarchy like this:

[...]
- Panel
  - Book
    - other Menus

and then tween the Panel? Would that make such a difference?

45
NGUI 3 Support / Huge Framerate-Drop when Menu Shows up
« on: January 25, 2014, 09:37:24 AM »
Hey there.

(Using latest NGUI Version)

Currently I'm working on optimizing the UI (refering to this topic here: http://www.tasharen.com/forum/index.php?topic=7763.0)
I experienced something else: when the Menu shows up (using HOTween to Tween the Menu down from above), I get for some frames a significant FPS-Drop from 60FPS to around 45FPS, then when the Tween is over (1 sec), it goes to 55FPS and stays at 55FPS
I already tried the NGUI-Tweens, same results.
This only happens on my iPhone 4. Tried same stuff (HOTween and NGUI Tweens) on my iPad mini. That thing doesn't give a damn and stays at 60 FPS.


I recreated the GUI in a whole new blank Project with only NGUI and HOTween imported. Only a blank scene, just the UI. Same results on both devices.

Here are some informations about the Atlas:

- it's a 2048x2048 Texture and holds all Sprites (Buttons, the Font, normal Sprites)
-> the smallest sprite is around 80x81 and the biggest one is 848x631
- Of course I only get two Drawcalls (Main Camera and UI Camera with the NGUI Atlas)

Here's a video in action in the Unity-Editor (don't mind the messy display of Sprites, only for testing purposes):

https://www.dropbox.com/s/xucsxffuc43m3lz/NGUI.mp4

In the Editor it works fine, of course.

Is there something I can do to optimize it on iPhone 4?


Pages: 1 2 [3] 4 5 ... 9