Skip to content

Use UI Toolkit rendering instead of old IMGUI - Code provided #25

@leorid

Description

@leorid

In "ObjectEditor.cs" just replace

public override void OnInspectorGUI() { DrawDefaultInspector(); _buttonsDrawer.DrawButtons(targets); }

with

public override VisualElement CreateInspectorGUI()
{
	VisualElement container = new VisualElement();

	InspectorElement.FillDefaultInspector(container, serializedObject, this);

	IMGUIContainer iMGUIContainer = new IMGUIContainer(() =>
	{
		_buttonsDrawer.DrawButtons(targets);
	});
	container.Add(iMGUIContainer);

	return container;
}

It's just more performant in the Editor.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions