Hi,
Anyone who might have an idea what could cause this or how to fix it ?
When I set a Mask on a Spine object, I get warning spam.
The warning comes only in Editor (not in play mode) and only when Spine object is selected AND only if a Mask is set.
Console output:
No materials found assigned at Spine GameObject (skeleton)
UnityEngine.Debug:LogWarning (object)
Spine.Unity.Editor.SpineMaskUtilities:EditorConfirmDisabledMaskMaterialsInit (Spine.Unity.SkeletonRenderer) (at Assets/ThirdParty/Spine/Editor/spine-unity/Editor/Utility/SpineMaskUtilities.cs:187)
Spine.Unity.Editor.SpineMaskUtilities:EditorInitSpriteMaskMaterialsForMaskType (Spine.Unity.SkeletonRenderer,UnityEngine.Rendering.CompareFunction,UnityEngine.Material[]&) (at Assets/ThirdParty/Spine/Editor/spine-unity/Editor/Utility/SpineMaskUtilities.cs:157)
Spine.Unity.Editor.SpineMaskUtilities:EditorInitSpriteMaskMaterialsOutsideMask (Spine.Unity.SkeletonRenderer) (at Assets/ThirdParty/Spine/Editor/spine-unity/Editor/Utility/SpineMaskUtilities.cs:151)
Spine.Unity.Editor.SpineMaskUtilities:EditorAssignSpriteMaskMaterials (Spine.Unity.SkeletonRenderer) (at Assets/ThirdParty/Spine/Editor/spine-unity/Editor/Utility/SpineMaskUtilities.cs:83)
Spine.Unity.Editor.SpineEditorUtilities:ReinitializeComponent (Spine.Unity.SkeletonRenderer) (at Assets/ThirdParty/Spine/Editor/spine-unity/Editor/Utility/SpineEditorUtilities.cs:310)
Spine.Unity.Editor.SkeletonRendererInspector😮nInspectorGUI () (at Assets/ThirdParty/Spine/Editor/spine-unity/Editor/Components/SkeletonRendererInspector.cs:197)
UnityEngine.GUIUtility😛rocessEvent (int,intptr,bool&)
- What I can tell is, we have Spines from two previous games, that both works fine with masks when I test them (same mask png, same project).
- For those that work, when choose a Mask the scripts generate a _OutsideMask material. However, for the spine that gives the warning spam, it does not generate this material (I would guess that the warning has something to do with this?).
- When the problematic spine is imported it does create a material as expected, but it does not set any material(s) on the Mesh Renderer (the working ones does).
- In play mode there seem to be no problems, no warnings and the masks work, so it may be a case of "don't worry dude", but since it is my job to worry 😃, and also I find it suspicious that the _OutsideMask material is not generated.
- Tried going through all the export settings in Spine with our graphic designers, replicating all settings from the previous projects but with no change.
Any ideas or suggestions ?
Should I apply "why worry if it works at runtime" ?
We use version 4.1 of the Unity spine lib and Unity 2023.1.0b8.
Let me know if you need more info.
Cheers
Janus Kjempff