Nextrek
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
|
using UnityEngine;
using UnityEditor;
using System.Collections;
using AC;
[CustomEditor(typeof(MainCamera))]
public class MainCameraEditor : Editor
{
public override void OnInspectorGUI()
{
MainCamera _target = (MainCamera) target;
EditorGUILayout.BeginVertical ("Button");
_target.fadeTexture = (Texture2D) EditorGUILayout.ObjectField ("Fade texture:", _target.fadeTexture, typeof (Texture2D), false);
EditorGUILayout.EndVertical ();
if (Application.isPlaying)
{
EditorGUILayout.BeginVertical ("Button");
if (_target.attachedCamera)
{
EditorGUILayout.LabelField ("Attached camera: " + _target.attachedCamera);
}
else
{
EditorGUILayout.LabelField ("Attached camera: None");
}
EditorGUILayout.EndVertical ();
}
if (GUI.changed)
{
EditorUtility.SetDirty (_target);
}
}
}
|
Revision |
Author |
Commited |
Message |
83
|
FMMortaroli
|
Tue 13 May, 2014 11:32:51 +0000 |
|