ProtoFlux:Get Object Root: Difference between revisions

From Resonite Wiki
m gallery
m fix titles
Line 13: Line 13:
|}}
|}}


Returns the root [[Slot | slot]] of an object from one slot input which is a child of the specified object.
Returns the root [[Slot|slot]] of an object from one slot input which is a child of the specified object.


== Inputs ==
== Inputs ==


=== Instance ===
=== Instance ([[Slot|Slot]]) ===


A [[Type:Slot | slot]] within the object you want the root of.
A [[Type:Slot | slot]] within the object you want the root of.


=== OnlyExplicit ===
=== OnlyExplicit ([[Type:Bool|bool]]) ===


If this is true, it will explicitly look for slots which have a ObjectRoot component.
If this is true, it will explicitly look for slots which have a ObjectRoot component.
Line 35: Line 35:
== Outputs ==
== Outputs ==


=== * ===
=== * ([[Slot|Slot]]) ===


Will return a [[Type:Slot | slot]] being the root of the object.
Will return a [[Slot|slot]] being the root of the object.


If no such component is found, the initial slot itself will be returned.
If no such component is found, the initial slot itself will be returned.

Revision as of 02:06, 10 February 2024

Get Object Root
Instance
*
OnlyExplicit
Slots

Returns the root slot of an object from one slot input which is a child of the specified object.

Inputs

Instance (Slot)

A slot within the object you want the root of.

OnlyExplicit (bool)

If this is true, it will explicitly look for slots which have a ObjectRoot component.

If this is false, it will look for slots containing a component which implements IObjectRoot. These include:

  • LegacyPanel
  • SceneInspector
  • ObjectRoot
  • Grabbable
  • ProtoFluxNode

Outputs

* (Slot)

Will return a slot being the root of the object.

If no such component is found, the initial slot itself will be returned.

Examples

Using this node on a hit collider slot of a Grabbable object with OnlyExplicit set to false you can get the slot containing the Grabbable component which is most likely going to be the object's root, even if the object doesn't have a explicit ObjectRoot component.