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

Method LoadCorlib

Source/Engine/Scripting/Runtime/DotNet.cpp:854–890  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

852}
853
854bool MAssembly::LoadCorlib()
855{
856 if (IsLoaded())
857 return false;
858 PROFILE_CPU();
859 PROFILE_MEM(ScriptingCSharp);
860#if TRACY_ENABLE
861 const StringAnsiView name("Corlib");
862 ZoneText(*name, name.Length());
863#endif
864
865 // Ensure to be unloaded
866 Unload();
867
868 // Start
869 Stopwatch stopwatch;
870 OnLoading();
871
872 // Load
873 {
874 static void* GetAssemblyByNamePtr = GetStaticMethodPointer(TEXT("GetAssemblyByName"));
875 _handle = CallStaticMethod<void*, const char*>(GetAssemblyByNamePtr, "System.Private.CoreLib");
876 GetAssemblyName(_handle, _name, _fullname);
877 }
878 if (_handle == nullptr)
879 {
880 OnLoadFailed();
881 return true;
882 }
883 _hasCachedClasses = false;
884 _canReload = false;
885 CachedAssemblyHandles.Add(_handle, this);
886
887 // End
888 OnLoaded(stopwatch);
889 return false;
890}
891
892bool MAssembly::LoadImage(const String& assemblyPath, const StringView& nativePath)
893{

Callers

nothing calls this directly

Calls 6

GetStaticMethodPointerFunction · 0.85
GetAssemblyNameFunction · 0.85
IsLoadedFunction · 0.50
UnloadFunction · 0.50
LengthMethod · 0.45
AddMethod · 0.45

Tested by

no test coverage detected