I am trying to name a Game object that I spawn into something, but unity gives me this error. here’s my code:
Spawn (new Vector3 (0, 1f, 0));
Spawn (new Vector3 (0, 2f, 0));
GameObject starA = Spawn (new Vector3 (0, 3f, 0));
can anyone identify the problem?
The error is simply saying that you are assigning a gameObject "starA" to the Spawn function that doesn't return anything (so, void).
– aditya007