ColliderData
ThaumielMapEditor.API.Data
Overview​
Properties​
| Name | Type | Access | Description |
|---|---|---|---|
LocalPosition | Vector3 | get set | Gets or sets the position of the collider local to its parent object. |
Rotation | Quaternion | get set | Gets or sets the rotaion of the collider |
Size | Vector3 | get set | Gets or sets the size of the collider. |
Type | ColliderType | get set | The ThaumielMapEditor.API.Enums.ColliderType of this collider. |
Methods​
| Signature | Returns | Description |
|---|---|---|
GetTypeFromCollider(Collider) | ColliderType | Determines 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​
| Name | Type | Description |
|---|---|---|
collider | Collider | The 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​
| Name | Type | Description |
|---|---|---|
gameObject | GameObject | The 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)