Fix crash when using scripting object as interface implementation in object property displayed in Editor

#2493
This commit is contained in:
Wojtek Figat
2024-05-02 18:31:30 +02:00
parent 7e3f84f95e
commit 9d830eb1e2
2 changed files with 24 additions and 2 deletions

View File

@@ -0,0 +1,17 @@
// Copyright (c) 2012-2024 Wojciech Figat. All rights reserved.
namespace FlaxEditor.CustomEditors.Editors
{
internal sealed class DummyEditor : CustomEditor
{
public override void Initialize(LayoutElementsContainer layout)
{
string valueName;
if (Values.Count != 0 && Values[0] != null)
valueName = Values[0].ToString();
else
valueName = "null";
layout.Label($"{valueName} ({Values.Type})");
}
}
}