I'm trying to turn off the gravity for one instantiated prefab clone, if something in the game happens. I have this:
public class Controller : MonoBehaviour
public Transform randomcoin;
private void Start()
if ( ... )
{ randomcoin.GetComponent<Rigidbody>.useGravity = false; }
This gives me this error:
Component.GetComponent<T>() is a method, which is not valid in the given context
Does anyone know how I can fix this?