Complete the code to instantiate a prefab at the origin with no rotation.
Instantiate(prefab, [1], Quaternion.identity);Using Vector3.zero places the object at the origin (0,0,0).
Complete the code to instantiate a prefab at the player's position.
Instantiate(prefab, [1], Quaternion.identity);Using player.transform.position places the new object exactly where the player is.
Fix the error in the code to instantiate a prefab with the same rotation as the spawner object.
Instantiate(prefab, transform.position, [1]);transform.rotation uses the spawner's rotation for the new object.
Fill both blanks to instantiate a prefab at a random position within a range and with no rotation.
Vector3 randomPos = new Vector3(Random.Range(-10, 10), 0, [1]); Instantiate(prefab, randomPos, [2]);
The z position uses Random.Range(-10, 10) for randomness, and Quaternion.identity means no rotation.
Fill all three blanks to instantiate a prefab, set its parent to the spawner, and name it "SpawnedObject".
GameObject obj = Instantiate([1], transform.position, [2]); obj.transform.parent = [3]; obj.name = "SpawnedObject";
Instantiate the prefab at the spawner's position with its rotation, then set the parent to transform (the spawner).