loodakrawa / SpriterDotNet

A pure C# Spriter implementation
zlib License
220 stars 75 forks source link

Set initial value for SortingLayer field #92

Closed rfadeev closed 6 years ago

rfadeev commented 6 years ago

To have initial field value serialized when prefab is generated for the first time. Otherwise field would not be set in prefab. If prefab is added to source control right after generation, one would observe prefab changes in the future if select prefab in Unity project window and save it since field would be set by custom editor here.

Sadly there is no Unity API to retrive default sorting layer name (i.e. "Default") so use string literal for that.