Version: Unity 6 Preview (6000.0)
LanguageEnglish
  • C#

PrimitiveType.Cube

Description

A cube primitive.

Additional resources: GameObject.CreatePrimitive.

using UnityEngine;
using System.Collections;

// Creates a cube primitive

public class ExampleClass : MonoBehaviour { void Start() { GameObject cube = GameObject.CreatePrimitive(PrimitiveType.Cube); } }