/// <summary> /// Show the selection wizard. /// </summary> static public void Show(Callback callback) { if (instance != null) { instance.Close(); instance = null; } SpriteSelector comp = ScriptableWizard.DisplayWizard <SpriteSelector>("Select a Sprite"); //comp.mSprite = null; comp.mCallback = callback; }
/// <summary> /// Show the sprite selection wizard. /// </summary> static public void Show(SerializedObject ob, SerializedProperty pro, SpritesAtlas atlas) { if (instance != null) { instance.Close(); instance = null; } if (ob != null && pro != null && atlas != null) { SpriteSelector comp = ScriptableWizard.DisplayWizard <SpriteSelector>("Select a Sprite"); IFPipelineSettings.atlas = atlas; IFPipelineSettings.selectedSprite = pro.hasMultipleDifferentValues ? null : pro.stringValue; //comp.mSprite = null; comp.mObject = ob; comp.mProperty = pro; comp.mCallback = comp.OnSpriteSelection; } }
void OnDisable() { instance = null; }
void OnEnable() { instance = this; }