CinemachineSameAsFollowTargetEditor.cs 681 B

12345678910111213141516171819
  1. using UnityEditor;
  2. using UnityEngine;
  3. namespace Cinemachine.Editor
  4. {
  5. [CustomEditor(typeof(CinemachineSameAsFollowTarget))]
  6. internal sealed class CinemachineSameAsFollowTargetEditor : BaseEditor<CinemachineSameAsFollowTarget>
  7. {
  8. public override void OnInspectorGUI()
  9. {
  10. BeginInspector();
  11. if (Target.FollowTarget == null)
  12. EditorGUILayout.HelpBox(
  13. "Same As Follow Target requires a Follow target. It will set the virtual camera's rotation to be the same as that of the Follow Target.",
  14. MessageType.Warning);
  15. DrawRemainingPropertiesInInspector();
  16. }
  17. }
  18. }