コード例 #1
0
        public void DrawLevelEditorConfiguration()
        {
            GUIContent content = new GUIContent(LevelEditorConstants.EditorConfigurationLable);
            Vector2    size    = skin.GetStyle(LevelEditorConstants.Label).CalcSize(content);

            EditorUIUtility.DrawLabel(LevelEditorConstants.EditorConfigurationLable, GUILayout.Width(size.x));
            GUILayout.Space(LevelEditorConstants.i10);
            configuration = (LevelEditorConfiguration)EditorUIUtility.DrawObjectField(configuration, typeof(LevelEditorConfiguration));
        }
コード例 #2
0
 public void DrawMapper()
 {
     for (int indexOfTool = 0; indexOfTool < configuration.toolConfiguration.tools.Count; indexOfTool++)
     {
         EditorGUILayout.BeginHorizontal();
         GUILayout.Button(configuration.toolConfiguration.tools[indexOfTool].gridSprite, GUILayout.Height(LevelEditorConstants.i35), GUILayout.Width(LevelEditorConstants.i35));
         configuration.toolPrefabMapper.prefabs[indexOfTool] = (GameObject)EditorUIUtility.DrawObjectField(configuration.toolPrefabMapper.prefabs[indexOfTool], typeof(GameObject), GUILayout.Height(LevelEditorConstants.i35));
         EditorGUILayout.EndHorizontal();
     }
 }