Skip to content

RSDK_THIS

Description

Defines local pointer self pointing to sceneInfo->entity using the given object's entity struct.

Parameters

class

The name of the object to use the entity struct for.

Return Value

None.

Syntax

RSDK_THIS(class);

Example

RSDK_THIS(MyObject);

Note

This is a macro, which is designed to make programming in RSDK easier. The underlying logic is:

Entity##class *self = (Entity##class *)SceneInfo->entity
auto *self = (class *)sceneInfo->entity

The underlying logic should NEVER be used as it's less safe than the macro. This note is here for anyone wishing to learn about the internals or hoping to develop a wrapper for another language that doesn't support macros.