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

Method SaveSurface

Source/Engine/AI/BehaviorTree.cpp:187–206  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

185#if USE_EDITOR
186
187bool BehaviorTree::SaveSurface(const BytesContainer& data) const
188{
189 if (OnCheckSave())
190 return true;
191 ScopeLock lock(Locker);
192
193 // Set Visject Surface data
194 GetOrCreateChunk(0)->Data.Copy(data);
195
196 // Save
197 AssetInitData assetData;
198 assetData.SerializedVersion = 1;
199 if (SaveAsset(assetData))
200 {
201 LOG(Error, "Cannot save \'{0}\'", ToString());
202 return true;
203 }
204
205 return false;
206}
207
208void BehaviorTree::OnScriptsReloadStart()
209{

Callers

nothing calls this directly

Calls 2

ToStringFunction · 0.70
CopyMethod · 0.45

Tested by

no test coverage detected