Hi i am trying to convert EnemyPoliceGuy.js to c#. I’m getting this error
"Assets/Scripts/C# Scripts/EnemyPoliceGuy.cs(37,49): error CS0236: A field initializer cannot reference the nonstatic field, method, or property `UnityEngine.Component.GetComponent(System.Type)’ "
my C# code:
private CharacterController characterController=GetComponent();