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

Method Load

Source/Engine/Scripting/Runtime/Mono.cpp:1099–1129  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1097}
1098
1099bool MAssembly::Load(MonoImage* monoImage)
1100{
1101 if (IsLoaded())
1102 return false;
1103 PROFILE_CPU();
1104#if TRACY_ENABLE
1105 const StringAnsiView monoImageName(mono_image_get_name(monoImage));
1106 ZoneText(*monoImageName, monoImageName.Length());
1107#endif
1108
1109 // Ensure to be unloaded
1110 Unload();
1111
1112 // Start
1113 Stopwatch stopwatch;
1114 OnLoading();
1115
1116 // Load
1117 _monoAssembly = mono_image_get_assembly(monoImage);
1118 if (_monoAssembly == nullptr)
1119 {
1120 OnLoadFailed();
1121 return true;
1122 }
1123 _monoImage = monoImage;
1124 _hasCachedClasses = false;
1125
1126 // End
1127 OnLoaded(stopwatch);
1128 return false;
1129}
1130
1131bool MAssembly::LoadCorlib()
1132{

Callers

nothing calls this directly

Calls 3

IsLoadedFunction · 0.50
UnloadFunction · 0.50
LengthMethod · 0.45

Tested by

no test coverage detected