Sitemap

Instantiate — Unity

3 min readNov 9, 2025

--

In the previous article, I covered Classes in Unity.

This article will dive into the Instantiate method.

What is Instantiation in Unity?

Get Zac Bogner’s stories in your inbox

Join Medium for free to get updates from this writer.

Instantiation is a method to where a new object can be created or spawned within a given location, direction, and rotation.

Press enter or click to view image in full size

Here the object being instantiated is in the wrong axis rotation.

Press enter or click to view image in full size

To envision the transform coordinates in Unity, here’s an example of how each coordinate responds within its relative direction.

  • X is the Left or Right Axis.
  • Y is the Up and Down Axis.
  • Z is the Forward and Backward Axis.
Press enter or click to view image in full size

An example of a new game object within the scene to showcase the Transform properties for the directional movement, X, Y and Z.

Press enter or click to view image in full size

For the Instantiate code, I’ll use a rocket instance, that will be for the instantiate method. This will return the rocket prefab Rigidbody (since Rigidbodies take in Physics parameters). A position and rotation coordinate, and a force to send the projectile out in a direction and force amount.

Press enter or click to view image in full size

The current projectile position is pointing in the Z axis, which this will send the rocket projectile forward, hence the forward position in code.

Press enter or click to view image in full size

The forward position for the rocket projectile in action.

Press enter or click to view image in full size

I want the rocket projectile to be created along the forward axis (literally… within the correct coordinate (this being the Y axis)).

Press enter or click to view image in full size

In code, I’ll change the forward forward direction (z) for the spawn position to the up direction (y) to have a proper spawn mechanism.

Press enter or click to view image in full size

And now the correct instantiate object is applied within the proper axis (y).

Press enter or click to view image in full size

And that’s all for Instantiation in Unity.

Stay tuned for more.

Thanks,

Zac B.

--

--

Zac Bogner
Zac Bogner

Written by Zac Bogner

Educator, Developer. Focused in Unreal Engine with other experience; Former Race Car Driver.