UnityScripterAI
Discord ↗
Link Copied to Clipboard
×
"create a cube"
using UnityEngine; public class CreateCube : MonoBehaviour { // Use this for initialization void Start () { // Create a new cube primitive GameObject cube = GameObject.CreatePrimitive(PrimitiveType.Cube); // Optionally set the cube's position cube.transform.position = new Vector3(0, 0, 0); } }