Collapsible Variable List in C#

In the CharacterMotor.js of the “First Person Controller” in the Standard Assets folder defines a class “CharacterMotorMovement” and uses a"movement" var to create a Collapsible var list in Unity. Makes it look nice and organized, and would like to do the same in C#.

For I have it like this:

public class CharacterMotorMovement : MonoBehaviour
{
public float maxForwardSpeed = 10.0f;
public float maxSidewaysSpeed = 10.0f;
public float maxBackwardsSpeed = 10.0f;
}

public class CharacterMotorII : CharacterMotorMovement
{

}

Any help?

[System.Serializable]
public class test
{
	public float floattest;
	public string stringtest;
	public int inttest;
}

public class NewBehaviourScript : MonoBehaviour
{
	public test tester;
}

Something like this?:slight_smile:

I’m confused as to what you are asking?

Thanks BlackSpider, that did it! I appreciate your help!..

Hi Trackpants,

If you look at the “First Person Controller” properties, and in the “Character Motor (Script)” Component you will see a variable called “Movement”: its a Collapsible define class with variables. This is pretty cool feature of Unity to be able to do this. You can organize your data variables into categories sets.