Hi!
I create 2D game with game levels map like in "candy crush saga".
Unity 4.5.5, NGUI 3.7.6, 3.7.7
UICamera event type 2D World.
But I do not quite understand how to determined the order of events for the colliders.
I have structure:
- Game Map (Box Collider 2D with size = Sum of Tiles colliders bounds, disabled now)
- - Map Camera (Ortho camera and UICamera)
- - Tiles
- - - Tile 1 (Sprite Renderer with Sorting Layer = Default + 1, Box Collider 2D)
- - - - Levels
- - - - - Level 1 (Sprite Renderer with Sorting Layer = Default + 2, Box Collider 2D)
- - - - - ....
.... (N Tiles with N Levels)
For test, I added next script for each game object (Game Map, Game Time, Game Level) and checked Debug Mode for UICamera:
void OnClick()
{
Debug.LogWarning("OnClick " + name);
}
Sometimes shows wrong object (see attach images). For example, I clicked on Game Level object, but Debug shows like I clicked on Game Tile.
Every time when I run project, Debug shows different events order for game objects. Looks like colliders order is different.
In attach: screenshots and simplified repro project.
Thanks!