Create/Delete/Update sorting layers from code

Is it possible to manage (create/delete/update) sorting layers from code? I can’t find anything in the docs or when googling.

The only thing I’ve managed to find is this post on unity answers which show how to get the sorting layers using reflection. Granted, the post is old, but even if we cannot manage the sorting layers from code I still find it a bit surprising to find out that the only way to get hold of the layers is by use of reflection.

It’s not possible, aside from what you already linked to from Answers.

–Eric

1 Like