- Змінено
Why is prefabs containing S.A. sometimes changing by itself?
I found that some prefebs containing SkeletonAnimations in my project will keep changing by itself under unknown circumstances. Those prefabs has has been there and I didn't modify them for ages. They just occasionally get dirty and I spot them when using git.
From Git client, what I general see is something like this:
The fileID field sometime change from value to 0 and sometime from zero to value.
While viewing from inspector, it does have material linked in the field instead of 0 (null).
Considering I don't see any issue whether the fileID has value or 0. I believe the SA component will always maintain the field value before use. May be it does not set it dirty in editor when value actually get changed in edit mode causing the inconsistency between the view and the saved file?
This issue has been happening for a very long time. It does not really have any impact in game but having prefabs marked dirty by itself from time to time is a little annoying when they show up in gits commit.
(using Unity 4.0 runtime)
We are sorry for the inconvenience! Do you also receive this behaviour with the 4.1 spine-unity runtime?
Please note that we have performed quite a lot of changes in this regard on the 4.1 branch, as can be seen in this issue ticket:
https://github.com/EsotericSoftware/spine-runtimes/issues/1273
I'm afraid we won't be releasing updates of the 4.0 runtime anymore.
Ah I see. It is not the right time for me update to 4.1 runtime yet. I will do so when I am less busy. In the mean time I will just ignore them.
FYI, the last time I saw this happen is yesterday after I build for android and PC. I generally do not commit those dirty prefeb unless I really changed them. After the build process, I notice that the dirty prefab is reverted back to clean state by itself.
Thanks.
Nick написавFYI, the last time I saw this happen is yesterday after I build for android and PC. I generally do not commit those dirty prefeb unless I really changed them. After the build process, I notice that the dirty prefab is reverted back to clean state by itself.
Thanks for the info, this is actually expected behaviour. The prefabs first receive meshes attached to the prefab asset in order to provide a thumbnail image in the project panel as well as in the Preview
part at the bottom of the Inspector. This redundant mesh, which is required in the Editor only, will be removed before a build (to not increase build size), and added again once the build is complete.
Whether this build optimization step is performed or not can be configured in the 4.1 and newer runtimes via the Spine Preferences setting Prefabs - Optimize Preview Meshes
:
spine-unity Runtime Documentation: Spine Preferences