How do you create an object that spawns other gameobjects

I wanted to to create a boss battle that is able to shoot something out of his eyes, i have already created the game object that will be shot out, but I am struggling on how to get them to spawn from it’s eyes,

The head of the boss follows the player around so it would have to be spawning from a specific object like an empty gameobject, so it can’t be random.

I have looked at some of the unity documentation things and none of them really help…

If you do choose to write an example script please do it in c# as i do not understand java script very well as i am still fairly new to unity

This is what you are looking for.

Welcome to Unity!

Since you’re new here, you should do a few tutorials to get a feel for the engine: Unity Learn

You’d use the Instantiate method: Unity - Scripting API: Object.Instantiate
Here’s a tutorial: Instantiate - Unity Learn

2 Likes