Show / Hide Table of Contents

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
WorldObjectComponent
HierarchyComponent
Implements
ILinkable
IOwned
IController
IViewController
IHasUniversalID
IHasSerializableID
IRPCAuthChecks
System.ComponentModel.INotifyPropertyChanged
IThreadSafeSubscriptions
ISubscriptions<ThreadSafeSubscriptions>
ISubscriptions
IHasInteractions
IPickupConfirmationComponent
Inherited Members
WorldObjectComponent.IsRPCAuthorized(IWorldObserver, AccessType, Object[])
WorldObjectComponent.Initialize()
WorldObjectComponent.PostInitialize()
WorldObjectComponent.OnCreate()
WorldObjectComponent.Tick()
WorldObjectComponent.LateTick()
WorldObjectComponent.TryPickup(Player, InventoryChangeSet, Inventory, Boolean)
WorldObjectComponent.OnPickup(Player)
WorldObjectComponent.OnBeforeObjectMoved()
WorldObjectComponent.OnAfterObjectMoved()
WorldObjectComponent.OnComponentAddedPostInit(WorldObjectComponent)
WorldObjectComponent.OnLinkClicked(TooltipOrigin, TooltipClickContext, User)
WorldObjectComponent.UILinkContent()
WorldObjectComponent.Parent
WorldObjectComponent.Name
WorldObjectComponent.IconName
WorldObjectComponent.ForceActiveTab
WorldObjectComponent.ComponentPrefabName
WorldObjectComponent.ComponentTabName
WorldObjectComponent.Enabled
WorldObjectComponent.IsDestroyed
WorldObjectComponent.Availability
WorldObjectComponent.ShouldRequestEverything
WorldObjectComponent.Owners
WorldObjectComponent.ControllerID
WorldObjectComponent.IOwned.Deed
WorldObjectComponent.Subscriptions
WorldObjectComponent.PropertyChanged
Namespace: Eco.Gameplay.Components
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
Type Description
ThreadSafeAction<WorldObject, WorldObject>

Properties

AttachedObjects

All child objects attached to this object

Declaration
public IEnumerable<WorldObjectHandle> AttachedObjects { get; }
Property Value
Type Description
System.Collections.Generic.IEnumerable<WorldObjectHandle>

AttachedTo

Declaration
public WorldObjectHandle AttachedTo { get; }
Property Value
Type Description
WorldObjectHandle

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
Type Name Description
WorldObject obj
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
Type Name Description
WorldObject obj
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
Type Name Description
WorldObject child

Destroy()

Declaration
public override void Destroy()
Overrides
WorldObjectComponent.Destroy()

DetachChild(WorldObject)

Detaches target object from this as a child

Declaration
public void DetachChild(WorldObject child)
Parameters
Type Name Description
WorldObject child

HasAttachedObjects(WorldObject)

Checks if object has hierarchy component and has object attached to it

Declaration
public static bool HasAttachedObjects(WorldObject obj)
Parameters
Type Name Description
WorldObject obj
Returns
Type Description
System.Boolean

Explicit Interface Implementations

IPickupConfirmationComponent.GetComponentPickupConfirmation()

Declaration
LocString IPickupConfirmationComponent.GetComponentPickupConfirmation()
Returns
Type Description
LocString

Implements

ILinkable
IOwned
IController
IViewController
IHasUniversalID
IHasSerializableID
IRPCAuthChecks
System.ComponentModel.INotifyPropertyChanged
IThreadSafeSubscriptions
ISubscriptions<TSubscriptionsList>
ISubscriptions
IHasInteractions
IPickupConfirmationComponent

Extension Methods

TagUtils.TagNames(Object, Boolean)
TagUtils.TagDisplayNames(Object, Boolean)
ClientSetViewExtensions.SetClassOfProperty(Object, Player, String, String, Int32)
TypeTooltipExtensions.UILinkGeneric(Object)
☀
☾
In This Article
Back to top
Copyright (c) Strange Loop Games 2021
☀
☾