static SkeletonGraphicInspector () { if (!SpineEditorUtilities.initialized) return; if (instantiateDelegate == null) instantiateDelegate = new SpineEditorUtilities.InstantiateDelegate(SpawnSkeletonGraphicFromDrop); // Drag and Drop Instantiate menu item var spawnTypes = SpineEditorUtilities.additionalSpawnTypes; UnityEngine.Assertions.Assert.IsFalse(spawnTypes == null); bool menuItemExists = false; foreach (var spawnType in spawnTypes) { if (spawnType.instantiateDelegate == SkeletonGraphicInspector.instantiateDelegate) { menuItemExists = true; break; } } if (!menuItemExists) { SpineEditorUtilities.additionalSpawnTypes.Add(new SpineEditorUtilities.SkeletonComponentSpawnType { menuLabel = "SkeletonGraphic (UI)", instantiateDelegate = SkeletonGraphicInspector.instantiateDelegate, isUI = true }); } }
static SkeletonGraphicInspector() { if (!SpineEditorUtilities.initialized) { return; } if (instantiateDelegate == null) { instantiateDelegate = new SpineEditorUtilities.InstantiateDelegate(SpawnSkeletonGraphicFromDrop); } // Drag and Drop Instantiate menu item var spawnTypes = SpineEditorUtilities.additionalSpawnTypes; UnityEngine.Assertions.Assert.IsFalse(spawnTypes == null); bool menuItemExists = false; foreach (var spawnType in spawnTypes) { if (spawnType.instantiateDelegate == SkeletonGraphicInspector.instantiateDelegate) { menuItemExists = true; break; } } if (!menuItemExists) { SpineEditorUtilities.additionalSpawnTypes.Add(new SpineEditorUtilities.SkeletonComponentSpawnType { menuLabel = "SkeletonGraphic (UI)", instantiateDelegate = SkeletonGraphicInspector.instantiateDelegate, isUI = true }); } }