🪝Transform Hook
✔
Last updated
✔
Last updated
The Transform Hook Component uses a Transform Scriptable Variable to link at Runtime a Transform in the scene, so it can be access by any script or component during gameplay. This way of creating references, is mainly to avoid dependencies, or the use of Singletons in your Project.
It will store a Transform on the OnEnable callback on the Transform Scriptable Variable , and It will remove it on Disable.
Scriptable Assets cannot store scenes references. That is why this is done at runtime.
The transform Scriptable variable that it will be used to store the transform reference at runtime.
The Transform value used on the scriptable variable
void UpdateHook()
Updates the value on the Transform scriptable variable
void DisableHook()
Set the value of the Transform scriptable variable to Null