• RuntimesUnity
  • Does setting fix prefab Overr MeshFilter set Mesh Filter to none?

Unity Version: 2021.3.14f
Spine Version: 4.2
When inspecting a prefab that includes multiple spine data objects, the mesh filter is none.

Post your entire spine.log file here (or attach it), if you got any error messages.
Related Discussions
...
  • Изменено

Yes, enabling the "Fix Prefab Override MeshFilter" setting in Spine can result in the MeshFilter being set to "None" for the skeleton GameObjects. This is because the MeshFilter component is not serialized when this feature is enabled, which can lead to references to the MeshFilter being lost.

This behavior is intentional to prevent the prefab from always being marked as "Override" due to changes in the MeshFilter. However, it can cause issues if other components rely on references to the MeshFilter.

For more details, you can refer to the spine-unity Runtime Documentation: Setting Advanced Parameters and the related issue ticket on GitHub.

Hi,
Thank you. Continuing with the question, what is the best setting, does Fix Prefab Override MeshFilter need to be set to true or false?

  • Harald ответили на это сообщение.

    belovedquestioningly Continuing with the question, what is the best setting, does Fix Prefab Override MeshFilter need to be set to true or false?

    If it "needs to be" something it would not be a setting.

    If you enable the setting Fix Prefab Override MeshFilter, MeshFilter will be set to null, so:

    1. you don't get preview images of a Prefab in the Project panel (you just see the prefab name and no image) and
    2. any references to the MeshFilter from other components will not be serialized since the MeshFilter is not serialized itself (which you normally never do).

    If these are not a problem for you, you can enable the setting.

    If you set the setting to disabled, the disadvantage is that the prefab will always be marked as "modified" even though nothing changed, which is not really a problem, but annoys some people. Personally I would keep it disabled, but it's more a matter of personal preference.

      If anyone else is curious or have similar issues, the issue for me was that there was another script that set the mesh Renderer to off unless a certain condition is met.
      In conclusion, if the mesh renderer is off, and the prefab is saved in this state, the mesh filter is also set to none which will show the correct filter in gameplay (no issues on play just that prefab shows none value).

      Answering my own question hoping it helps anyone who came to this post thinking what did I do wrong.

      Harald Thank you Harald, I appreciate this detailed answer.