Class HierarchyComponent
Defines hierarchy that can have child objects attached or parent object
Use AttachChild and DetachChild on parent object to manipulate hierarchy of objects
Inheritance
System.Object
HierarchyComponent
Implements
System.ComponentModel.INotifyPropertyChanged
Assembly: Eco.Gameplay.dll
Syntax
[AlwaysMayBeComponent]
public class HierarchyComponent : WorldObjectComponent, ILinkable, IOwned, IController, IViewController, IHasUniversalID, IHasSerializableID, IRPCAuthChecks, INotifyPropertyChanged, IThreadSafeSubscriptions, ISubscriptions<ThreadSafeSubscriptions>, ISubscriptions, IHasInteractions, IPickupConfirmationComponent
Constructors
HierarchyComponent()
Declaration
public HierarchyComponent()
Fields
HierarchyChangedEvent
Event to notify about hierarchy changed about (if this object attached or detached) contains old and new object
Declaration
public ThreadSafeAction<WorldObject, WorldObject> HierarchyChangedEvent
Field Value
Properties
AttachedObjects
All child objects attached to this object
Declaration
public IEnumerable<WorldObjectHandle> AttachedObjects { get; }
Property Value
AttachedTo
Declaration
public WorldObjectHandle AttachedTo { get; }
Property Value
AttachedToNetObjID
Declaration
public int AttachedToNetObjID { get; }
Property Value
| Type |
Description |
| System.Int32 |
|
HasAttachments
Declaration
public bool HasAttachments { get; }
Property Value
| Type |
Description |
| System.Boolean |
|
IsAttached
Declaration
public bool IsAttached { get; }
Property Value
| Type |
Description |
| System.Boolean |
|
Methods
AllAttachedRecursive()
Returns all objects attached to us, as well as to attached to an attached object, etc
Declaration
public IEnumerable<WorldObject> AllAttachedRecursive()
Returns
| Type |
Description |
| System.Collections.Generic.IEnumerable<WorldObject> |
|
AllAttachedRecursive(WorldObject)
Returns an enumerable all attached (recursive) objects without self.
Declaration
public static IEnumerable<WorldObject> AllAttachedRecursive(WorldObject obj)
Parameters
Returns
| Type |
Description |
| System.Collections.Generic.IEnumerable<WorldObject> |
|
AllAttachedRecursiveAndSelf(WorldObject)
Returns an enumerable containing us as well as all attached (recursive) objects.
Declaration
public static IEnumerable<WorldObject> AllAttachedRecursiveAndSelf(WorldObject obj)
Parameters
Returns
| Type |
Description |
| System.Collections.Generic.IEnumerable<WorldObject> |
|
ApplyHierarchyDeltaToChildren(Vector3, Quaternion, Vector3, Quaternion)
Applies parent object pos and rot delta to all child attached objects recursively
Declaration
public void ApplyHierarchyDeltaToChildren(Vector3 posBefore, Quaternion rotBefore, Vector3 posAfter, Quaternion rotAfter)
Parameters
| Type |
Name |
Description |
| System.Numerics.Vector3 |
posBefore |
|
| Quaternion |
rotBefore |
|
| System.Numerics.Vector3 |
posAfter |
|
| Quaternion |
rotAfter |
|
AttachChild(WorldObject)
Attaches target object to this as a child
Declaration
public void AttachChild(WorldObject child)
Parameters
Destroy()
Declaration
public override void Destroy()
Overrides
DetachChild(WorldObject)
Detaches target object from this as a child
Declaration
public void DetachChild(WorldObject child)
Parameters
HasAttachedObjects(WorldObject)
Checks if object has hierarchy component and has object attached to it
Declaration
public static bool HasAttachedObjects(WorldObject obj)
Parameters
Returns
| Type |
Description |
| System.Boolean |
|
Explicit Interface Implementations
IPickupConfirmationComponent.GetComponentPickupConfirmation()
Declaration
LocString IPickupConfirmationComponent.GetComponentPickupConfirmation()
Returns
Implements
System.ComponentModel.INotifyPropertyChanged
Extension Methods