Class Primitive
A wrapper class for AdminToys.PrimitiveObjectToy.
Inherited Members
Namespace: Exiled.API.Features.Toys
Assembly: Exiled.API.dll
Syntax
public class Primitive : AdminToy, IWorldSpace, IPosition, IRotation, IWrapper<PrimitiveObjectToy>
Properties
| Improve this Doc View SourceBase
Gets the base AdminToys.PrimitiveObjectToy.
Declaration
public PrimitiveObjectToy Base { get; }
Property Value
Type | Description |
---|---|
AdminToys.PrimitiveObjectToy |
Collidable
Gets or sets a value indicating whether the primitive can be collided with.
Declaration
public bool Collidable { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean |
Color
Gets or sets the material color of the primitive.
Declaration
public Color Color { get; set; }
Property Value
Type | Description |
---|---|
UnityEngine.Color |
Type
Gets or sets the type of the primitive.
Declaration
public PrimitiveType Type { get; set; }
Property Value
Type | Description |
---|---|
UnityEngine.PrimitiveType |
Methods
| Improve this Doc View SourceCreate(PrimitiveSettings)
Creates a new Primitive.
Declaration
public static Primitive Create(PrimitiveSettings primitiveSettings)
Parameters
Type | Name | Description |
---|---|---|
PrimitiveSettings | primitiveSettings | The settings of the Primitive. |
Returns
Type | Description |
---|---|
Primitive | The new Primitive. |
Create(Nullable<Vector3>, Nullable<Vector3>, Nullable<Vector3>, Boolean)
Creates a new Primitive.
Declaration
public static Primitive Create(Vector3? position = null, Vector3? rotation = null, Vector3? scale = null, bool spawn = true)
Parameters
Type | Name | Description |
---|---|---|
System.Nullable<UnityEngine.Vector3> | position | The position of the Primitive. |
System.Nullable<UnityEngine.Vector3> | rotation | The rotation of the Primitive. |
System.Nullable<UnityEngine.Vector3> | scale | The scale of the Primitive. |
System.Boolean | spawn | Whether or not the Primitive should be initially spawned. |
Returns
Type | Description |
---|---|
Primitive | The new Primitive. |
Create(Nullable<Vector3>, Nullable<Vector3>, Nullable<Vector3>, Boolean, Nullable<Color>)
Creates a new Primitive.
Declaration
public static Primitive Create(Vector3? position, Vector3? rotation, Vector3? scale, bool spawn, Color? color)
Parameters
Type | Name | Description |
---|---|---|
System.Nullable<UnityEngine.Vector3> | position | The position of the Primitive. |
System.Nullable<UnityEngine.Vector3> | rotation | The rotation of the Primitive. |
System.Nullable<UnityEngine.Vector3> | scale | The scale of the Primitive. |
System.Boolean | spawn | Whether or not the Primitive should be initially spawned. |
System.Nullable<UnityEngine.Color> | color | The color of the Primitive. |
Returns
Type | Description |
---|---|
Primitive | The new Primitive. |
Create(PrimitiveType, Nullable<Vector3>, Nullable<Vector3>, Nullable<Vector3>, Boolean)
Creates a new Primitive.
Declaration
public static Primitive Create(PrimitiveType primitiveType = PrimitiveType.Sphere, Vector3? position = null, Vector3? rotation = null, Vector3? scale = null, bool spawn = true)
Parameters
Type | Name | Description |
---|---|---|
UnityEngine.PrimitiveType | primitiveType | The type of primitive to spawn. |
System.Nullable<UnityEngine.Vector3> | position | The position of the Primitive. |
System.Nullable<UnityEngine.Vector3> | rotation | The rotation of the Primitive. |
System.Nullable<UnityEngine.Vector3> | scale | The scale of the Primitive. |
System.Boolean | spawn | Whether or not the Primitive should be initially spawned. |
Returns
Type | Description |
---|---|
Primitive | The new Primitive. |
Create(PrimitiveType, Nullable<Vector3>, Nullable<Vector3>, Nullable<Vector3>, Boolean, Nullable<Color>)
Creates a new Primitive.
Declaration
public static Primitive Create(PrimitiveType primitiveType, Vector3? position, Vector3? rotation, Vector3? scale, bool spawn, Color? color)
Parameters
Type | Name | Description |
---|---|---|
UnityEngine.PrimitiveType | primitiveType | The type of primitive to spawn. |
System.Nullable<UnityEngine.Vector3> | position | The position of the Primitive. |
System.Nullable<UnityEngine.Vector3> | rotation | The rotation of the Primitive. |
System.Nullable<UnityEngine.Vector3> | scale | The scale of the Primitive. |
System.Boolean | spawn | Whether or not the Primitive should be initially spawned. |
System.Nullable<UnityEngine.Color> | color | The color of the Primitive. |
Returns
Type | Description |
---|---|
Primitive | The new Primitive. |
Get(PrimitiveObjectToy)
Gets the Primitive belonging to the AdminToys.PrimitiveObjectToy.
Declaration
public static Primitive Get(PrimitiveObjectToy primitiveObjectToy)
Parameters
Type | Name | Description |
---|---|---|
AdminToys.PrimitiveObjectToy | primitiveObjectToy | The AdminToys.PrimitiveObjectToy instance. |
Returns
Type | Description |
---|---|
Primitive | The corresponding Primitive instance. |