MCPcopy Create free account
hub / github.com/TorqueGameEngines/Torque3D / setVariable

Function setVariable

Engine/source/console/console.cpp:856–870  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

854}
855
856void setVariable(const char *name, const char *value)
857{
858 SimObject *obj = NULL;
859 const char *objField = NULL;
860
861 if (getVariableObjectField(name, &obj, &objField))
862 {
863 obj->setDataField(StringTable->insert(objField), 0, value);
864 }
865 else
866 {
867 name = prependDollar(name);
868 gEvalState.globalVars.setVariable(StringTable->insert(name), value);
869 }
870}
871
872void setBoolVariable(const char *varName, bool value)
873{

Callers 15

updateMethod · 0.85
saveMethod · 0.85
restoreMethod · 0.85
initFunction · 0.85
CMDerrorFunction · 0.85
createMethod · 0.85
createMaterialMethod · 0.85
createMaterialMethod · 0.85
loadModuleGroupMethod · 0.85
DefineNewEngineFunctionFunction · 0.85
MaterialManagerMethod · 0.85

Calls 5

getVariableObjectFieldFunction · 0.85
prependDollarFunction · 0.85
setDataFieldMethod · 0.45
insertMethod · 0.45
setVariableMethod · 0.45

Tested by

no test coverage detected