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

Pages: 1 [2]
16
NGUI 3 Support / Re: NGUI using custom mouse position
« on: May 24, 2012, 07:45:48 AM »
oh yeah, I can surely change NGUI code, but that is what I want absolutely to avoid.

17
NGUI 3 Support / NGUI using custom mouse position
« on: May 24, 2012, 07:00:15 AM »
Hi,

NGUI camera code uses directly Input.MousePosition to get the mouse position, but what should I do if the cursor position is instead managed by the application?

Let's say I use Screen.lockCursor  and use the delta values to manage the mouse coord on my own. What do you suggest me to use? Thank you very much

18
NGUI 3 Support / Re: Bugs
« on: May 23, 2012, 10:58:51 AM »
Apologize, it looks like the problem was related to the use of a destructor in one class completed unrelated to NGUI. Craaazy.
The bare scene was not working because I was using a GameObject created from a Prefab. Even though the new GameObject was reduced to the bare minimum, it was still importing the original prefab code. This is something incredible I need to check with the Unity Devs.

19
NGUI 3 Support / Re: Bugs
« on: May 23, 2012, 09:56:02 AM »
Ok I need to put this investigation on hold until the begin of the next sprint, since I noticed we actually changed some NGUI files, so I cannot prove it is NGUI itself. I will ask to revert those files to the original ones and test again.

20
NGUI 3 Support / Re: Bugs
« on: May 23, 2012, 08:45:38 AM »
it could be, but there are 2 things to take in account.

I do not use multithread
The current setup uses only NGUI classes with no custom code (it is a testing scene)

Edit: I will ask if I can share the project

21
NGUI 3 Support / Bugs
« on: May 23, 2012, 06:16:46 AM »
I finally tracked down two bugs in my project that seem to be related to NGUI code.
With a very simple setup with a Camera a Panel and some Sprites I get:

Several "CompareBaseObjects  can only be called from the main thread." messages with the following extra info:
Constructors and field initializers will be executed from the loading thread when loading a scene.
Don't use this function in the constructor or field initializers, instead move initialization code to the Awake or Start function.

and "Scene is being destroyed while there are hidden renderers that are using it. This is likely an editor script creating objects with hideFlags and leaving them enabled."

when I stop the execution.

Edit: using 2.0.7
The first problem seems more serious. Thank you for your attention.

22
NGUI 3 Support / Re: Data Binding
« on: May 03, 2012, 09:24:08 AM »
thank you, I will check it out!

23
NGUI 3 Support / Data Binding
« on: May 03, 2012, 09:15:02 AM »
Just wondering if you ever thought to implement a data binding system into NGUI.

24
NGUI 3 Support / Re: 3D UI with multiple panel
« on: May 02, 2012, 12:07:53 PM »
with our solution we already use 2 panels and 1 atlas (as far as I got the UITexture does not need UIPanel)

25
NGUI 3 Support / Re: 3D UI with multiple panel
« on: May 02, 2012, 11:57:55 AM »
This shader tags thing is quite interesting, although it looks less convenient the using different cameras. This is due to how our GUI is setup. In fact the GUI layers are made in such a way that the background (first layer) uses the atlas texture, the second layer is made by several UITexture loading dynamic images, but the third layer is again using the Atlas. If we change the shaders, we need to maintain 2 atlas. Am I correct?

26
NGUI 3 Support / 3D UI with multiple panel
« on: May 02, 2012, 11:28:17 AM »
From the FAQ I can read:

"For 3D UIs, however, turning the window even slightly completely changes the distance to the widgets, and makes this approach completely unsuitable. This is why "Depth" was invented: it's a fixed value that stays constant, regardless of the transform. Unfortunately there is no way to make different draw calls respect this value (different panel / atlas = different draw call), so with multiple atlases or panels, Z still needs to be used."

We are having exactly the problem described. We have a panel which has some UI textures that cannot use the main atlas but must load dynamic images. This panel is a 3D panel and as expected NGUI is not able to sort properly the large background and the smaller UI textures on top of it. The result is that the UI textures which are closer are above the main panel, but the UI textures that are further than the centre of the panel will be behind it (due to the perspective point of view).

We have 2 way to resolve the problem. The first is to render the entire panel with a 2D camera on a rendertexture and the use the texture in a big UITexture.

The second one is to use different UIPanel and different Cameras, disabling zbuffer and render the cameras in the correct order.

I would like to know if you have more insights on the issue. Thanks

Pages: 1 [2]