[ad_1]
Assume that you’ve got an Empty Object, which holds a Canvas. This canvas has 2 Picture element, Background and ScoreUI. Background is simply a picture for background, a pleasant image. ScoreUI is aimed to indicate present rating, time left and many others. It’s positioned at prime of the Background.
On this recreation, I instantiate plenty of GameObjects, from a single prefab. This prefab has a sprite, naturally. That recreation object spawns outdoors of the digicam, significantly at Y axis, above the ScoreUI. So when it’s spawning to the map, it must be below ScoreUI, however on Background. To extra exact, consider it as rain. Rain begins very above from the display, and drops to maps in a secure street transferring on Y axis. Clearly, it should not be proven on ScoreUI, however must be on Background itself. Subsequently, when rain strikes within the ScoreUI space, it should not be seen.
I looked for it, and discovered about Sorting Layers, nevertheless it doesn’t work on this drawback as a result of “as official Unity YT video” introduces, it’s for Sprites. Nevertheless, I have to set the order inside differing kinds.
Any assist? I’m positive this can be a primary difficulty, however your one line remark in all probability can save me a day. Thanks upfront.
Notice: I attempted including Sprite Group to Photos to supply Sorting Layer attribute. Didn’t work. I attempted ScoreUI Z axis to be 10, whereas others are Z=0, didn’t work. I attempted to vary the Render Mode of Canvas to World Area (beforehand, it was Display Area – Digital camera) as advised on this reply One other GameDev.StackExchange Query, it didn’t work.
[ad_2]