UEVR_UObjectHook

What is UObjectHook?

UObjectHook is a UEVR defined class that hooks into the UObject creation and destruction process. It is used to track UObject instances with minimal performance overhead.

It is also used to add motion controls.

UObjectHook uses all static functions.

Functions

UEVR_UObjectHook.activate

Activates the UObjectHook. Some of the below functions automatically activate the UObjectHook if it is not already active.

UEVR_UObjectHook.exists(obj: UObject*)

Returns true if the specified UObject currently exists.

UEVR_UObjectHook.is_disabled

Returns true if the UObjectHook is disabled.

UEVR_UObjectHook.set_disabled(disabled: bool)

Sets the disabled state of the UObjectHook.

UEVR_UObjectHook.get_first_object_by_class(class: UClass*, allow_default: bool)

Returns the first UObject instance of the specified class. If allow_default is true, default objects are included in the search.

UEVR_UObjectHook.get_objects_by_class(class: UClass*, allow_default: bool)

Returns an array of UObject instances of the specified class. If allow_default is true, default objects are included in the array.

UEVR_UObjectHook.get_or_add_motion_controller_state(obj: UObject*)

Returns the motion controller state for the specified UObject. If the state does not exist, it is created.

UEVR_UObjectHook.get_motion_controller_state(obj: UObject*)

Returns the motion controller state for the specified UObject. If the state does not exist, returns nil.