Fix materials parameters display issues after editing
This commit is contained in:
@@ -186,7 +186,6 @@ namespace FlaxEditor.Windows.Assets
|
||||
|
||||
// Asset properties proxy
|
||||
_properties = new PropertiesProxy();
|
||||
_propertiesEditor.Select(_properties);
|
||||
|
||||
// Preview properties editor
|
||||
_previewTab = new Tab("Preview");
|
||||
@@ -322,22 +321,17 @@ namespace FlaxEditor.Windows.Assets
|
||||
{
|
||||
if (value == null)
|
||||
{
|
||||
// Error
|
||||
Editor.LogError("Failed to save animation graph surface");
|
||||
return;
|
||||
}
|
||||
|
||||
// Save data to the temporary asset
|
||||
if (_asset.SaveSurface(value))
|
||||
{
|
||||
// Error
|
||||
_surface.MarkAsEdited();
|
||||
Editor.LogError("Failed to save animation graph surface data");
|
||||
return;
|
||||
}
|
||||
_asset.Reload();
|
||||
|
||||
// Reset any root motion
|
||||
_asset.WaitForLoaded();
|
||||
_preview.PreviewActor.ResetLocalTransform();
|
||||
_previewTab.Presenter.BuildLayoutOnUpdate();
|
||||
}
|
||||
@@ -376,6 +370,14 @@ namespace FlaxEditor.Windows.Assets
|
||||
return false;
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
protected override void OnSurfaceEditingStart()
|
||||
{
|
||||
_propertiesEditor.Select(_properties);
|
||||
|
||||
base.OnSurfaceEditingStart();
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
protected override void PerformLayoutBeforeChildren()
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user