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

Method load

Source/Engine/Content/Assets/AnimationGraph.cpp:27–51  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

25}
26
27Asset::LoadResult AnimationGraph::load()
28{
29 PROFILE_MEM(AnimationsData);
30
31 // Get stream with graph data
32 const auto surfaceChunk = GetChunk(0);
33 if (surfaceChunk == nullptr)
34 return LoadResult::MissingDataChunk;
35 MemoryReadStream stream(surfaceChunk->Get(), surfaceChunk->Size());
36
37 // Load graph
38 if (Graph.Load(&stream, USE_EDITOR))
39 {
40 LOG(Warning, "Failed to load animation graph \'{0}\'", ToString());
41 return LoadResult::Failed;
42 }
43
44#if USE_EDITOR
45 // Find asset dependencies to nested anim graph functions
46 ClearDependencies();
47 FindDependencies(&Graph);
48#endif
49
50 return LoadResult::Ok;
51}
52
53void AnimationGraph::unload(bool isReloading)
54{

Callers

nothing calls this directly

Calls 5

GetChunkFunction · 0.85
ToStringFunction · 0.50
GetMethod · 0.45
SizeMethod · 0.45
LoadMethod · 0.45

Tested by

no test coverage detected