diff --git a/spine-unity/Assets/Spine Examples/Scripts/Sample Components/SkeletonRenderTexture/SkeletonRenderTexture.cs b/spine-unity/Assets/Spine Examples/Scripts/Sample Components/SkeletonRenderTexture/SkeletonRenderTexture.cs index 369682ca7f..b0c0f26fec 100644 --- a/spine-unity/Assets/Spine Examples/Scripts/Sample Components/SkeletonRenderTexture/SkeletonRenderTexture.cs +++ b/spine-unity/Assets/Spine Examples/Scripts/Sample Components/SkeletonRenderTexture/SkeletonRenderTexture.cs @@ -73,6 +73,17 @@ public class SkeletonRenderTexture : SkeletonRenderTextureBase { CreateQuadChild(); } +#if UNITY_EDITOR + protected void Reset () { + string[] folders = { "Assets", "Packages" }; + string[] assets = UnityEditor.AssetDatabase.FindAssets("t:material RenderQuadMaterial", folders); + if (assets.Length > 0) { + string materialPath = UnityEditor.AssetDatabase.GUIDToAssetPath(assets[0]); + quadMaterial = UnityEditor.AssetDatabase.LoadAssetAtPath(materialPath); + } + } +#endif + void CreateQuadChild () { quad = new GameObject(this.name + " RenderTexture", typeof(MeshRenderer), typeof(MeshFilter)); quad.transform.SetParent(this.transform.parent, false); diff --git a/spine-unity/Assets/Spine Examples/package.json b/spine-unity/Assets/Spine Examples/package.json index 08f694f004..2fd21dc344 100644 --- a/spine-unity/Assets/Spine Examples/package.json +++ b/spine-unity/Assets/Spine Examples/package.json @@ -2,7 +2,7 @@ "name": "com.esotericsoftware.spine.spine-unity-examples", "displayName": "spine-unity Runtime Examples", "description": "This plugin provides example scenes and scripts for the spine-unity runtime.", - "version": "4.1.12", + "version": "4.1.13", "unity": "2018.3", "author": { "name": "Esoteric Software",