This commit is contained in:
2024-04-25 15:33:03 +02:00
parent 1aa075773f
commit c54609aa39
7 changed files with 8 additions and 25 deletions

View File

@@ -15,17 +15,8 @@ public class CarLoader : MonoBehaviour
public GameObject targetcar;
void Start()
{
try
{
carType = GameObject.Find("Car Data").GetComponent<CarData>().carType;
carColor = GameObject.Find("Car Data").GetComponent<CarData>().carColor;
}
catch (System.Exception)
{
carType = "Racecar";
carColor = "Default";
print("no loading");
}
carType = GameObject.Find("Car Data").GetComponent<CarData>().carType;
carColor = GameObject.Find("Car Data").GetComponent<CarData>().carColor;
foreach (GameObject car in Cars)
{