Contact Us

CATEGORIES

Whoops…Nothing found

Try other keywords in your search

Control Lua Core

 0 Minutes

 0 Likes

 563 Views

Reload Control Core

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
  • change code in a module
  • manually triggered
  • actions added via code (dynamicRebuild)

This can be recognized in the log by these messages:


 

Effects of the Reload

All modules are uninitialized then the core is unloaded the core is rebuilt and all action 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 code is called when the module is initiated. Here you can call the init with a delay:

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:

This may be necessary in certain situations.

 


 

Pixera 2.0.124 | 12. July 2024 | J.B.

Was this article helpful?