All Projects → OscarAbraham → UITKEditorAid

OscarAbraham / UITKEditorAid

Licence: MIT, Unknown licenses found Licenses found MIT LICENSE Unknown LICENSE.meta
Elements and scripts that help in making Unity editors with UIToolkit.

Programming Languages

C#
18002 projects

Projects that are alternatives of or similar to UITKEditorAid

ScriptableObjectDropdown
Dropdown for ScriptableObjects
Stars: ✭ 40 (+29.03%)
Mutual labels:  unity3d-plugin, unity3d-editor, unityeditor
CSharpCompilerSettingsForUnity
Change the C# compiler (csc) used on your Unity project, as you like!
Stars: ✭ 208 (+570.97%)
Mutual labels:  unity3d-plugin, upm-package
GDX
Game Development Extensions
Stars: ✭ 46 (+48.39%)
Mutual labels:  unity3d-plugin, upm-package
UnityTexture3DAtlasImportPipeline
A Texture3D Atlas Import Pipeline for Unity 2019.3 and newer.
Stars: ✭ 24 (-22.58%)
Mutual labels:  unity3d-plugin, unity3d-editor
ScriptableObjectMultiSelectDropdown
Multi Select Dropdown for ScriptableObjects
Stars: ✭ 18 (-41.94%)
Mutual labels:  unity3d-plugin, unityeditor
CategoryTool
Unity Editor tool to create Categories in the Hierarchy. The Categories work as dividers between GameObjects.
Stars: ✭ 47 (+51.61%)
Mutual labels:  unity3d-plugin, unity3d-editor
Naughtyattributes
Attribute Extensions for Unity
Stars: ✭ 2,641 (+8419.35%)
Mutual labels:  unity3d-plugin, unity3d-editor
MultiGame
MultiGame is a tool for rapid development in Unity
Stars: ✭ 16 (-48.39%)
Mutual labels:  unity3d-plugin, unity3d-editor
SimpleKeplerOrbits
Unity3d static 2-body orbits simulation
Stars: ✭ 76 (+145.16%)
Mutual labels:  unity3d-plugin
UnityGlobalTextSystem
Allow the user to 'change' the default font in Unity from "Arial" to a font of their liking.
Stars: ✭ 21 (-32.26%)
Mutual labels:  unity3d-plugin
FPSCounter
FPS counter plugin for BepInEx - measure frame time and plugin performance
Stars: ✭ 27 (-12.9%)
Mutual labels:  unity3d-plugin
UnityProminentColor
Tool to gather main colors of an image using Unity.
Stars: ✭ 40 (+29.03%)
Mutual labels:  unity3d-plugin
relationsinspector
An editor extension for the Unity game engine.
Stars: ✭ 24 (-22.58%)
Mutual labels:  unity3d-plugin
com.xrtk.oculus
The Oculus platform components for the XRTK
Stars: ✭ 11 (-64.52%)
Mutual labels:  upm-package
Android Screen Recorder Plugin
A simple android library project for record android screen in Unity
Stars: ✭ 28 (-9.68%)
Mutual labels:  unity3d-plugin
collision-sound
Collision Sound aims to be an easy and powerful way of adding sound to object collisions in Unity
Stars: ✭ 21 (-32.26%)
Mutual labels:  unity3d-plugin
Newtonsoft.Json-for-Unity.Converters
Converters of common Unity types for Newtonsoft.Json. Goes hand in hand with jilleJr/Newtonsoft.Json-for-Unity
Stars: ✭ 147 (+374.19%)
Mutual labels:  unity3d-plugin
SafeValues
A simple Unity library for cheating prevention
Stars: ✭ 75 (+141.94%)
Mutual labels:  unity3d-plugin
LocalStorage
Configurable generic class for managing local data saved on device.
Stars: ✭ 24 (-22.58%)
Mutual labels:  upm-package
unity-history-window
A simple selection history window for Unity.
Stars: ✭ 118 (+280.65%)
Mutual labels:  upm-package

UITK Editor Aid

Elements and scripts that help in making Unity editors with UIToolkit.

UIToolkit (UITK) allows for interfaces that are more dynamic and performant than IMGUI. Its web-like API makes creating complex Editor UI (i.e. node graphs) a lot easier.

There's a problem, though: the editor part of UITK currently lacks some of the IMGUI features required for easily creating anything more than basic stuff. This issue can be avoided a little by using IMGUI containers inside UITK, but projects can easily get too limited and unwieldy, and performance drops quickly when there are multiple instances of them.

This package contains some of the stuff I use to solve the problem with a pure UIToolkit approach.

How to install

You can either download this package directly to your project's Assets folder, or you can use the Package Manager. Installing with the Package Manager is very easy:

  1. In Unity, go to Window > Package Manager.
  2. Click the in the top left and choose Add Package from git URL
  3. Enter https://github.com/OscarAbraham/UITKEditorAid.git and press Add.

Some of the stuff included

Click a name to go to the relevant documentation page for usage info and some code examples:

EditableLabel

A label that tranforms into a text field to be edited. It's edited with a double-click by default.
EditableLabel preview

ArrayPropertyField

A UITK version of the good old reorderable list, very customizable. Here's what it looks like by default:

ArrayPropertyField preview

There's also an abstract ListControl class that you can use to create your own lists that don't depend on a SerializedProperty

ManagedReferenceField

Currently, PropertyFields from members with the SerializeReference attribute break when they change type. This element is like a PropertyField that updates when the type changes.
The next gif shows a customized ArrayPropertyField that uses ManagedReferenceFields for its items. Notice that the interface updates itself when the elements change type due to being reordered:

A customized list of Managed References

ValueTracker

Some times you don't need a VisualElement for anything visual, sometimes you just need a quick way to get a callback when a property changes. This element helps you with that.

ListOfInspectors

A list that is similar to the component's list in GameObjects. I use it with ScriptableObject subassets. You still have to do the stuff that's not related to UIToolkit yourself, like handling assets and the lifetime of your objects, which is outside the scope of this package; but if you know how to do that, this could be very helpful.

ListOfInspectors preview

More Stuff

Click the link to go to the docs homepage. There is stuff to replace some common IMGUI methods, like a Disabler element that's equivalent to EditorGUI.DisabledScope, and FixedSpace/FlexibleSpace elements equivalent to GUILayout's Space and FlexibleSpace. There are also some extension methods that I've found useful for UIToolkit editor development, and some UITK manipulators.

A caveat

Currently, all elements that need rebinding (i.e. Lists and ManagedReferenceFields), don't support UXML. That's because they need to get a SerializedProperty in their constructor. The correct way to solve that would be to obtain them with Unity's binding system, but the required API is not public yet. I don't want to use reflection because that API seems likely to change, and editors that break when doing a minor Unity update are awful.

IMPORTANT: Avoid collisions when including this code inside packages and plugins

Sometimes one needs to put a copy of a library inside a Unity plugin; that's very ok, that's what the MIT license is for. If you do that, please take steps to avoid collisions when your users have also installed this package themselves. The easiest way to do it is:

  1. Rename the ArteHacker part of the namespace. Most text editors have an automated way of doing that.

  2. Delete the .asmdef file inside the Editor folder. Create a new one if you need it; renaming it is not enough because some users reference them as assets (with their GUID).

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].