You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+28-28Lines changed: 28 additions & 28 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -8,34 +8,34 @@
8
8
9
9
## Overview
10
10
11
-
Alchemy is a library that provides inspector extensions using attributes.
11
+
Alchemy is a library that provides Inspector extensions using attributes.
12
12
13
-
In addition to adding easy and powerful editor extensions based on attributes, it allows serialization of any type (Dictionary, Hashset, Nullable, Tuple, etc...) through its own serialization process, making it possible to edit them in the inspector. By using Source Generator to dynamically generate the necessary code, it works simply by adding attributes to the target type marked as partial. There is no need to inherit from dedicated classes as with Odin.
13
+
In addition to providing easy and powerful attribute-based editor extensions, it allows serialization of any types (Dictionary, HashSet, Nullable, Tuple, etc.) via its own serialization system, so those types can be edited in the Inspector. Alchemy works simply by adding attributes to the target type — just mark it as `partial`, and a Source Generator creates the necessary code. Unlike Odin, there is no need to inherit from dedicated base classes.
Additionally, with the new features of v2.0, EditorWindow extensions and Hierarchy extensions have been added. These make it easy to create tools that streamline the development workflow in the editor.
17
+
v2.0 also adds EditorWindow and Hierarchy extensions. These make it easy to build tools that streamline your editor workflow.
18
18
19
19
## Features
20
20
21
-
*Adds over 30 attributes to extend the Inspector
22
-
*Supports SerializeReference, allowing selection of types from a dropdown
23
-
* Serialize any type (Dictionary, Hashset, Nullable, Tuple, etc...) / Editable in Inspector
24
-
*Creation of EditorWindow using attributes
25
-
*Provides features to improve usability of the Hierarchy
26
-
*Creation of custom attributes that work with Alchemy
21
+
*Add over 30 attributes to extend the Inspector
22
+
*Support SerializeReference, allowing selection of types from a dropdown
23
+
* Serialize any type (Dictionary, HashSet, Nullable, Tuple, etc.) and edit them in the Inspector
24
+
*Create EditorWindows using attributes
25
+
*Improve Hierarchy usability
26
+
*Create custom attributes that work with Alchemy
27
27
28
28
## Setup
29
29
30
30
### Requirements
31
31
32
32
* Unity 2021.2 or higher (Recommended: 2022.1 or higher for serialization extensions)
33
-
* Serialization 2.0 or higher (for serialization extensions)
33
+
*Unity Serialization 2.0 or higher (for serialization extensions)
34
34
35
35
### Installation
36
36
37
37
1. Open Package Manager from Window > Package Manager
38
-
2. Click on the "+" button > Add package from git URL
38
+
2. Click the "+" button > Add package from git URL
39
39
3. Enter the following URL:
40
40
41
41
```
@@ -54,11 +54,11 @@ Or open Packages/manifest.json and add the following to the dependencies block:
54
54
55
55
## Documentation
56
56
57
-
The full version of the documentation can be found [here](https://annulusgames.github.io/Alchemy/).
57
+
The full documentation can be found [here](https://annulusgames.github.io/Alchemy/).
58
58
59
59
## Basic Usage
60
60
61
-
To customize the display in the Inspector, add attributes to the fields of the class.
61
+
To customize the display in the Inspector, add attributes to the class fields.
62
62
63
63
```cs
64
64
usingUnityEngine;
@@ -85,7 +85,7 @@ public class AttributesExample : MonoBehaviour
By adding the `[Button]` attribute to a method, the method can be executed from the Inspector.
118
+
By adding the `[Button]` attribute to a method, you can execute the method from the Inspector.
119
119
120
120
```cs
121
121
usingSystem.Text;
@@ -161,7 +161,7 @@ public class ButtonExample : MonoBehaviour
161
161
162
162
Alchemy provides many other attributes. The list of available attributes can be found in the [documentation](https://annulusgames.github.io/Alchemy/articles/en/inspector-extension-with-attributes.html).
163
163
164
-
## Editing Interfaces/Abstract Classes
164
+
## Editing Interfaces and Abstract Classes
165
165
166
166
Alchemy supports Unity's SerializeReference. By adding the `[SerializeReference]` attribute, interfaces and abstract classes can be edited in the Inspector.
167
167
@@ -197,36 +197,36 @@ public class SerializeReferenceExample : MonoBehaviour
Toggles to switch between active/inactive states of objects and icons to display the components of objects can be added to the Hierarchy. These can be configured from ProjectSettings.
214
+
You can add toggles for each object's active/inactive state and icons that show its components to the Hierarchy. These can be configured from Project Settings.
The data of windows created by inheriting from `AlchemyEditorWindow` is saved in json format in the ProjectSettings folder of the project. For more details, refer to [Saving Editor Window Data](https://annulusgames.github.io/Alchemy/articles/en/saving-editor-window-data.html).
279
+
Data for windows that inherit from `AlchemyEditorWindow` is saved as JSON in the project's ProjectSettings folder. For more details, refer to [Saving Editor Window Data](https://annulusgames.github.io/Alchemy/articles/en/saving-editor-window-data.html).
280
280
281
281
## Using Serialization Extensions
282
282
283
-
If you want to edit types that Unity cannot serialize, such as Dictionary, you can use the `[AlchemySerialize]` attribute to perform serialization.
283
+
If you want to edit types that Unity cannot serialize, such as Dictionary, you can use the `[AlchemySerialize]` attribute to serialize these types.
284
284
285
-
If you want to use serialization extensions, you will need the [Unity.Serialization](https://docs.unity3d.com/Packages/com.unity.serialization@3.1/manual/index.html) package. Additionally, reflection-based serialization using Unity.Serialization may not work in AOT environments prior to Unity 2022.1. Check the package manual for details.
285
+
Serialization extensions require the [Unity.Serialization](https://docs.unity3d.com/Packages/com.unity.serialization@3.1/manual/index.html) package. Additionally, reflection-based serialization using Unity.Serialization may not work in AOT environments prior to Unity 2022.1. Check the package manual for details.
286
286
287
-
Below is a sample using Alchemy's serialization extension to make various types serializable/editable in the Inspector.
287
+
The following example uses Alchemy's serialization extension to make various types serializable and editable in the Inspector.
288
288
289
289
```cs
290
290
usingSystem;
@@ -293,7 +293,7 @@ using UnityEngine;
293
293
usingAlchemy.Serialization;
294
294
295
295
// By adding the [AlchemySerialize] attribute, Alchemy's serialization extension is enabled.
296
-
// It can be used with any type that has an optional base class, but the target type must be partial for the Source Generator to generate code.
296
+
// It can be used with any type, regardless of its base class, but the target type must be partial for the Source Generator to generate code.
For technical details of the serialization process, refer to [Alchemy Serialization Process](https://annulusgames.github.io/Alchemy/articles/en/alchemy-serialization-process.html) in the documentation.
317
+
For technical details on the serialization process, refer to [Alchemy Serialization Process](https://annulusgames.github.io/Alchemy/articles/en/alchemy-serialization-process.html) in the documentation.
0 commit comments