UnityScripterAI
Discord ↗
Link Copied to Clipboard
×
"create a cube"
using UnityEngine; public class CreateCube : MonoBehaviour { public GameObject cubePrefab; // Start is called before the first frame update void Start() { CreateNewCube(); } void CreateNewCube() { GameObject newCube = Instantiate(cubePrefab, Vector3.zero, Quaternion.identity); newCube.name = "Cube"; } }