Legacy Documentation: Version 4.5.0

Script language:

  • JS
  • C#
  • Boo
Script language

Select your preferred scripting language. All code snippets will be displayed in this language.

CreatePrimitive(sides: int, scale: Vector2 = Vector2.one, offset: Vector2 = Vector2.zero): void;
void CreatePrimitive(int sides, Vector2 scale = Vector2.one, Vector2 offset = Vector2.zero);
def CreatePrimitive(sides as int, scale as Vector2 = Vector2.one, offset as Vector2 = Vector2.zero) as void

Parameters

sidesThe number of sides in the polygon. This must be greater than two.
scaleThe X/Y scale of the polygon. These must be greater than zero.
offsetThe X/Y offset of the polygon.

Description

Creates as regular primitive polygon with the specified number of sides.