How can I summon an object in unity? I have a folder named Objects and there is an object I want to summon named RandomBeam and I want to summon it at -12.5, 0, 0.
-Thanks.
Unity2D
How can I summon an object in unity? I have a folder named Objects and there is an object I want to summon named RandomBeam and I want to summon it at -12.5, 0, 0.
-Thanks.
Unity2D
create variable in custom script public GameObject RandomBeamPrefab; (dont forget to drag and drop RandomBeam from folder to your components field named RandomBeamPrefab)
then use this
Instantiate(RandomBeamPrefab, new Vector3(-12.5f, 0, 0), Quaternion.identity);