- Home /
Question by
MonkeyAssassin8 · Oct 31, 2011 at 02:08 AM ·
c#crashcharactermotor
C# CharacterMotor crashing. What am I doing wrong?
I'm trying to convert Unity's CharacterMotor(js) script into my own c# version, but it crashes when I put the script on an object. please help, I can usually figure things out, but I don't know what I'm doing wrong.
using UnityEngine;
using System.Collections;
public class MyCharacterMotor : MonoBehaviour {
public MyCharacterMotorMovement movement = new MyCharacterMotorMovement();
}
public class MyCharacterMotorMovement : MyCharacterMotor{
}
Comment
Best Answer
Answer by MonkeyAssassin8 · Oct 31, 2011 at 02:44 AM
After lots of confusion and research, I found a solution:
using UnityEngine;
using System.Collections;
public class CMmain : MonoBehaviour {
[System.Serializable]
public class CMmovement {
}
public CMmovement movement = new CMmovement();
}
Your answer
Follow this Question
Related Questions
Multiple Cars not working 1 Answer
Distribute terrain in zones 3 Answers
Help to understand script (Ninja character) 0 Answers
A simple recursion leads to crash 1 Answer
Max height jump 2 Answers