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

Method SaveTimeline

Source/Engine/Particles/ParticleSystem.cpp:118–143  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

116#if USE_EDITOR
117
118bool ParticleSystem::SaveTimeline(const BytesContainer& data) const
119{
120 if (OnCheckSave())
121 return true;
122 ScopeLock lock(Locker);
123
124 // Release all chunks
125 for (int32 i = 0; i < ASSET_FILE_DATA_CHUNKS; i++)
126 ReleaseChunk(i);
127
128 // Set timeline data
129 auto chunk0 = GetOrCreateChunk(0);
130 ASSERT(chunk0 != nullptr);
131 chunk0->Data.Copy(data);
132
133 // Save
134 AssetInitData initData;
135 initData.SerializedVersion = SerializedVersion;
136 if (SaveAsset(initData))
137 {
138 LOG(Error, "Cannot save \'{0}\'", ToString());
139 return true;
140 }
141
142 return false;
143}
144
145#endif
146

Callers 3

SaveMethod · 0.45
SaveMethod · 0.45
SaveMethod · 0.45

Calls 2

ToStringFunction · 0.50
CopyMethod · 0.45

Tested by

no test coverage detected