44 lines
1.0 KiB
C#
44 lines
1.0 KiB
C#
using UnityEngine;
|
|
#if UNITY_EDITOR
|
|
using UnityEditor;
|
|
#endif
|
|
using SickscoreGames.HUDNavigationSystem;
|
|
|
|
[CustomEditor(typeof(HNSPlayerCamera))]
|
|
public class HNSPlayerCameraEditor : HUDNavigationBaseEditor
|
|
{
|
|
#region Variables
|
|
protected HNSPlayerCamera hudTarget;
|
|
#endregion
|
|
|
|
|
|
#region Main Methods
|
|
void OnEnable ()
|
|
{
|
|
editorTitle = "HNS Player Camera";
|
|
splashTexture = (Texture2D)Resources.Load ("Textures/splashTexture_PlayerCamera", typeof(Texture2D));
|
|
showHelpboxButton = showExpandButton = false;
|
|
|
|
hudTarget = (HNSPlayerCamera)target;
|
|
}
|
|
|
|
|
|
protected override void OnBaseInspectorGUI ()
|
|
{
|
|
EditorGUILayout.HelpBox ("This GameObject will be automatically assigned as the Player Camera.", MessageType.Info);
|
|
if (hudTarget.GetComponent<Camera> () == null)
|
|
EditorGUILayout.HelpBox ("Could not find a camera component on this GameObject!", MessageType.Warning);
|
|
}
|
|
|
|
|
|
protected override void OnExpandSettings (bool value)
|
|
{
|
|
base.OnExpandSettings (value);
|
|
}
|
|
#endregion
|
|
|
|
|
|
#region Utility Methods
|
|
#endregion
|
|
}
|