otez :Because if I don't do it in that exact order the submeshes won't apply rectangle bounds and get NaNs.
Could you please describe which order would lead to this problem (and still make sense)?
otez :Probably, Update(0) and MatchRectTransformWithBounds() should be called inside Initialize method.
While Update(0)
could theoretically be called in Initialize()
, there are many cases where this will lead to Update()
being called twice after initialization. While we could add an update = false
parameter to the Initialize()
method, it's not a big gain while introducing redundancy.
MatchRectTransformWithBounds
should not be called automatically in Initialize
, at least not every time. Again, an additional parameter could be added to Initialize()
, but for the same reasons we are rather against doing that.
Please let me know if I misunderstood you there and you meant something else.
otez :And what if I want to change the size of SkeletonGraphic object? Or if I want it to be exactly 1920x1080 and not the size of animation?
We are planning to implement better scaling and RectTransform support, see this issue ticket here:
https://github.com/EsotericSoftware/spine-runtimes/issues/1640
Unfortunately we didn't get to this issue ticket yet.