Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR CSHARP

unity how to summon an object with code

Instantiate(YourPrefab, positionToSpawn, rotation);
//example
Instantiate(bullet, this.transform.position, this.transform.rotate);
//summons a bullet at the position of a THIS game object, and THIS game object's rotation.  
 
PREVIOUS NEXT
Tagged: #unity #summon #object #code
ADD COMMENT
Topic
Name
4+3 =