public void InitObjet(Vector3 pos, Quaternion q, string kartName) { GameObject kart = GameObject.Instantiate(Resources.Load(kartName), pos, q) as GameObject; //GameObject kart_angles = GameObject.Instantiate (Resources.Load("GameplayObject"), pos, q) as GameObject; kart.name = kart.name.Split('(')[0]; kc = kart.GetComponent <KartController>(); kart_script = kart.GetComponent <KartScript>(); kart_script.SetKart(this); kc.setCoefficients(speedCoeff, turnCoeff); //kart_angles.GetComponent<Gameplay> ().SetKart (kart.transform); }