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

Method GetManagedInstance

Source/Engine/Scripting/ScriptingObject.cpp:136–148  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

134}
135
136MObject* ScriptingObject::GetManagedInstance() const
137{
138#if USE_NETCORE
139 const MGCHandle handle = Platform::AtomicRead((int64*)&_gcHandle);
140#elif USE_MONO
141 const MGCHandle handle = Platform::AtomicRead((int32*)&_gcHandle);
142#endif
143#if USE_CSHARP
144 return handle ? MCore::GCHandle::GetTarget(handle) : nullptr;
145#else
146 return nullptr;
147#endif
148}
149
150MObject* ScriptingObject::GetOrCreateManagedInstance() const
151{

Callers 9

InitCustomNodeMethod · 0.45
FindObjectMethod · 0.45
BoxMethod · 0.45
ToManagedArrayMethod · 0.45
BoxMethod · 0.45
ToManagedArrayMethod · 0.45
ToManagedArrayMethod · 0.45
OnSpawnMethod · 0.45
OnBakeEventFunction · 0.45

Calls 1

AtomicReadFunction · 0.50

Tested by

no test coverage detected