My parent GO (w/ a CController) has child object with C# script attached, that script has
public CharacterController cc;
cc = transform.parent.gameObject.GetComponent<CharacterController>();
and in the Editor at runtime I see the icon/CharacterController selected into that public variable, but when the script starts doing this:
Vector3 forward = transform.parent.TransformDirection(Vector3.forward);
cc.SimpleMove(forward * moveSpeed * Time.deltaTime);
I start getting Object Null References errors on the cc.SimpleMove line#.
If I move the C# scripts back onto parent GO things work fine but I need them on child obj to make use of multiple Layers