I often need references to SkeletonAnimation's state and skeleton instances. But because of some Unity lifecycle stuff in special circumstances (like when you instantiate GameObjects from prefabs), they don't always get initialized before I need them.
I've tried calling Initialize myself but as it is (since the null guard is in Update and not in Initialize itself) there's a chance the state and skeleton references to already-initialized objects get overwritten and I get some really freaky behavior as a result.
So I've found it useful to add a separate SafeInitialize() method to SkeletonComponent with a null guard in it before calling Initialize().
I dunno if this is good form in terms of API (and I can't think of a better name for the method).
I've considered making properties (that sort of does lazy-instantiation-but-not-really itself) for skeleton and state too, but it seemed simpler to me to keep Initialization centralized like it already is.
I'd like some input from other Spine-Unity users too as to what a good alternate solution would be or if I should just stick with this.
Mostly, I just want to know if it makes sense to add to official Spine-Unity so I don't have to re-add the darned thing in every update. Or worse, add it to every class in my project that needs the SafeInitialize functionality.
Then we can do a PR on github and Nate can approve it. has no idea how open-source projects handle this sort of thing