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

Method Save

Source/Editor/Windows/Assets/PrefabWindow.cs:387–417  ·  view source on GitHub ↗

()

Source from the content-addressed store, hash-verified

385
386 /// <inheritdoc />
387 public override void Save()
388 {
389 // Check if don't need to push any new changes to the original asset
390 if (!IsEdited)
391 return;
392
393 try
394 {
395 Editor.Scene.OnSaveStart(_viewport._uiParentLink);
396
397 // Simply update changes
398 Editor.Prefabs.ApplyAll(_viewport.Instance);
399
400 // Refresh properties panel to sync new prefab default values
401 _propertiesEditor.BuildLayout();
402 }
403 catch (Exception)
404 {
405 // Disable live reload on error
406 if (LiveReload)
407 {
408 LiveReload = false;
409 }
410
411 throw;
412 }
413 finally
414 {
415 Editor.Scene.OnSaveEnd(_viewport._uiParentLink);
416 }
417 }
418
419 /// <inheritdoc />
420 protected override void UpdateToolstrip()

Callers

nothing calls this directly

Calls 4

OnSaveStartMethod · 0.80
BuildLayoutMethod · 0.80
OnSaveEndMethod · 0.80
ApplyAllMethod · 0.45

Tested by

no test coverage detected