Maintenance - We're currently working on things and you might experience some issues. Should be wrapped up soon!

This post has been de-listed

It is no longer included in search results and normal feeds (front page, hot posts, subreddit posts, etc). It remains visible only via the author's post history.

1
Request: How to have assets change their own "OrderinLayer" inside the editor.
Post Body

Hello everyone!

I'm working on a 2D side-scroller game. I'd like it so that I could have all the sprites sort their "Order In Layer" themselves by their Z coordinate so that assets with a lower Z coordinate have a higher Order in Layer number. I have a script that I can attach to assets so they do so on Play but I'd prefer a script that runs in the editor and I've never done a script like that before.

The setting that let's you do this in project settings>graphics is unavailable because we're using the experimental 2D lighting system in Unity and the URP we're using doesn't allow that configuration.

Author
Account Strength
100%
Account Age
6 years
Verified Email
Yes
Verified Flair
No
Total Karma
34,321
Link Karma
2,923
Comment Karma
31,288
Profile updated: 6 days ago
Posts updated: 5 months ago

Subreddit

Post Details

We try to extract some basic information from the post title. This is not always successful or accurate, please use your best judgement and compare these values to the post title and body for confirmation.
Posted
3 years ago