This commit is contained in:
badlogic 2019-04-18 17:06:16 +02:00
commit cdd06b22f1
4 changed files with 18 additions and 4 deletions

View File

@ -30,7 +30,7 @@
#define SPINE_SKELETON_MECANIM
#if (UNITY_2017_4 || UNITY_2018)
#if (UNITY_2017_4 || UNITY_2018_1_OR_NEWER )
#define SPINE_UNITY_2018_PREVIEW_API
#endif

View File

@ -106,8 +106,13 @@ namespace Spine.Unity.Editor {
}
void OnSelectionChange () {
#if UNITY_2019_1_OR_NEWER
SceneView.duringSceneGui -= this.OnSceneGUI;
SceneView.duringSceneGui += this.OnSceneGUI;
#else
SceneView.onSceneGUIDelegate -= this.OnSceneGUI;
SceneView.onSceneGUIDelegate += this.OnSceneGUI;
#endif
bool noSkeletonRenderer = false;
@ -148,7 +153,11 @@ namespace Spine.Unity.Editor {
isPrefab = false;
boneName = string.Empty;
bone = null;
#if UNITY_2019_1_OR_NEWER
SceneView.duringSceneGui -= this.OnSceneGUI;
#else
SceneView.onSceneGUIDelegate -= this.OnSceneGUI;
#endif
}
void OnDestroy () {

View File

@ -201,8 +201,13 @@ namespace Spine.Unity.Editor {
Icons.Initialize();
// Drag and Drop
#if UNITY_2019_1_OR_NEWER
SceneView.duringSceneGui -= DragAndDropInstantiation.SceneViewDragAndDrop;
SceneView.duringSceneGui += DragAndDropInstantiation.SceneViewDragAndDrop;
#else
SceneView.onSceneGUIDelegate -= DragAndDropInstantiation.SceneViewDragAndDrop;
SceneView.onSceneGUIDelegate += DragAndDropInstantiation.SceneViewDragAndDrop;
#endif
EditorApplication.hierarchyWindowItemOnGUI -= HierarchyHandler.HandleDragAndDrop;
EditorApplication.hierarchyWindowItemOnGUI += HierarchyHandler.HandleDragAndDrop;

View File

@ -49,8 +49,8 @@ namespace Spine.Unity {
public SkeletonDataAsset skeletonDataAsset;
public SkeletonDataAsset SkeletonDataAsset { get { return skeletonDataAsset; } }
[SpineSkin(dataField:"skeletonDataAsset")]
public string initialSkinName = "default";
[SpineSkin(dataField:"skeletonDataAsset", defaultAsEmptyString:true)]
public string initialSkinName;
public bool initialFlipX, initialFlipY;
[SpineAnimation(dataField:"skeletonDataAsset")]
@ -111,7 +111,7 @@ namespace Spine.Unity {
protected override void Reset () {
base.Reset();
if (material == null || material.shader != Shader.Find("Spine/SkeletonGraphic (Premultiply Alpha)"))
if (material == null || material.shader != Shader.Find("Spine/SkeletonGraphic"))
Debug.LogWarning("SkeletonGraphic works best with the SkeletonGraphic material.");
}
#endif