Skip to main content

GameObject.CreatePrimitive(PrimitiveType type)

Creates a game object with a primitive mesh renderer and appropriate collider.

Parameters:

NameTypeDescription
typePrimitiveTypeThe type of primitive object to create.

Returns:

typeDescription
GameObjectcreated game object

Usage

---@type PrimitiveType
local type;


local val0 = GameObject:CreatePrimitive(type)