Skip to main content

ColliderData

class ThaumielMapEditor.API.Data

Overview​

Properties​

NameTypeAccessDescription
LocalPositionVector3get setGets or sets the position of the collider local to its parent object.
RotationQuaternionget setGets or sets the rotaion of the collider
SizeVector3get setGets or sets the size of the collider.
TypeColliderTypeget setThe ThaumielMapEditor.API.Enums.ColliderType of this collider.

Methods​

SignatureReturnsDescription
GetTypeFromCollider(Collider)ColliderTypeDetermines the specific collider type for the given Unity collider instance.
ParseObjectColliders(GameObject)IEnumerable<ColliderData>Parses all of the UnityEngine.Colliders from a UnityEngine.GameObject into `…

Properties​

LocalPosition​

Type: Vector3 Access: get set

Gets or sets the position of the collider local to its parent object.


Rotation​

Type: Quaternion Access: get set

Gets or sets the rotaion of the collider


Size​

Type: Vector3 Access: get set

Gets or sets the size of the collider.


Type​

Type: ColliderType Access: get set

The ThaumielMapEditor.API.Enums.ColliderType of this collider.


Methods​

GetTypeFromCollider​

GetTypeFromCollider
public ColliderType GetTypeFromCollider(Collider collider)

Determines the specific collider type for the given Unity collider instance.

Parameters​

NameTypeDescription
colliderColliderThe collider instance to evaluate. Must be a non-null instance of a supported Unity collider type.

Returns​

ColliderType — A value of the ColliderType enumeration that corresponds to the type of the provided collider.


ParseObjectColliders​

ParseObjectColliders
public IEnumerable<ColliderData> ParseObjectColliders(GameObject gameObject)

Parses all of the UnityEngine.Colliders from a UnityEngine.GameObject into ThaumielMapEditor.API.Data.ColliderDatas

Parameters​

NameTypeDescription
gameObjectGameObjectThe UnityEngine.GameObject to parse.

Returns​

IEnumerable<ColliderData> — A enumerable containing all of the UnityEngine.Colliders

Exceptions​

warning
  • System.NotSupportedException` — Throws when a unsupported collider is parsed by `ThaumielMapEditor.API.Data.ColliderData.GetTypeFromCollider(UnityEngine.Collider)