Add script runtime lifecycle skeleton
This commit is contained in:
@@ -1,5 +1,7 @@
|
||||
#include "Scripting/ScriptComponent.h"
|
||||
|
||||
#include "Scripting/ScriptEngine.h"
|
||||
|
||||
#include <random>
|
||||
#include <sstream>
|
||||
|
||||
@@ -44,6 +46,18 @@ std::string ScriptComponent::GetFullClassName() const {
|
||||
return m_namespaceName + "." + m_className;
|
||||
}
|
||||
|
||||
void ScriptComponent::OnEnable() {
|
||||
ScriptEngine::Get().OnScriptComponentEnabled(this);
|
||||
}
|
||||
|
||||
void ScriptComponent::OnDisable() {
|
||||
ScriptEngine::Get().OnScriptComponentDisabled(this);
|
||||
}
|
||||
|
||||
void ScriptComponent::OnDestroy() {
|
||||
ScriptEngine::Get().OnScriptComponentDestroyed(this);
|
||||
}
|
||||
|
||||
void ScriptComponent::Serialize(std::ostream& os) const {
|
||||
os << "scriptComponentUUID=" << m_scriptComponentUUID << ";";
|
||||
os << "assembly=" << EscapeScriptString(m_assemblyName) << ";";
|
||||
|
||||
Reference in New Issue
Block a user