Class ModCollider
Abstract base class for all collider types supported for mods.
Implements
Inherited Members
Namespace: Modding.Serialization
Assembly: Assembly-CSharp.dll
Syntax
public abstract class ModCollider : Element, IValidatable
Constructors
ModCollider()
Declaration
protected ModCollider()
Properties
IgnoreForGhost
Whether the collider should be ignored for the ghost colliders.
Declaration
public bool IgnoreForGhost { get; set; }
Property Value
Type | Description |
---|---|
Boolean |
Layer
Layer of the collider, if manually specified.
Declaration
public int Layer { get; set; }
Property Value
Type | Description |
---|---|
Int32 |
LayerSpecified
Declaration
public bool LayerSpecified { get; set; }
Property Value
Type | Description |
---|---|
Boolean |
Position
Local position of the collider.
Declaration
public Vector3 Position { get; set; }
Property Value
Type | Description |
---|---|
Vector3 |
Trigger
Whether the collider is a trigger.
Declaration
public bool Trigger { get; set; }
Property Value
Type | Description |
---|---|
Boolean |
Methods
CreateCollider(Transform)
Creates a game object with a collider attached, set up according to the ModCollider instance.
Declaration
public abstract Collider CreateCollider(Transform parent)
Parameters
Type | Name | Description |
---|---|---|
UnityEngine.Transform | parent | Transform the new object should be a child of. |
Returns
Type | Description |
---|---|
UnityEngine.Collider | The new Collider component. |
CreateVisual(Transform)
Creates a debug visual object to represent this collider.
Declaration
public abstract Transform CreateVisual(Transform parent)
Parameters
Type | Name | Description |
---|---|---|
UnityEngine.Transform | parent | Transform the new object should be a child of. |
Returns
Type | Description |
---|---|
UnityEngine.Transform | The Transform of the new object. |