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

Method load

Source/Engine/Content/Assets/AnimationGraphFunction.cpp:22–47  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

20}
21
22Asset::LoadResult AnimationGraphFunction::load()
23{
24 PROFILE_MEM(AnimationsData);
25
26 // Get graph data from chunk
27 const auto surfaceChunk = GetChunk(0);
28 if (!surfaceChunk || !surfaceChunk->IsLoaded())
29 return LoadResult::MissingDataChunk;
30 GraphData.Swap(surfaceChunk->Data);
31
32 // Load graph
33 MemoryReadStream stream(GraphData.Get(), GraphData.Length());
34 AnimGraph graph(this, true);
35 if (graph.Load(&stream, false))
36 return LoadResult::Failed;
37
38 // Load function signature
39 // Note: search also the nested state machines graphs (state output and transition rule)
40 ProcessGraphForSignature(&graph, true);
41 if (Inputs.Count() >= 16 || Outputs.Count() >= 16)
42 {
43 LOG(Error, "Too many function inputs/outputs in '{0}'. The limit is max 16 inputs and max 16 outputs.", ToString());
44 }
45
46 return LoadResult::Ok;
47}
48
49void AnimationGraphFunction::unload(bool isReloading)
50{

Callers

nothing calls this directly

Calls 8

GetChunkFunction · 0.85
ToStringFunction · 0.50
IsLoadedMethod · 0.45
SwapMethod · 0.45
GetMethod · 0.45
LengthMethod · 0.45
LoadMethod · 0.45
CountMethod · 0.45

Tested by

no test coverage detected