Пример #1
0
        public override void OnInspectorGUI()
        {
            isoTexture = target as IsoTexture;

            if (GUILayout.Button("Open texture assistant"))
            {
                TextureAssistant.OpenWindowEditor(isoTexture);
            }
        }
Пример #2
0
        public static void OpenWindowEditor(IsoTexture selected)
        {
            TextureAssistant assistant = EditorWindow.GetWindow(typeof(TextureAssistant)) as TextureAssistant;
            assistant.currentText = selected;

            IsoTexture[] textures = TextureManager.getInstance().textureList();
            for (int i = 0; i < textures.Length; i++)
                if (selected == textures[i])
                    assistant.selected = i;

        }