2D Toolkit Forum
2D Toolkit => Support => Topic started by: HIDEO KOJIMA on August 20, 2013, 01:49:40 pm
-
Hi admin and communitication !
I'm using NGUI and 2D Toolkit together for my game. I'm using NGUI for GUI and 2D Toolkit for only animation, sprites...
But I have problems with camera.
* First, i create Camera of NGUI for only GUI :
- I created layer is GUI for element of NGUI.
- Camera' attribute are:
+ Clear Flags : Skybox
+ Culling Mask : GUI
+ Projection : Orthographic
+ Size : 1
+ Depth : 1
* After that: I create an another camera, but it of 2D Toolkit with name is tk2dcamera.
- Camera' attribute are:
+ Clear Flags : Skybox
+ Culling Mask : Everything exception GUI layer.
+ Projection : Orthographic
+ Size : 30
+ Depth : 0
Then, i create sprites collection with size is 30.
But when i play, only show background of NGUI's Camera, and sprites of 2D Toolkit's Camera did not show.
So, How i can show sprite of 2D Toolkit' Camera with GUI of NGUI's Camera together ? Many Thanks
-
Hi,
On the settings for your NGUI camera, try changing the Clear Flags value to 'depth only' to see if that fixes the problem.
Thanks.
-
I did changed Clear Flags value to Depth Only, but nothing change, sprite of 2D Toolkit' camera did not show. :( I did modify with a day, but i can fix it ! :(
-
If you disable your NGUI camera can you see the sprites from the tk2d camera? Can you also post screenshots of how both your cameras are set up?
thanks.
-
When i disable NGUI camera, i will see sprites from 2D Toolkit Camera :(. This is my setup camera. Mixed are Default, Water, Ignore Raycase, TransparentFX.
-
I have tried to recreate the problem using a NGUI camera and a tk2d camera in my environment using the same settings as you have, but both the GUI element and the sprite were drawn as expected.
Can you export a simple copy of your project which shows the problem happening, and send to our support email support@unikronsoftware.com so we can investigate further.
Thanks.
-
I'm using Unity 4.2. So it is problems with me ? What version that you are using ? Thanks.
-
I am also using Unity 4.2
-
Maybe i was created sprites collection wrong, could you give me simply soulution to create correct sprites collection ? Many Thanks
-
If you can see the sprites without the NGUI camera visible, you've clearly got it working. Its obviously something you've got wrong on the NGUI camera that draws after that.
As gary said, send a repro case to support at unikronsoftware.com if you'd like us to look at it.
-
I did find problems, if i'm using both camera, then sprite will draw behind bacground of NGUI camera, so we can see sprites of 2D Toolkit camera. But i still not fix it :)
-
If I understand this correctly, your tk2dCamera sprites are being drawn but they are being drawn behind your GUI sprites? This is what you would expect, so I'm not sure where the problem is?
-
Is it possible to define the render order of 2dtoolkit in relation to NGUI?
We had certain 2dtk assets rendering above NGUI, but since updating to the latest NGUI and 2DToolKit packages form the Asset store, this is no longer the case.
Does anyone know of how to draw 2dtk assets above NGUI? Is this no longer possible?
-
If you use 2 cameras, then you can explicitly control what draws first.