I am trying to load a scene that has a ScriptInstance attached to it. The Start() method of the script does not fire though. Inspecting the scene xml file, i have the following component attached to the scene node
<component type="ScriptInstance" id="10">
<attribute name="Delayed Method Calls" value="0" />
<attribute name="Script File" value="ScriptFile;Scripts/TestInstance.as" />
<attribute name="Class Name" value="BasicInput" />
</component>
How can you make a script auto execute ?
Note, in the cpp file that generated the scene xml file, the following code was executed
ScriptInstance* instance = scene_->CreateComponent<ScriptInstance>();
result = instance->CreateObject(cache->GetResource<ScriptFile>("Scripts/TestInstance.as"), "DoSomething");
instance->Execute("void Start()");