The Control Core is rebuilt during the setup for various Actions. A new build means that the complete Control code is reinitialized, which is necessary for certain Actions.
- Adding an Action in an existing Module.
- Change an Action in an existing Module.
- Adding a Module to the Workspace.
- Changing code in a Module's Action.
- Manually triggering the reload.
- Creating Actions added via code (LUA Dynamic Rebuild Actions)
A reload having occurred can be recognized in the log by these messages:

Effects of the Reload
When the Core is reloaded, all Modules are uninitialized, all Actions with attributes are reloaded with the data stored in the project, and the Modules are initialized again if they are set to Auto Init.
It can happen that values from the attributes are not yet available at the time the “init” Action code is called when the Module is initiated. To avoid this, you can add a delay in the “init” Action:
Utils.Timer.sleep(1000)
or with a nil check which checks whether the variable is nil and if so a delay is executed and checked again. Make sure not to use a while loop here.
for i=1,20,1 do
if self._ActionWithAttribute == nil then
Utils.Timer.sleep(1000)
else
break
end
end
Trigger Manual Core Reload
There is a button in Control with which the core reload can be executed manually:

This may be necessary in certain situations, such as Control becoming overloaded and needing reset.
Pixera 2.0.124 | 12. July 2024 | J.B.