Hi all, I found a c# converted character motor at CharacterMotor C# Translation - Pastebin.com which looks identical in functionality to the default JS in the character controller package.
I cannot however for the life of me get the c# script to display the movement/jumping/moving platform etc. variables, but it will show the first two:
Can Control
Use Fixed update
I don’t know much about JS syntax and I cannot see the problem here. I’ve applied the default JS to my player and can see the variables just fine. I’ve had a cursory glance over at ‘private’ or ‘hideininspector’ or ‘non-serialize’ and the two scripts look identical.
I’m attaching a screenshot of both scripts on my player (JS is the first component displayed of course with it’s glorious variables) Please help!
// For the next variables, [System.NonSerialized] tells Unity to not serialize the variable or show it in the inspector view.
// Very handy for organization!
// The current global direction we want the character to move in.
[System.NonSerialized]
public Vector3 inputMoveDirection = Vector3.zero;
// Is the jump button held down? We use this interface instead of checking
// for the jump button directly so this script can also be used by AIs.
[System.NonSerialized]
public bool inputJump = false;
Thanks gfoot - in response to Jallen above you and prior when I had said I briefly checked private/non-serialized, I thought it only applied to those local variables so I discarded that as a possibility - it seems I have to explicitly make the subclasses serializable as per gfoot’s response.