MCPcopy Create free account
hub / github.com/FlaxEngine/FlaxEngine / NewObject

Method NewObject

Source/Engine/Scripting/ScriptingObject.cpp:125–134  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

123}
124
125ScriptingObject* ScriptingObject::NewObject(const ScriptingTypeHandle& typeHandle)
126{
127 if (!typeHandle)
128 return nullptr;
129 auto& type = typeHandle.GetType();
130 if (type.Type != ScriptingTypes::Script)
131 return nullptr;
132 const ScriptingObjectSpawnParams params(Guid::New(), typeHandle);
133 return type.Script.Spawn(params);
134}
135
136MObject* ScriptingObject::GetManagedInstance() const
137{

Callers

nothing calls this directly

Calls 3

NewFunction · 0.50
GetTypeMethod · 0.45
SpawnMethod · 0.45

Tested by

no test coverage detected