Hello, how can i manage to assign a object to the Main Rigid body in C#? I try to assign a prefab to the main body;
public Engine[] engineArray;
public Engine leftThrt;
public Engine righttThrt;
engineArray = Object.FindObjectsOfType(typeof(Engine)) as Engine[];
i used this statement to populate the array with all my engines it works fine, but how do i manage to select specific engine
i tried
leftThrt = GameObject.FindGameObjectWithTag("LeftThr");
but it obvious give an error Cannot convert gameobject to Engine…