OnRender and visual logic both execute on every frame render. So every 16ms-32ms.
Visual Logic has been developed specifically to operate this way. Visual logic is integrated into XPression so that it can't stall the render pipeline.
OnRender lets you do anything that the XPression script engine can do. Which means you can end up doing things that could cause the render pipeline to stall. Sometimes OnRender scripts can also negatively affect the performance of a scene, because the script in OnRender takes the engine a long time to run (long time being 16ms+), for whatever reason.
Its hard to give specific rules or guidelines about OnRender, because it will work, until it doesn't.
Generally I would try to avoid making and Engine.Whatever calls in OnRender.
Original Message:
Sent: 06-13-2024 11:29
From: Carlito Chippy
Subject: Scripting Position Change Based on Text Object Driven by Widget
Hi Garner, do you mind explaining why re OnRender vs VL?
------------------------------
Carlito Chippy
Original Message:
Sent: 06-12-2024 16:03
From: Garner Millward
Subject: Scripting Position Change Based on Text Object Driven by Widget
What Azathoth said!
Also I would avoid using OnRender if you can.
Anytime you find yourself using a script in OnRender you should stop and I think "Could I do this with visual logic instead?"
Original Message:
Sent: 06-12-2024 10:29
From: Avery Cook
Subject: Scripting Position Change Based on Text Object Driven by Widget
------------------------------
Avery Cook
Freelancer
Omaha United States
------------------------------