示例#1
0
        public override void OnInspectorGUI()
        {
            if (Target.VirtualCamera.Follow == null)
            {
                EditorGUILayout.HelpBox(
                    "Framing Transposer requires a Follow target.  Change Body to Hard Constraint if you don't want a Follow target.",
                    MessageType.Error);
            }
            if (Target.VirtualCamera.LookAt != null)
            {
                EditorGUILayout.HelpBox(
                    "The LookAt target must be null.  The Follow target will be used in place of the LookAt target.",
                    MessageType.Error);
            }

            serializedObject.Update();

            // First snapshot some settings
            Rect oldHard = Target.HardGuideRect;
            Rect oldSoft = Target.SoftGuideRect;

            // Draw the properties
            DrawPropertiesExcluding(serializedObject, GetExcludedFields());
            serializedObject.ApplyModifiedProperties();
            mScreenGuideEditor.SetNewBounds(oldHard, oldSoft, Target.HardGuideRect, Target.SoftGuideRect);
        }
        public override void OnInspectorGUI()
        {
            BeginInspector();
            bool needWarning = false;

            for (int i = 0; !needWarning && i < targets.Length; ++i)
            {
                needWarning = (targets[i] as CinemachineFramingTransposer).FollowTarget == null;
            }
            if (needWarning)
            {
                EditorGUILayout.HelpBox(
                    "Framing Transposer requires a Follow target.  "
                    + "Change Body to Do Nothing if you don't want a Follow target.",
                    MessageType.Warning);
            }

            // First snapshot some settings
            Rect oldHard = Target.HardGuideRect;
            Rect oldSoft = Target.SoftGuideRect;

            // Draw the properties
            DrawRemainingPropertiesInInspector();
            m_ScreenGuideEditor.SetNewBounds(oldHard, oldSoft, Target.HardGuideRect, Target.SoftGuideRect);
        }
        public override void OnInspectorGUI()
        {
            BeginInspector();
            if (Target.FollowTarget == null)
            {
                EditorGUILayout.HelpBox(
                    "Framing Transposer requires a Follow target.  Change Body to Do Nothing if you don't want a Follow target.",
                    MessageType.Warning);
            }

            // First snapshot some settings
            Rect oldHard = Target.HardGuideRect;
            Rect oldSoft = Target.SoftGuideRect;

            // Draw the properties
            DrawRemainingPropertiesInInspector();
            mScreenGuideEditor.SetNewBounds(oldHard, oldSoft, Target.HardGuideRect, Target.SoftGuideRect);
        }
示例#4
0
        public override void OnInspectorGUI()
        {
            if (Target.VirtualCamera.LookAt == null)
            {
                EditorGUILayout.HelpBox("A LookAt target is required.  Change Aim to Hard Constraint if you don't want a LookAt target.", MessageType.Error);
            }

            serializedObject.Update();

            // First snapshot some settings
            Rect oldHard = Target.HardGuideRect;
            Rect oldSoft = Target.SoftGuideRect;

            // Draw the properties
            DrawPropertiesExcluding(serializedObject, GetExcludedFields());
            serializedObject.ApplyModifiedProperties();
            mScreenGuideEditor.SetNewBounds(oldHard, oldSoft, Target.HardGuideRect, Target.SoftGuideRect);
        }
        public override void OnInspectorGUI()
        {
            BeginInspector();
            if (Target.LookAtTarget == null)
            {
                EditorGUILayout.HelpBox(
                    "A LookAt target is required.  Change FreeRunAim to Do Nothing if you don't want a LookAt target.",
                    MessageType.Warning);
            }

            // First snapshot some settings
            Rect oldHard = Target.HardGuideRect;
            Rect oldSoft = Target.SoftGuideRect;

            // Draw the properties
            DrawRemainingPropertiesInInspector();
            mScreenGuideEditor.SetNewBounds(oldHard, oldSoft, Target.HardGuideRect, Target.SoftGuideRect);
        }