Unity Tutorial: Sprite Sorting in Top Down Games (Single & Multiple Sprites!)

preview_player
Показать описание
In this Unity Tutorial we'll implement Sprites Sorting needed to create any top down game - Roguelike, RPG, Shooter, you name it! This technic works well with both single sprite characters and one consisting of many sprites.

It's a little bit slower paced compared to my previous videos. Please let me know what you think, do you like this type of format? Comment below! :)

If you don't have a movement in place don't worry I've got you covered:

#rpg #unity #roguelike #indiegame #indiedev #indiegamedev #gamedevelopment #unitytutorial
Рекомендации по теме
Комментарии
Автор

Hello Everyone! :) I hope you enjoy this video - it has slightly slower pace than some of my previous videos. What do you think about it? Do you like this format?
Also as mentioned in the video - I am working on a scripting series. I will try to cover several 'more complicated & advanced' C# concepts to help you level up you programming skills :). If you think something should be covered please let me know! Also just to let you know I have plan for a full scripting series for beginners but it will take a little bit of time before I start publishing it :). Have a fantastic day, love you and bye bye! :)

PitiITNet
Автор

This is awesome, thank you! Why didn't I remember any sooner that you had made a video on this, it would have saved me such a headache :D!

christinaVennegerts
Автор

This is exactly what I was looking for with quality code and a good explanation. 10/10 my man!

ambid
Автор

I have to say, I've try so many type of sorting script from other tutorial and it doesn't seem to be very accurate but your is very well made. Even tho the script is very complicated to write but the execution is what I really want.
Thx man

rcotton
Автор

There is a much simpiler method for Y-sorting. You can change your project to use Y-sorting by changing the URP settings.
Settings Folder -> UniversalRP asset -> click the 3 dots to expand settings -> Custom Axis -> Set Y to 1 and the others to 0 (easy as that)

Additionally, for grouping multiple sprites, such as having multiple layers on a charcter, you can use a "Sorting Group" on the parent. This creates a nested group of layers and treats them all as a single layer.

simmzzzz
Автор

Nice video dude ! You explain very well and you're video is nice "mounted?" . For the next in sprite sorting what about on multiple markers ?

dorianjullian
Автор

Nice video!
Little tip I've learned when doing these "top-down"/"2.5d" games: ditch the YSort component architecture and instead just go to Project Settings -> Graphics, set Transparency Sort Mode to Custom and set the sort axis to 0, 1, 0.
Then everything sorts automatically based on Y distance from the camera and you can use SortingGroup's to control the exact layer number for individual pieces of a character.

tucccci
Автор

Great video honestly i was looking for this but theres one small problem. My tree is also composed of multiple sprites and the order that it sorts in is wrong :/ (The tree trunk is in front, it should be behind) I would be greatful if you knew a solution or what to change in the code to fix that

SN
Автор

Absolutely not working scripts and nothing is working at all. I exactly did what you said

kanon
Автор

And if our object is static tilemap, it s working?

Fahrc
Автор

can you do a tutorial on how to do AI following the player like a party member in earthbound?

rcotton
Автор

The correct line:
_spriteRenderer.sortingOrder = - * 10f) * -1;

ucagdascoskun