mp075496706 The image in the attachment is the way my Spine plug-in is imported into the Unity.I can change the OrderinLayer option in Editor, but I want to change the OrderinLayer option dynamically after the program runs. What should I do
Pharan All UnityEngine.Renderer components have the sorting properties: https://docs.unity3d.com/ScriptReference/Renderer-sortingLayerID.html https://docs.unity3d.com/ScriptReference/Renderer-sortingOrder.html Because Unity's MeshRenderer's inspector doesn't expose them, we expose them in the Spine component's inspector. But the values are actually still stored with the MeshRenderer. So to access them through code, go through MeshRenderer. GetComponent<MeshRenderer>().sortingOrder = 1;
mp075496706 @Pharan Thank you, friend. Your reply has given me great help. Thank you very much. Pharan लिखाAll UnityEngine.Renderer components have the sorting properties: https://docs.unity3d.com/ScriptReference/Renderer-sortingLayerID.html https://docs.unity3d.com/ScriptReference/Renderer-sortingOrder.html Because Unity's MeshRenderer's inspector doesn't expose them, we expose them in the Spine component's inspector. But the values are actually still stored with the MeshRenderer. So to access them through code, go through MeshRenderer. GetComponent<MeshRenderer>().sortingOrder = 1; Thank you, friend. Your reply has given me great help. Thank you very much.