Can't see additional properties on view type drawer

Cheo

Active member
Hello, I've been adding a few parameters to the Third Person Combat view type today, but couldn't see them in the inspector window. I noticed that the RPG view type has 3 additional parameters that are displayed at the end of the drawer so I tried adding one in the lot :

C#:
        [Tooltip("The dapming of the yaw angle when it snaps back to behind the character as the character moves.")]
        [SerializeField] protected float m_YawSnapDamping = 0.1f;
        [Tooltip("A tooltip.")]
        [SerializeField] protected float m_MyTestValue = 1f;
        [Tooltip("Can the camera move freely with the press of the button specified by the free movement input name? ")]
        [SerializeField] protected bool m_AllowFreeMovement;
        [Tooltip("The name of the camera free movement input mapping.")]
        [SerializeField] protected string m_CameraFreeMovementInputName = "Fire1";

        public float YawSnapDamping { get { return m_YawSnapDamping; } set { m_YawSnapDamping = value; } }
        public float MyTestValue { get { return m_MyTestValue; } set { m_MyTestValue = value; } }
        public bool AllowFreeMovement { get { return m_AllowFreeMovement; } set { m_AllowFreeMovement = value; } }
        public string CameraFreeMovementInputName { get { return m_CameraFreeMovementInputName; } set { m_CameraFreeMovementInputName = value; } }

But only the initial three are displayed, and the strangest thing is that I can't find a single Inspector script for a specific view type !
I than tried making my own view type based on the Third Person Combat one but once again I couldn't get any additional property displayed in the inspector. Can someone please take a look at this ? Thanks in advance !
 
Thanks again to Dank for providing the solution : for scripts within Opsive's hierarchy we have to edit the Third Person Control script and add stuff like this :

C#:
            if (target is Adventure) {
                FieldInspectorView.AddField(unityObject, target, "m_YawLimit", container, onChangeEvent, onValidateChange);
                FieldInspectorView.AddField(unityObject, target, "m_YawLimitLerpSpeed", container, onChangeEvent, onValidateChange);
            }

For custom scripts outside of Opsive's hierarchy we need to duplicate the Third Person Control script, put it in an Editor folder outside of Opsive's hierarchy, and then edit it the same way. Hope this can help someone who stumbles on the same issue !
 
Top