# annulusgames/Alchemy for Unity Inspector Extensions

> Alchemy is a Unity editor library for attribute-based Inspector, Hierarchy, EditorWindow, and serialization workflows without requiring dedicated editor base classes. It supports Unity 2021.2 or later, with Unity 2022.1 or later recommended for serialization extensions.

**annulusgames/Alchemy** — Provides a rich set of editor extensions and serialization extensions for Unity.

- Repository: https://github.com/annulusgames/Alchemy
- Website: https://annulusgames.github.io/Alchemy/
- Stars: 1,387 · Forks: 86
- Language: C#
- License: MIT
- Published: 2026-10-16 · Updated: 2026-10-16 · Language: en
- Canonical page: https://hysenlabs.com/projects/annulusgames-alchemy

## Alchemy's Scope for Unity Editing Workflows

Alchemy addresses a specific gap between Unity's built-in Inspector and the editor tools commonly required by Unity projects. Its README describes more than 30 attributes for changing how fields appear, grouping fields, adding buttons, editing abstract types, and presenting otherwise unsupported data structures. The intended audience is Unity developers who want these capabilities expressed close to the data model, rather than assembling a custom Inspector for every component. The project targets Unity 2021.2 or later. Unity 2022.1 or later is recommended when the serialization extensions are needed.

The library is organized around a `MonoBehaviour` or serializable data type that uses Alchemy attributes. A field can receive a label, help box, read-only state, asset restriction, foldout group, or tab group. A method can receive `[Button]`. Abstract classes and interfaces can use `[SerializeReference]`, allowing a concrete implementation to be selected in the Inspector. Version 2.0 also added EditorWindow and Hierarchy extensions, according to the README, so the package covers both object inspection and editor workspace organization.

Alchemy is not a runtime framework for game behavior. The documented examples focus on editor presentation and interaction. The serialized fields still belong to Unity components or serializable classes, and the editor attributes control how those fields are exposed to users in the Unity Editor.

## How Attribute-Based Inspector Generation Works

The core mechanism is declarative metadata attached to fields and methods. For example, the README shows a `MonoBehaviour` whose fields use `[LabelText]`, `[HideLabel]`, `[AssetsOnly]`, `[Title]`, `[HelpBox]`, and `[ReadOnly]`. Alchemy interprets those attributes when Unity draws the Inspector and changes the label, grouping, help text, interaction state, or accepted object references. This keeps the editor declaration next to the serialized field instead of placing all of the drawing logic in a separate custom editor.

The package also supports nested field groups. `FoldoutGroup` places fields under a named foldout, while `TabGroup` distributes fields across tabs. The README states that group names can be nested by separating names with a slash, such as a group path. That mechanism is useful for components with many settings because the Inspector can present related controls without requiring a bespoke layout for each class.

The source generator provides the serialization path for types that Unity does not normally serialize. The README says to add the appropriate attributes to a target type and mark it as `partial`; Alchemy then generates the required code. This is different from adding a field attribute only for presentation. The generated code is what makes supported dictionary, hash set, nullable value type, and tuple data available for Inspector editing. Projects therefore need to account for generated partial types when applying the serialization attributes.

The package also supports Unity's `SerializeReference`. A field declared as an interface or abstract class can offer a dropdown of concrete serializable types. The README defines three example implementations, `ExampleA`, `ExampleB`, and `ExampleC`, and shows them used in both a single `IExample` field and an `IExample[]` array. The concrete types carry `[Serializable]`, which remains part of the Unity serialization model.

## Installing Alchemy and Inspecting a First Component

Install the package through Unity's Package Manager. Open `Window > Package Manager`, choose the `+` button, select `Add package from git URL`, and enter the repository package URL below. The README specifies this path, which selects the `Alchemy` package under the repository rather than installing the entire repository as a Unity project.

```text
https://github.com/annulusgames/Alchemy.git?path=/Alchemy/Assets/Alchemy
```

The same package can be declared in `Packages/manifest.json` under `dependencies`. Keep the key and URL exactly as documented. Unity will resolve the package from the git repository through Package Manager.

```json
{
    "dependencies": {
        "com.annulusgames.alchemy": "https://github.com/annulusgames/Alchemy.git?path=/Alchemy/Assets/Alchemy"
    }
}
```

After installation, create or open a `MonoBehaviour` and apply attributes to its serialized fields. The following example uses a custom label, a hidden label, an asset-only object field, a title, a help box, and read-only text. Attach the component to a GameObject and inspect its fields in the Unity Editor. The visible result should reflect the labels and grouping declared by the attributes, while `message` is presented as read-only.

```cs
using UnityEngine;
using UnityEngine.UIElements;
using Alchemy.Inspector;

public class AttributesExample : MonoBehaviour
{
    [LabelText("Custom Label")]
    public float foo;

    [HideLabel]
       public Vector3 bar;

    [AssetsOnly]
       public GameObject baz;

    [Title("Title")]
    [HelpBox("HelpBox", HelpBoxMessageType.Info)]
    [ReadOnly]
    public string message = "Read Only";
}
```

This first use verifies package resolution, attribute imports, and the generated Inspector path before a project introduces dictionary or abstract-type serialization. The README does not document rollback or uninstall steps, so Package Manager behavior should be checked in the project that will use the dependency.

## Buttons, Tabs, and Foldouts in Component Design

Alchemy's field and method attributes can support small editor actions without replacing the default component workflow. The `[Button]` attribute causes a method to appear as an executable control in the Inspector. The README shows overloads accepting no parameter, an integer, and a serializable `Example` object. The latter reads fields from that object and writes a message to the console with `Debug.Log`.

This is a concrete distinction from merely displaying configuration. A component can expose an action whose behavior remains in ordinary C# while Alchemy supplies the Inspector button. The documentation example is small, but it establishes the supported interaction shape. The method still needs to be compatible with the editor invocation mechanism, and the README does not document every possible parameter or return-type restriction.

For configuration density, `FoldoutGroup` and `TabGroup` provide different layout choices. A foldout hides related fields behind a named section, while tabs separate fields into selected panels. The README shows three integer fields under `FoldoutGroup("Foldout")` and three fields distributed across `TabGroup("Tab", "Tab1")`, `TabGroup("Tab", "Tab2")`, and `TabGroup("Tab", "Tab3")`. The attributes are applied to fields, so the generated interface can preserve the normal field model while changing navigation.

These features are most useful for components whose settings become difficult to scan as the class grows. They do not add runtime behavior, validation rules, or undo semantics beyond what the underlying Unity editor and method implementation provide. The README gives examples of presentation and invocation, but does not describe how to migrate an existing custom `Editor` to Alchemy.

## Serialization Beyond Unity's Default Field Types

The serialization extensions are the main technical commitment for projects evaluating Alchemy. The README lists dictionaries, hash sets, nullable value types, and tuples as types that Unity does not normally serialize but Alchemy can serialize and edit. The target type must be marked `partial`, and the appropriate Alchemy attributes must be applied so the source generator can create the required code.

This source-generator design matters for adoption. It means the package is not only a collection of runtime drawing controls. Code generation participates in the data model, and the project must compile the generated partial declarations correctly. The documentation does not list every serialization attribute or show a complete dictionary example, so teams should consult the full Alchemy documentation before designing a broad serialized schema.

`SerializeReference` covers a separate but related case. Unity can store a selected implementation for an interface or abstract base when the field uses `SerializeReference`. Alchemy presents that capability through its Inspector integration, as shown by the `IExample` and `IExample[]` examples. The concrete implementation types must be serializable, and the selected instance becomes part of the serialized field rather than being inferred from a static field type.

The limitation is scope. Alchemy's serialization support is an editor and serialization extension for Unity projects, not a general replacement for a data format or a runtime database. The README does not claim compatibility with every unsupported C# type, every generic construction, or every Unity serialization version. It also does not provide migration or rollback documentation. Those details need verification against the full documentation and the project's exact Unity version.

## Hierarchy Decorations and EditorWindow Integration

Version 2.0 expands Alchemy beyond Inspector fields. The Hierarchy extension can display active-state toggles and component icons for objects. The README states that these features can be configured in Project Settings. That makes the extension relevant to teams that want status information visible directly in the scene hierarchy without opening each object's Inspector.

Alchemy also adds decorative objects through the Create menu. According to the README, these objects are automatically excluded from builds. If a decorative object has children, its children are unparented before the decorative object is deleted. This is a specific build and editing safeguard, but it also describes a deletion workflow that users need to understand before treating hierarchy decorations as ordinary GameObjects.

