public override void OnInspectorGUI() { serializedObject.Update(); PrefabLoader loader = target as PrefabLoader; PrefabType prefabType = PrefabUtility.GetPrefabType(loader.gameObject); if (prefabType == PrefabType.PrefabInstance) { GUILayout.Label("Prefabの管理 (更新/復元はこのボタンで必ずすること)"); using (var scopeH = new GUILayout.HorizontalScope()) { if (GUILayout.Button("Select", EditorStyles.miniButtonLeft)) { loader.EditorExecSelect(); } if (GUILayout.Button("Revert", EditorStyles.miniButtonMid)) { loader.EditorExecRevert(); } if (GUILayout.Button("Apply", EditorStyles.miniButtonRight)) { loader.EditorExecApply(); loader.EditorExecInstantiate(); } } } if (prefabType != PrefabType.Prefab) { using (var scopeH = new GUILayout.HorizontalScope()) { if (GUILayout.Button("Instantiate", EditorStyles.miniButtonLeft)) { loader.EditorExecInstantiate(); } if (GUILayout.Button("Update TransformData", EditorStyles.miniButtonMid)) { loader.EditorExecUpdateTransformData(); } if (GUILayout.Button("Remove", EditorStyles.miniButtonRight)) { loader.EditorExecRemove(); } } } if (loader.IsNeedUpdateTransformData() && !Application.isPlaying) { EditorGUILayout.HelpBox( "子プレハブのTransform情報がシリアライズされていません\n" + "Update TransformDataで更新してください." , MessageType.Info); } GUILayout.Space(5f); EditorGUILayout.PropertyField(loadTiming, true); reorderableList.DoLayoutList(); serializedObject.ApplyModifiedProperties(); //EditorGUILayout.PropertyField (info, true); }