Skip to content

3.0.0 - Package Repo and Improvements

Compare
Choose a tag to compare
@Nebby1999 Nebby1999 released this 07 May 02:34

Package Repo

RoR2EditorKit has always been a Project Repo from its inception, This was due to not having enough knowledge on how to handle Package repositories, this has now changed, and RoR2EditorKit is not setup as a PackageRepo

This allows end users to directly add RoR2EK via the unity's package manager.

Extended Inspector "De-Crappyfication"

The extended inspector while useful, had some major flaws in design that made working with it bothersome in certain scenarios, As more inspectors and utilities where added for RoR2EK, it soon became evident we had to standarize a lot of methods from the project.

Naming Conventions

The entirety of the naming convention system from the ExtendedInspector has been cut and replaced by an Interface and a struct, this Interface+Struct combination allows for extremely easy implementation of naming conventions, all of RoR2EditorKit inspectors follow this new system, examples include the ArtifactCompoundDef, BuffDef and EliteDef inspectors

ContextMenu utilities

The process of adding new ContextMenus can be bothersome, having to create a method for creating the context menu event handler, and then populating the contexTMenu with more actions, which themselves need more methods and so on. We've added the AddSimpleContextMenu method, which adds a contextMenu based off the VisualElement to attatch it to, and a struct for holding the data of the ContextMenu, the visualElement and menu are stored in a dictionary, which means multiple calls of the method will always add a new action to the same element's contextMenu.

Property Validators

Certain inspectors came with the ability to notify the end user when certain aspects of the inspected object where considered "Invalid", a key example of this was the ability to continuously keep what is called the "Elite Loop" (Elite Def -> EquipmentDef -> BuffDef -> EliteDef). The original systems for this where extremely cumbersome to manage and not at all easy to replicate in other classes.

We've added the PropertyValidator class, this type of class can be used for standarizing and creating validation systems for PropertyFields, what used to take a massive method for creating a property validator can now be done in a single class by creating it, and calling the AddValidator method.

Examples of the usage of these can be found in the BuffDef, EliteDef and EquipmentDef inspectors.

Styling is King

We've decided to recreate most of the Inspectors from RoR2EK with the changes above, this includes changing the visual aspect of them.
To aid with any type of extensions that try to mimick RoR2EK's now defined styles, we've replaced all of our USS files into the Component & ScriptableObject USS files, below is an example of the old look of the EquipmentDef and its new look