Skip to content

Instantly share code, notes, and snippets.

View Theo-Farnole's full-sized avatar
🥦

Theo Farnole Theo-Farnole

🥦
View GitHub Profile
@Theo-Farnole
Theo-Farnole / SerializedEditorWindow.cs
Created July 10, 2023 13:09
By inheriting from SerializedEditorWindow instead of EditorWindow, you can make Unity editor windows in exactly the same way you make inspectors: by using only attributes.
/**
*
* Inherit from SerializedEditorWindow, then mark field as [SerializeField] will make them appear in the window
*
* If you want to add some button, you can override OnGUI()
*
* Inspired by the OdinEditorWindow
* "By inheriting from SerializedEditorWindow instead of EditorWindow, you can make Unity editor windows in exactly the same way you make inspectors: by using only attributes."
**/