I’m currently trying to instantiate certain game objects, however I’m receiving the error: error CS1501: No overload for method Instantiate' takes
2’ arguments.
Here is my code:
public GameObject block;
private Vector3 startPos = new Vector3(-5.94f,4.19f,0);
void Start () {
block = gameObject;
}
void Update() {
int i = 0;
while( i < 19 ) {
Blocks _= (GameObject)Instantiate( block, (startPos*i));_
-
i++;*
-
}*
From what I’ve seen on the script reference this should work; the rotation variable should be set to a default.
The “block = gameObject” line is there because this script is attached to a game object. I’m only just getting back into C#, so I’m not sure why this would be happening. Everything looks fine to me.