You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
A JavaScript code block has by default "runtimeScene" as the first argument, then an optional "objects", then eventsFunctionContext.
In practice, this "runtimeScene" is NOT the runtime scene for objects and behaviors. Instead, it's the instance container.
We should probably not encourage using runtimeScene inside a function of a behavior and object. Instead, we could:
keep runtimeScene for JS functions in scene events
keep only eventsFunctionContext for JS functions in scene events and expose getInstancesContainer() on eventsFunctionsContext. Make an invisible const runtimeScene = this._instanceContainer.getScene() to keep compatibility.
(bonus not linked to JS functions) Rework code generation to use eventsFunctionsContext.getInstancesContainer() instead of runtimeScene?
If we search "runtimeScene" in all .cpp/.h files, usage is already fairly low.
The text was updated successfully, but these errors were encountered:
A JavaScript code block has by default "runtimeScene" as the first argument, then an optional "objects", then
eventsFunctionContext
.In practice, this "runtimeScene" is NOT the runtime scene for objects and behaviors. Instead, it's the instance container.
We should probably not encourage using runtimeScene inside a function of a behavior and object. Instead, we could:
runtimeScene
for JS functions in scene eventseventsFunctionContext
for JS functions in scene events and exposegetInstancesContainer()
on eventsFunctionsContext. Make an invisibleconst runtimeScene = this._instanceContainer.getScene()
to keep compatibility.eventsFunctionsContext.getInstancesContainer()
instead ofruntimeScene
?The text was updated successfully, but these errors were encountered: