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

Pages: [1]
1
NGUI 3 Support / 2.5D GUI?
« on: April 16, 2014, 06:33:23 AM »
Hey Tasharen,
first thank you for all the effort on this forum and creating the tools ;)

Maybe I missed something but I haven't seen such an example anywhere so I am just asking.
How can I achieve a GUI which draws Icons in 3D space but which always have the same scale on screen?
So if I make a 3D GUI then the widgets are static for sure and do not "look at" the camera.

I did this in the past with simple sprites and could use the same methods to orient and scale the widgets according to the camera, but I just ask if there already is a function for that in NGUI.

Like this one:

2
NGUI 3 Support / Re: [3.5.6] Culling issue? Elements are hidden
« on: April 13, 2014, 04:28:27 PM »
There are only two other reasons why things wouldn't be visible.

1. Panel is clipped and you scaled it non-uniformly. Bad things may happen.
2. The widget was re-parented at some point at run-time and you didn't inform it by using NGUITools.MarkParentAsChanged.

Nothing of those is true here.
I solved the issue by disabling/enabling the panel instead of the gameobject. It makes no difference for me at the moment.

3
NGUI 3 Support / Re: [3.5.6] Culling issue? Elements are hidden
« on: April 12, 2014, 11:24:52 AM »
What do you mean the root object is a panel or a widget? The two are completely different components. Panel draws widgets. Widget is drawn by a parent panel. If there is both a widget and a panel on the same object, expect bad things to happen.
Currently it is a panel. It was a widget before for some reason so I changed it to see if it made a difference.

Also, not quite clear what you mean by culling in this case. Culling can be many things. Back face culling, occlusion culling, depth culling (more commonly known as a Z-test), etc.
That is the problem, I have no clue what it is. It just is the case that the widgets like Label, Progressbar and so on are not drawn in some cases.
On the image in the blue box there is a green progress bar and a text on the left "Happy:" which is not visible (no wireframe of the text mesh and so but active in the inspector). If I deactivate the prograss bar object (one of your controll prefabs) it gets visible.
Also the frames of two of the progress bars seems to be hidden by the "overlay" object.
What is drawn and what not is different by each start. Settings like depth, Z-value makes no difference at all.

Pretty important, this only occurs when I do gameobject.SetActive(true) of the selected parent object. When I activate it in the inspector during playmode by hand it does look fine.

4
NGUI 3 Support / [3.5.6] Culling issue? Elements are hidden
« on: April 11, 2014, 03:18:46 AM »
Hello, I have a strange problem.

I have a Root Object which is a Panel or a Widget (doesn't make a difference) which is selected in the image.
As you can see on the box on the right this is how it looks like in the editor and when the game starts regularly.

Then there is the box marked with blue and this is how it looks like if I use gameobject.SetActive(true) on the selected object.
When I enable it by hand (in the inspector) on untime it works always fine.

If more information is needed I will post it, but I wonder if I did something wrong or if that is a known issue.

My idea is there is something wrong with sorting or culling (does that even work with NGUI?). All the objects are there. If I disable a progress bar for instance the text on the left which is occluded by it is drawn.
As I upgraded to 3.5.6 the background is shown, so it does not have to do with any depth or Z value I belive.

5
NGUI 3 Support / Anchor features and problems
« on: October 27, 2013, 10:04:12 AM »
Hello

With our latest update of NGUI (3.0.2) I faced a problem with the Anchor. If I set the Container to an Object which is a children of another object it mostly causes false results which didn't occur before. The coordinates are very wrong and often out of the screen.
It only works fine if I attach an Object of the same hirachy level or the root object. The problem is, I don't want that to happen because this object may does not have the desired boundaries as illustrated in the third image.

I know this is may not clear enough so I illustrated the desired effect and may you can tell me how to achieve it and if I am doing something wrong.



The next thing I just put in here. It is good that you added an absolute or pixel offset because I did this by myself. Another thing that I've added was a padding, which looked like this, may you want to add this, too?

  1.     public float Padding = 0;
  2.  
  3. if (side != Side.Center)
  4.                 {
  5.             if (side == Side.Right || side == Side.TopRight || side == Side.BottomRight) v.x = mRect.xMax - Padding;
  6.                         else if (side == Side.Top || side == Side.Center || side == Side.Bottom) v.x = cx;
  7.             else v.x = mRect.xMin + Padding;
  8.  
  9.             if (side == Side.Top || side == Side.TopRight || side == Side.TopLeft) v.y = mRect.yMax - Padding;
  10.                         else if (side == Side.Left || side == Side.Center || side == Side.Right) v.y = cy;
  11.             else v.y = mRect.yMin + Padding;
  12.                 }

It offsets the object depending on the anchor point settings. Anyhow, the problem described above occurs wih an unedited Anchor-Script.

Pages: [1]