MCPcopy Create free account
hub / github.com/antopilo/Nuake / GetEntityScript

Method GetEntityScript

Nuake/Source/Nuake/Scripting/ScriptingEngineNet.cpp:733–744  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

731 }
732
733 Coral::ManagedObject* ScriptingEngineNet::GetEntityScript(const Entity& entity)
734 {
735 if (!HasEntityScriptInstance(entity))
736 {
737 std::string name = entity.GetComponent<NameComponent>().Name;
738 Logger::Log(name);
739 Logger::Log("Failed to get entity .Net script instance, doesn't exist", ".net", CRITICAL);
740 return nullptr;
741 }
742
743 return &entityToManagedObjects[entity.GetID()];
744 }
745
746 bool ScriptingEngineNet::HasEntityScriptInstance(const Entity& entity)
747 {

Callers 7

InitMethod · 0.80
UpdateMethod · 0.80
FixedUpdateMethod · 0.80
ExitMethod · 0.80
GetEntityScriptFromNameFunction · 0.80

Calls 2

LogFunction · 0.85
GetIDMethod · 0.45

Tested by

no test coverage detected