For editor tools, the documented approach is to inherit from `AlchemyEditorWindow` instead of `EditorWindow`. The README begins an AlchemyEditorWindow example but does not include the complete code, so the exact initialization, lifecycle, and attribute syntax cannot be confirmed from the documentation. The safe conclusion is narrower: Alchemy provides an EditorWindow extension point, while the details of its full API belong in the linked documentation.

Compared with writing a conventional custom `Editor` or `EditorWindow`, Alchemy emphasizes attributes and source-generated support. Compared with Odin, the README explicitly says that Alchemy does not require inheriting from dedicated base classes for its Inspector extensions. That is the documented architectural difference, not a claim that the two libraries offer identical feature sets.

## License, Maintenance, and Adoption Boundaries

Alchemy is distributed under the MIT license. The repository includes a `LICENSE` file, and the README identifies the project as MIT licensed. This gives the project a permissive license, subject to the license text and its conditions. The repository is not archived. The last push was on 2026-10-15, and recent releases include `v2.1.1` on 2026-08-02, `v2.1.0` on 2025-06-15, and `v2.0.1` on 2024-02-21.

The upgrade cost depends on whether a project adopts only Inspector attributes or also depends on generated serialization, EditorWindow behavior, and Hierarchy extensions. The source generator and `partial` target types add a build-time integration surface. A Unity version change can also affect serialization behavior, and the README recommends Unity 2022.1 or later specifically for serialization extensions. The documentation does not provide upgrade notes for those releases, so compatibility should be checked in the project's own Unity editor and test pass.

Alchemy is a reasonable fit for Unity developers who want Inspector controls declared near their data, need interfaces or abstract classes to be edited through `SerializeReference`, or want dictionaries and related collections represented without maintaining a custom editor for each type. It is a poor fit for a project that wants to avoid Unity package dependencies, cannot satisfy the stated Unity and `Unity.Serialization 2.0` requirements, or expects a complete replacement for an existing editor framework. The first concrete verification is installing the git package and compiling one component with a single Inspector attribute. The second is compiling one generated serialization target before migrating a larger editor surface.

## Conclusion

Alchemy is a practical choice for Unity teams that want attribute-driven Inspector and Hierarchy tooling, including serialization for dictionaries, sets, nullable value types, and tuples. It is less suitable for projects that require only Unity's built-in editor facilities or that cannot adopt Unity.Serialization 2.0 for the serialization features. Teams should first verify the package installation path, the Unity version used by the project, and the exact attribute requirements for their target types. The repository is not archived, and its last push was on 2026-10-15.

## FAQ

### What is annulusgames/Alchemy used for in Unity?

Alchemy provides attribute-based Unity Inspector extensions, serialization support for types such as dictionaries and tuples, Hierarchy enhancements, and EditorWindow integration. It is aimed at Unity developers building custom editor workflows.

### How do I install annulusgames/Alchemy in Unity?

Use `Window > Package Manager`, choose `Add package from git URL`, and use the documented git URL. You can also add the package URL to `Packages/manifest.json`.

### Does annulusgames/Alchemy require a dedicated base class?

The README says that Alchemy does not require inheriting from dedicated base classes, unlike Odin. For AlchemyEditorWindow, the documented integration uses inheritance from `AlchemyEditorWindow` instead of `EditorWindow`.

### What Unity version does annulusgames/Alchemy require?

The documented minimum is Unity 2021.2 or later. Unity 2022.1 or later is recommended for the serialization extensions, and the README lists `Unity.Serialization 2.0` or later as a requirement for those extensions.

## Sources

- [annulusgames/Alchemy on GitHub](https://github.com/annulusgames/Alchemy)
- [License: MIT](https://github.com/annulusgames/Alchemy/blob/main/LICENSE)
- [Project website](https://annulusgames.github.io/Alchemy/)
- [README](https://github.com/annulusgames/Alchemy/blob/main/README.md)
- [Releases](https://github.com/annulusgames/Alchemy/releases)

---

Hysen Labs editorial analysis, written from the project's own repository and release notes. Cite the canonical page: https://hysenlabs.com/projects/annulusgames-alchemy
