public override void OnInspectorGUI() { DoTilePreview(tile.sprite, tile.color, Matrix4x4.identity); serializedObject.Update(); EditorGUILayout.PropertyField(m_Sprite); using (new EditorGUI.DisabledGroupScope(m_Sprite.objectReferenceValue == null)) { GUILayout.BeginHorizontal(); GUILayout.FlexibleSpace(); if (GUILayout.Button(Styles.spriteEditorLabel)) { Selection.activeObject = m_Sprite.objectReferenceValue; SpriteEditorWindow.GetWindow(); } GUILayout.EndHorizontal(); } EditorGUILayout.PropertyField(m_Color); EditorGUILayout.PropertyField(m_ColliderType); serializedObject.ApplyModifiedProperties(); }
static private void OpenSpriteEditorWindow() { SpriteEditorWindow.GetWindow(); }