Class Location
Component representing the Location trait.
Inherited Members
Namespace: Generated.Semantic.Traits
Syntax
[ExecuteAlways]
[DisallowMultipleComponent]
[AddComponentMenu("Semantic/Traits/Location (Trait)")]
[RequireComponent(typeof(SemanticObject))]
public class Location : MonoBehaviour, ITrait
Properties
Data
The component data representation of the trait.
Declaration
public LocationData Data { get; set; }
Property Value
Type | Description |
---|---|
LocationData |
Forward
The forward vector of the object.
Declaration
public Vector3 Forward { get; set; }
Property Value
Type | Description |
---|---|
Vector3 |
Position
The position of the object.
Declaration
public Vector3 Position { get; set; }
Property Value
Type | Description |
---|---|
Vector3 |
Transform
The transform of the object.
Declaration
public Transform Transform { get; set; }
Property Value
Type | Description |
---|---|
Transform |
Methods
Convert(Entity, EntityManager, GameObjectConversionSystem)
Converts and assigns the monobehaviour trait component data to the entity representation.
Declaration
public void Convert(Entity entity, EntityManager destinationManager, GameObjectConversionSystem _)
Parameters
Type | Name | Description |
---|---|---|
Entity | entity | The entity on which the trait data is to be assigned. |
EntityManager | destinationManager | The entity manager for the given entity. |
GameObjectConversionSystem | _ | An unused GameObjectConversionSystem parameter, needed for IConvertGameObjectToEntity. |