Files
sbox-public/game/addons/tools/Code/Scene/GameObjectInspector/MissingComponentSheet.cs
s&box team 71f266059a Open source release
This commit imports the C# engine code and game files, excluding C++ source code.

[Source-Commit: ceb3d758046e50faa6258bc3b658a30c97743268]
2025-11-24 09:05:18 +00:00

25 lines
610 B
C#

namespace Editor;
[CustomEditor( typeof( MissingComponent ) )]
public class MissingComponentSheet : ComponentEditorWidget
{
TextEdit jsonBox;
public MissingComponentSheet( SerializedObject obj ) : base( obj )
{
var c = obj.Targets.OfType<MissingComponent>().FirstOrDefault();
jsonBox = new TextEdit( this );
jsonBox.ReadOnly = true;
jsonBox.PlainText = c.GetJson().ToJsonString( new JsonSerializerOptions() { WriteIndented = true } );
SetSizeMode( SizeMode.Default, SizeMode.Default );
Layout = Layout.Column();
Layout.Margin = 16;
Layout.Spacing = 2;
Layout.Add( jsonBox );
}
}