Пример #1
0
        /// <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;
        }
Пример #2
0
        /// <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;
            }
        }
Пример #3
0
 void OnDisable()
 {
     instance = null;
 }
Пример #4
0
 void OnEnable()
 {
     instance = this;
 }