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

Method Load

Source/Engine/Scripting/ManagedCLR/MCore.cpp:93–125  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

91}
92
93bool MAssembly::Load(const String& assemblyPath, const StringView& nativePath)
94{
95 if (IsLoaded())
96 return false;
97 PROFILE_CPU();
98 PROFILE_MEM(ScriptingCSharp);
99 ZoneText(*assemblyPath, assemblyPath.Length());
100 Stopwatch stopwatch;
101
102 const String* pathPtr = &assemblyPath;
103 String path;
104 if (!FileSystem::FileExists(assemblyPath))
105 {
106 path = assemblyPath;
107 pathPtr = &path;
108 if (ResolveMissingFile(path))
109 {
110 Log::FileNotFoundException ex(assemblyPath);
111 return true;
112 }
113 }
114
115 OnLoading();
116
117 if (LoadImage(*pathPtr, nativePath))
118 {
119 OnLoadFailed();
120 return true;
121 }
122
123 OnLoaded(stopwatch);
124 return false;
125}
126
127void MAssembly::Unload(bool isReloading)
128{

Callers

nothing calls this directly

Calls 2

IsLoadedFunction · 0.70
LengthMethod · 0.45

Tested by

no test coverage detected