From d9ccfdf917c8a6c6182aa8da027da4c598bc977a Mon Sep 17 00:00:00 2001 From: paq <89paku@gmail.com> Date: Thu, 30 Jul 2026 19:09:03 +0900 Subject: [PATCH] chore: Improve documents --- Alchemy.SourceGenerator/README.md | 2 +- README.md | 28 +++++++++---------- docs/articles/en/about.md | 4 +-- docs/articles/en/alchemy-editor-window.md | 2 +- .../en/alchemy-serialization-process.md | 4 +-- docs/articles/en/attributes/assets-only.md | 4 +-- docs/articles/en/attributes/blockquote.md | 2 +- docs/articles/en/attributes/box-group.md | 2 +- docs/articles/en/attributes/button.md | 2 +- .../en/attributes/disable-alchemy-editor.md | 4 +-- docs/articles/en/attributes/disable-if.md | 4 +-- .../en/attributes/disable-in-edit-mode.md | 2 +- .../en/attributes/disable-in-play-mode.md | 2 +- docs/articles/en/attributes/enable-if.md | 4 +-- docs/articles/en/attributes/foldout-group.md | 2 +- docs/articles/en/attributes/group.md | 2 +- docs/articles/en/attributes/help-box.md | 2 +- docs/articles/en/attributes/hide-if.md | 4 +-- .../en/attributes/hide-in-edit-mode.md | 2 +- .../en/attributes/hide-in-play-mode.md | 2 +- docs/articles/en/attributes/hide-label.md | 2 +- .../en/attributes/hide-script-field.md | 2 +- .../en/attributes/horizontal-group.md | 4 +-- .../articles/en/attributes/horizontal-line.md | 2 +- docs/articles/en/attributes/indent.md | 2 +- docs/articles/en/attributes/inline-editor.md | 4 +-- docs/articles/en/attributes/label-text.md | 2 +- .../en/attributes/list-view-settings.md | 12 ++++---- .../en/attributes/on-inspector-destroy.md | 2 +- .../en/attributes/on-inspector-disable.md | 2 +- .../en/attributes/on-inspector-enable.md | 2 +- .../en/attributes/on-list-view-changed.md | 4 +-- .../en/attributes/on-value-changed.md | 2 +- docs/articles/en/attributes/order.md | 4 +-- docs/articles/en/attributes/required.md | 2 +- docs/articles/en/attributes/show-if.md | 4 +-- .../en/attributes/show-in-inspector.md | 4 +-- docs/articles/en/attributes/tab-group.md | 2 +- docs/articles/en/attributes/title.md | 2 +- docs/articles/en/attributes/validate-input.md | 4 +-- docs/articles/en/button-attribute.md | 3 +- .../en/comparison-with-other-libraries.md | 4 +-- docs/articles/en/creating-custom-attribute.md | 8 +++--- .../en/creating-custom-group-attribute.md | 8 +++--- docs/articles/en/debugging-serialized-data.md | 2 +- docs/articles/en/decorating-hierarchy.md | 8 +++--- docs/articles/en/disable-default-editor.md | 4 +-- docs/articles/en/extending-alchemy-editor.md | 9 ++++-- docs/articles/en/group-attributes.md | 6 ++-- .../en/hierarchy-toggles-and-icons.md | 4 +-- .../en/inspector-extension-with-attributes.md | 6 ++-- docs/articles/en/installation.md | 16 +++++------ docs/articles/en/saving-editor-window-data.md | 10 +++---- docs/articles/en/serialization-callback.md | 6 ++-- docs/articles/en/serialization-extension.md | 12 ++++---- docs/articles/en/serialize-reference.md | 2 +- docs/articles/en/toc.yml | 20 ++++++------- docs/docfx.json | 2 +- docs/index.md | 6 ++-- docs/toc.yml | 2 +- 60 files changed, 143 insertions(+), 139 deletions(-) diff --git a/Alchemy.SourceGenerator/README.md b/Alchemy.SourceGenerator/README.md index 31854c5..7b1b95b 100644 --- a/Alchemy.SourceGenerator/README.md +++ b/Alchemy.SourceGenerator/README.md @@ -2,7 +2,7 @@ Source generator for Alchemy. -# How to update the shipped DLL +## How to update the shipped DLL Unity consumes the compiled generator at `Alchemy/Assets/Alchemy/Generator/Alchemy.SourceGenerator.dll`. After changing the generator, rebuild it with: diff --git a/README.md b/README.md index 27c1777..5fbbf49 100644 --- a/README.md +++ b/README.md @@ -8,9 +8,9 @@ ## Overview -Alchemy is a library that provides Inspector extensions using attributes. +Alchemy is a library that provides attribute-based Inspector extensions. -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. +In addition to providing easy and powerful attribute-based editor extensions, Alchemy can serialize types that Unity does not normally support, such as dictionaries, hash sets, nullable value types, and tuples, so they can be edited in the Inspector. Add the appropriate attributes to a target type and mark it as `partial`; a source generator creates the necessary code. Unlike Odin, there is no need to inherit from dedicated base classes. @@ -20,7 +20,7 @@ v2.0 also adds EditorWindow and Hierarchy extensions. These make it easy to buil * Add over 30 attributes to extend the Inspector * Support SerializeReference, allowing selection of types from a dropdown -* Serialize any type (Dictionary, HashSet, Nullable, Tuple, etc.) and edit them in the Inspector +* Serialize additional types, including dictionaries, hash sets, nullable value types, and tuples, and edit them in the Inspector * Create EditorWindows using attributes * Improve Hierarchy usability * Create custom attributes that work with Alchemy @@ -29,12 +29,12 @@ v2.0 also adds EditorWindow and Hierarchy extensions. These make it easy to buil ### Requirements -* Unity 2021.2 or higher (Recommended: 2022.1 or higher for serialization extensions) -* Unity Serialization 2.0 or higher (for serialization extensions) +* Unity 2021.2 or later (Unity 2022.1 or later is recommended for serialization extensions) +* Unity.Serialization 2.0 or later (for serialization extensions) ### Installation -1. Open Package Manager from Window > Package Manager +1. Open the Package Manager from Window > Package Manager 2. Click the "+" button > Add package from git URL 3. Enter the following URL: @@ -42,7 +42,7 @@ v2.0 also adds EditorWindow and Hierarchy extensions. These make it easy to buil https://github.com/annulusgames/Alchemy.git?path=/Alchemy/Assets/Alchemy ``` -Or open Packages/manifest.json and add the following to the dependencies block: +Alternatively, open `Packages/manifest.json` and add the following entry to the `dependencies` block: ```json { @@ -124,7 +124,7 @@ using UnityEngine; using Alchemy.Inspector; [Serializable] -public sealed class Example : IExample +public sealed class Example { public float foo; public Vector3 bar; @@ -213,7 +213,7 @@ Alchemy provides several features that extend the Hierarchy. -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. +You can display active-state toggles and component icons for each object in the Hierarchy. These features can be configured in Project Settings. @@ -223,8 +223,8 @@ From the Create menu, you can create objects that decorate the Hierarchy. -These objects are automatically excluded from builds. (If they have child objects, any child objects are unparented before deletion.) -For more details, refer to [Decorating Hierarchy](https://annulusgames.github.io/Alchemy/articles/en/decorating-hierarchy.html). +These objects are automatically excluded from builds. If they have children, the children are unparented before the decorative objects are deleted. +For more details, refer to [Decorating the Hierarchy](https://annulusgames.github.io/Alchemy/articles/en/decorating-hierarchy.html). ## AlchemyEditorWindow @@ -278,11 +278,11 @@ public class EditorWindowExample : AlchemyEditorWindow -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). +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). ## Using Serialization Extensions -If you want to edit types that Unity cannot serialize, such as Dictionary, you can use the `[AlchemySerialize]` attribute to serialize these types. +To edit types that Unity does not normally serialize, such as dictionaries, use the `[AlchemySerialize]` attribute. 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. @@ -295,7 +295,7 @@ using UnityEngine; using Alchemy.Serialization; // By adding the [AlchemySerialize] attribute, Alchemy's serialization extension is enabled. -// 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. +// It can be used regardless of the target type's base class, but the target type must be partial for the source generator to generate code. [AlchemySerialize] public partial class AlchemySerializationExample : MonoBehaviour { diff --git a/docs/articles/en/about.md b/docs/articles/en/about.md index 5d6e05e..05a1c4f 100644 --- a/docs/articles/en/about.md +++ b/docs/articles/en/about.md @@ -2,8 +2,8 @@ ![header](../../images/header.png) -Alchemy is a library that provides a rich set of editor extensions for Unity. By integrating Alchemy, over 30 attributes are added to easily extend the Inspector. Additionally, by utilizing the Unity.Serialization package and a dedicated Source Generator, it becomes possible to serialize and edit types not normally serializable in Unity (`Dictionary`, `HashSet`, `Nullable`, `ValueTuple`, etc.) directly from the Inspector. +Alchemy is a library that provides a rich set of editor extensions for Unity. It includes more than 30 attributes that make it easy to extend the Inspector. With the Unity.Serialization package and a dedicated source generator, Alchemy can also serialize and edit types that Unity does not normally support, including `Dictionary`, `HashSet`, `Nullable`, and `ValueTuple`. ![img](../../images/img-v2.0.png) -Furthermore, version 2.0 introduces new features such as EditorWindow extensions and Hierarchy extensions. These enable the easy creation of tools to streamline the development workflow within the editor. \ No newline at end of file +Version 2.0 also introduces editor-window and Hierarchy extensions. These features make it easy to build tools that streamline development workflows in the Unity Editor. diff --git a/docs/articles/en/alchemy-editor-window.md b/docs/articles/en/alchemy-editor-window.md index 4d19904..d5cd997 100644 --- a/docs/articles/en/alchemy-editor-window.md +++ b/docs/articles/en/alchemy-editor-window.md @@ -50,4 +50,4 @@ public class EditorWindowExample : AlchemyEditorWindow ![img](../../images/img-editor-window.png) -Data from windows created by inheriting `AlchemyEditorWindow` is saved in JSON format in the ProjectSettings folder of the project. For more details, refer to the [Saving Editor Window Data](saving-editor-window-data.md) page. \ No newline at end of file +Data for windows derived from `AlchemyEditorWindow` is saved as JSON in the project's `ProjectSettings` folder. For more details, refer to [Saving Editor Window Data](saving-editor-window-data.md). diff --git a/docs/articles/en/alchemy-serialization-process.md b/docs/articles/en/alchemy-serialization-process.md index ce57dee..e8ff1b0 100644 --- a/docs/articles/en/alchemy-serialization-process.md +++ b/docs/articles/en/alchemy-serialization-process.md @@ -1,6 +1,6 @@ # Alchemy Serialization Process -In Alchemy, by adding the `[AlchemySerialize]` attribute to the target type, a dedicated Source Generator automatically implements `ISerializationCallbackReceiver`. Within this process, all fields annotated with `[AlchemySerializeField]` are gathered, and using the Unity.Serialization package, they are converted to JSON format. However, fields of type `UnityEngine.Object` cannot be handled in JSON format, so their instances are saved in a single list, and only their indices are written to JSON. +Adding `[AlchemySerialize]` to a target type causes Alchemy's source generator to implement `ISerializationCallbackReceiver`. It collects all fields marked with `[AlchemySerializeField]` and uses the Unity.Serialization package to serialize their data to JSON. Because references to `UnityEngine.Object` instances cannot be represented directly in JSON, Alchemy stores them in a separate list and writes their indices to the JSON data. For example, consider the following class: @@ -77,4 +77,4 @@ partial class AlchemySerializationExample : global::UnityEngine.ISerializationCa } ``` -Using `[AlchemySerializeField]` increases the processing load for serialization and deserialization. Therefore, it is recommended to avoid using `[AlchemySerializeField]` whenever possible. \ No newline at end of file +Using `[AlchemySerializeField]` adds serialization and deserialization overhead. Use it only for fields that Unity cannot serialize normally. diff --git a/docs/articles/en/attributes/assets-only.md b/docs/articles/en/attributes/assets-only.md index 885f5e4..b8526f1 100644 --- a/docs/articles/en/attributes/assets-only.md +++ b/docs/articles/en/attributes/assets-only.md @@ -1,6 +1,6 @@ # Assets Only Attribute -Limits the reference that can be entered into an object field to assets only. +Restricts an object field to asset references. ![img](../../../images/img-attribute-assets-only.png) @@ -10,4 +10,4 @@ public Object asset1; [AssetsOnly] public GameObject asset2; -``` \ No newline at end of file +``` diff --git a/docs/articles/en/attributes/blockquote.md b/docs/articles/en/attributes/blockquote.md index d2f9b76..dcfa288 100644 --- a/docs/articles/en/attributes/blockquote.md +++ b/docs/articles/en/attributes/blockquote.md @@ -11,4 +11,4 @@ public float foo; | Parameter | Description | | - | - | -| Text | The text to display in the quotation | \ No newline at end of file +| Text | The text to display in the quotation | diff --git a/docs/articles/en/attributes/box-group.md b/docs/articles/en/attributes/box-group.md index b31b4f3..7ed5b10 100644 --- a/docs/articles/en/attributes/box-group.md +++ b/docs/articles/en/attributes/box-group.md @@ -26,4 +26,4 @@ public GameObject gamma; | Parameter | Description | | - | - | -| GroupPath | Specifies the path of the group. Groups can be nested by separating them with `/`. | \ No newline at end of file +| GroupPath | Specifies the path of the group. Groups can be nested by separating them with `/`. | diff --git a/docs/articles/en/attributes/button.md b/docs/articles/en/attributes/button.md index 231117a..16238df 100644 --- a/docs/articles/en/attributes/button.md +++ b/docs/articles/en/attributes/button.md @@ -27,4 +27,4 @@ public void Foo(SampleClass parameter) builder.Append("baz = ").Append(parameter.baz == null ? "Null" : parameter.baz.ToString()); Debug.Log("Foo: " + builder.ToString()); } -``` \ No newline at end of file +``` diff --git a/docs/articles/en/attributes/disable-alchemy-editor.md b/docs/articles/en/attributes/disable-alchemy-editor.md index 0f52d39..777ffc0 100644 --- a/docs/articles/en/attributes/disable-alchemy-editor.md +++ b/docs/articles/en/attributes/disable-alchemy-editor.md @@ -1,6 +1,6 @@ # Disable Alchemy Editor Attribute -Disables the AlchemyEditor for the target class and uses the default Inspector for rendering. When this attribute is added to a field, only that field will be rendered using the default PropertyField. +Disables `AlchemyEditor` for the target class and uses the default Inspector instead. When this attribute is added to a field, only that field is rendered using the default `PropertyField`. ![img](../../../images/img-attribute-disable-alchemy-editor.png) @@ -12,4 +12,4 @@ public class DisableAlchemyEditorExample : MonoBehaviour public Vector3 bar; public GameObject baz; } -``` \ No newline at end of file +``` diff --git a/docs/articles/en/attributes/disable-if.md b/docs/articles/en/attributes/disable-if.md index 06abeee..b3a61c1 100644 --- a/docs/articles/en/attributes/disable-if.md +++ b/docs/articles/en/attributes/disable-if.md @@ -1,6 +1,6 @@ # Disable If Attribute -If the boolean value of the target member is true, the field becomes disabled. +Disables the field when the specified condition evaluates to true. ![img](../../../images/img-attribute-disable-if-false.png) @@ -24,4 +24,4 @@ public int disableIfMethod; | Parameter | Description | | - | - | -| Condition | The name of the field, property, or method used for condition evaluation. | \ No newline at end of file +| Condition | The name of the field, property, or method used to evaluate the condition. | diff --git a/docs/articles/en/attributes/disable-in-edit-mode.md b/docs/articles/en/attributes/disable-in-edit-mode.md index 84f1a94..c567394 100644 --- a/docs/articles/en/attributes/disable-in-edit-mode.md +++ b/docs/articles/en/attributes/disable-in-edit-mode.md @@ -9,4 +9,4 @@ During Edit Mode, the field becomes disabled. ```cs [DisableInEditMode] public float foo; -``` \ No newline at end of file +``` diff --git a/docs/articles/en/attributes/disable-in-play-mode.md b/docs/articles/en/attributes/disable-in-play-mode.md index d701b16..d61847c 100644 --- a/docs/articles/en/attributes/disable-in-play-mode.md +++ b/docs/articles/en/attributes/disable-in-play-mode.md @@ -9,4 +9,4 @@ During Play Mode, the field becomes disabled. ```cs [DisableInPlayMode] public float foo; -``` \ No newline at end of file +``` diff --git a/docs/articles/en/attributes/enable-if.md b/docs/articles/en/attributes/enable-if.md index df70722..d73dc30 100644 --- a/docs/articles/en/attributes/enable-if.md +++ b/docs/articles/en/attributes/enable-if.md @@ -1,6 +1,6 @@ # Enable If Attribute -The field becomes editable only if the boolean value of the target member is true. +Enables the field when the specified condition evaluates to true. ![img](../../../images/img-attribute-enable-if-false.png) @@ -24,4 +24,4 @@ public int enableIfMethod; | Parameter | Description | | - | - | -| Condition | The name of the field, property, or method used for condition evaluation | +| Condition | The name of the field, property, or method used to evaluate the condition. | diff --git a/docs/articles/en/attributes/foldout-group.md b/docs/articles/en/attributes/foldout-group.md index b1295fd..5117f5e 100644 --- a/docs/articles/en/attributes/foldout-group.md +++ b/docs/articles/en/attributes/foldout-group.md @@ -26,4 +26,4 @@ public GameObject gamma; | Parameter | Description | | - | - | -| GroupPath | Specifies the path of the group. Groups can be nested using `/`. | \ No newline at end of file +| GroupPath | Specifies the path of the group. Groups can be nested using `/`. | diff --git a/docs/articles/en/attributes/group.md b/docs/articles/en/attributes/group.md index 877612e..320a1d3 100644 --- a/docs/articles/en/attributes/group.md +++ b/docs/articles/en/attributes/group.md @@ -26,4 +26,4 @@ public GameObject gamma; | Parameter | Description | | - | - | -| GroupPath | Specifies the path of the group. Groups can be nested using `/`. | \ No newline at end of file +| GroupPath | Specifies the path of the group. Groups can be nested using `/`. | diff --git a/docs/articles/en/attributes/help-box.md b/docs/articles/en/attributes/help-box.md index 61fb523..806e302 100644 --- a/docs/articles/en/attributes/help-box.md +++ b/docs/articles/en/attributes/help-box.md @@ -18,4 +18,4 @@ public GameObject baz; | Parameter | Description | | - | - | | Message | The text to display inside the box. | -| MessageType | The type of message. | \ No newline at end of file +| MessageType | The type of message. | diff --git a/docs/articles/en/attributes/hide-if.md b/docs/articles/en/attributes/hide-if.md index bb1a05c..57fd42d 100644 --- a/docs/articles/en/attributes/hide-if.md +++ b/docs/articles/en/attributes/hide-if.md @@ -1,6 +1,6 @@ # Hide If Attribute -Hides the member in the Inspector if the boolean value is true. +Hides the member in the Inspector when the specified condition evaluates to true. ![img](../../../images/img-attribute-hide-if-false.png) @@ -24,4 +24,4 @@ public int hideIfMethod; | Parameter | Description | | - | - | -| Condition | The name of the field, property, or method used for the condition evaluation. | \ No newline at end of file +| Condition | The name of the field, property, or method used to evaluate the condition. | diff --git a/docs/articles/en/attributes/hide-in-edit-mode.md b/docs/articles/en/attributes/hide-in-edit-mode.md index d1ea8b9..7564854 100644 --- a/docs/articles/en/attributes/hide-in-edit-mode.md +++ b/docs/articles/en/attributes/hide-in-edit-mode.md @@ -9,4 +9,4 @@ Hides the field while in Edit Mode. ```cs [HideInEditMode] public float foo; -``` \ No newline at end of file +``` diff --git a/docs/articles/en/attributes/hide-in-play-mode.md b/docs/articles/en/attributes/hide-in-play-mode.md index fb2b137..c190bd6 100644 --- a/docs/articles/en/attributes/hide-in-play-mode.md +++ b/docs/articles/en/attributes/hide-in-play-mode.md @@ -9,4 +9,4 @@ Hides the field while in Play Mode. ```cs [HideInPlayMode] public float foo; -``` \ No newline at end of file +``` diff --git a/docs/articles/en/attributes/hide-label.md b/docs/articles/en/attributes/hide-label.md index 39e1032..658daf5 100644 --- a/docs/articles/en/attributes/hide-label.md +++ b/docs/articles/en/attributes/hide-label.md @@ -13,4 +13,4 @@ public Vector3 bar; [HideLabel] public GameObject baz; -``` \ No newline at end of file +``` diff --git a/docs/articles/en/attributes/hide-script-field.md b/docs/articles/en/attributes/hide-script-field.md index d8b6e57..ef63d0a 100644 --- a/docs/articles/en/attributes/hide-script-field.md +++ b/docs/articles/en/attributes/hide-script-field.md @@ -12,4 +12,4 @@ public class HideScriptFieldSample : MonoBehaviour public Vector3 bar; public GameObject baz; } -``` \ No newline at end of file +``` diff --git a/docs/articles/en/attributes/horizontal-group.md b/docs/articles/en/attributes/horizontal-group.md index a3d8466..ae01210 100644 --- a/docs/articles/en/attributes/horizontal-group.md +++ b/docs/articles/en/attributes/horizontal-group.md @@ -1,4 +1,4 @@ -# Horizontal Attribute +# Horizontal Group Attribute Creates a group that displays multiple members horizontally. @@ -41,4 +41,4 @@ public GameObject gamma; | Parameter | Description | | - | - | -| GroupPath | Specifies the path of the group. Groups can be nested using `/`. | \ No newline at end of file +| GroupPath | Specifies the path of the group. Groups can be nested using `/`. | diff --git a/docs/articles/en/attributes/horizontal-line.md b/docs/articles/en/attributes/horizontal-line.md index 863e77b..7f961d5 100644 --- a/docs/articles/en/attributes/horizontal-line.md +++ b/docs/articles/en/attributes/horizontal-line.md @@ -20,4 +20,4 @@ public GameObject baz; | r | Red component of the line color | | g | Green component of the line color | | b | Blue component of the line color | -| a | Alpha value of the line color | \ No newline at end of file +| a | Alpha value of the line color | diff --git a/docs/articles/en/attributes/indent.md b/docs/articles/en/attributes/indent.md index 66d8d79..48d151a 100644 --- a/docs/articles/en/attributes/indent.md +++ b/docs/articles/en/attributes/indent.md @@ -17,4 +17,4 @@ public GameObject baz; | Parameter | Description | | - | - | -| Indent | Number of indents | \ No newline at end of file +| Indent | Number of indent levels | diff --git a/docs/articles/en/attributes/inline-editor.md b/docs/articles/en/attributes/inline-editor.md index 09f6ca5..5b70a07 100644 --- a/docs/articles/en/attributes/inline-editor.md +++ b/docs/articles/en/attributes/inline-editor.md @@ -1,10 +1,10 @@ # Inline Editor Attribute -Displays the Inspector of the target ScriptableObject or component inline, allowing for editing. +Displays the Inspector for the referenced `ScriptableObject` or component inline, allowing it to be edited in place. ![img](../../../images/img-attribute-inline-editor.png) ```cs [InlineEditor] public SampleScriptableObject sample; -``` \ No newline at end of file +``` diff --git a/docs/articles/en/attributes/label-text.md b/docs/articles/en/attributes/label-text.md index b76b3ec..dbe4f1d 100644 --- a/docs/articles/en/attributes/label-text.md +++ b/docs/articles/en/attributes/label-text.md @@ -27,4 +27,4 @@ public GameObject gamma; | Parameter | Description | | - | - | -| Text | The text to display on the field label | \ No newline at end of file +| Text | The text to display on the field label | diff --git a/docs/articles/en/attributes/list-view-settings.md b/docs/articles/en/attributes/list-view-settings.md index 85aeee4..32db8c2 100644 --- a/docs/articles/en/attributes/list-view-settings.md +++ b/docs/articles/en/attributes/list-view-settings.md @@ -1,6 +1,6 @@ # List View Settings Attribute -Changes the display settings for collections. This attribute allows you to enhance the readability of rows, and create arrays where the element count/order cannot be changed from the Inspector. +Changes how collections are displayed. This attribute can improve row readability and prevent users from changing the collection size or element order in the Inspector. ![img](../../../images/img-attribute-list-view-settings.png) @@ -18,11 +18,11 @@ public Vector3[] array2 = new Vector3[] | Parameter | Description | | - | - | -| ShowAddRemoveFooter | Whether to display the footer for adding/removing elements | +| ShowAddRemoveFooter | Whether to display the footer used to add or remove elements | | ShowAlternatingRowBackgrounds | Whether to change the background color for every other row | -| ShowBorder | Whether to display borders | -| ShowBoundCollectionSize | Whether to display the field for changing the number of elements | +| ShowBorder | Whether to display a border | +| ShowBoundCollectionSize | Whether to display the field used to change the collection size | | ShowFoldoutHeader | Whether to display the foldout header | -| SelectionType | Selection settings for elements | +| SelectionType | How elements can be selected | | Reorderable | Whether elements can be reordered | -| ReorderMode | Settings for displaying reordering | \ No newline at end of file +| ReorderMode | How reordering is displayed | diff --git a/docs/articles/en/attributes/on-inspector-destroy.md b/docs/articles/en/attributes/on-inspector-destroy.md index bfdacf7..4b6fcf4 100644 --- a/docs/articles/en/attributes/on-inspector-destroy.md +++ b/docs/articles/en/attributes/on-inspector-destroy.md @@ -8,4 +8,4 @@ void OnInspectorDestroy() { Debug.Log("Destroy"); } -``` \ No newline at end of file +``` diff --git a/docs/articles/en/attributes/on-inspector-disable.md b/docs/articles/en/attributes/on-inspector-disable.md index a8d82f1..f45a498 100644 --- a/docs/articles/en/attributes/on-inspector-disable.md +++ b/docs/articles/en/attributes/on-inspector-disable.md @@ -8,4 +8,4 @@ void OnInspectorDisable() { Debug.Log("Disable"); } -``` \ No newline at end of file +``` diff --git a/docs/articles/en/attributes/on-inspector-enable.md b/docs/articles/en/attributes/on-inspector-enable.md index bbc20af..fb38d8c 100644 --- a/docs/articles/en/attributes/on-inspector-enable.md +++ b/docs/articles/en/attributes/on-inspector-enable.md @@ -8,4 +8,4 @@ void OnInspectorEnable() { Debug.Log("Enable"); } -``` \ No newline at end of file +``` diff --git a/docs/articles/en/attributes/on-list-view-changed.md b/docs/articles/en/attributes/on-list-view-changed.md index 071a2cb..a42982c 100644 --- a/docs/articles/en/attributes/on-list-view-changed.md +++ b/docs/articles/en/attributes/on-list-view-changed.md @@ -3,7 +3,7 @@ Detects changes in collections and invokes methods accordingly. Refer to Unity's [ListView documentation](https://docs.unity3d.com/ScriptReference/UIElements.ListView.html) for details on each event. > [!WARNING] -> Ensure that the types of arguments for each event exactly match the arguments listed below (or the ListView event arguments). Failure to match will result in errors and the method won't execute. +> Ensure that each callback method's parameter types exactly match the corresponding `ListView` event signature shown below. Otherwise, Alchemy reports an error and does not invoke the method. ```cs [OnListViewChanged( @@ -48,6 +48,6 @@ void OnItemIndexChanged(int before, int after) | OnItemsAdded | Name of the method called when items are added `(IEnumerable indices)` | | OnItemsRemoved | Name of the method called when items are removed `(IEnumerable indices)` | | OnItemsChosen | Name of the method called when items are chosen by pressing Enter or double-clicking `(IEnumerable items)` | -| OnItemsSourceChanged | Name of the method called when the original collection changes, such as its count `(no arguments)` | +| OnItemsSourceChanged | Name of the method called when the source collection changes, such as when its count changes `(no arguments)` | | OnSelectionChanged | Name of the method called when the selected items change `(IEnumerable items)` | | OnSelectedIndicesChanged | Name of the method called when the selected indices change `(IEnumerable indices)` | diff --git a/docs/articles/en/attributes/on-value-changed.md b/docs/articles/en/attributes/on-value-changed.md index af4eea7..c42bed5 100644 --- a/docs/articles/en/attributes/on-value-changed.md +++ b/docs/articles/en/attributes/on-value-changed.md @@ -14,4 +14,4 @@ void OnValueChanged(int value) | Parameter | Description | | - | - | -| MethodName | The name of the method to be called when the value changes. | \ No newline at end of file +| MethodName | The name of the method to be called when the value changes. | diff --git a/docs/articles/en/attributes/order.md b/docs/articles/en/attributes/order.md index 39adabe..7766e49 100644 --- a/docs/articles/en/attributes/order.md +++ b/docs/articles/en/attributes/order.md @@ -1,6 +1,6 @@ # Order Attribute -Changes the display order of the field. The default value of order is 0, and members are displayed in ascending order. +Changes the display order of the field. The default order is 0, and members are displayed in ascending order. ![img](../../../images/img-attribute-order.png) @@ -17,4 +17,4 @@ public GameObject baz; | Parameter | Description | | - | - | -| Order | The display order of the member. | \ No newline at end of file +| Order | The display order of the member. | diff --git a/docs/articles/en/attributes/required.md b/docs/articles/en/attributes/required.md index 8a8d57b..eaf7063 100644 --- a/docs/articles/en/attributes/required.md +++ b/docs/articles/en/attributes/required.md @@ -1,6 +1,6 @@ # Required Attribute -Displays a warning if the field does not have an object reference assigned. +Displays a warning when no object reference is assigned to the field. ![img](../../../images/img-attribute-required.png) diff --git a/docs/articles/en/attributes/show-if.md b/docs/articles/en/attributes/show-if.md index 0e7bc15..745ab8f 100644 --- a/docs/articles/en/attributes/show-if.md +++ b/docs/articles/en/attributes/show-if.md @@ -1,6 +1,6 @@ # Show If Attribute -Displays in the Inspector only if the boolean value of the target member is true. +Displays the field in the Inspector when the specified condition evaluates to true. ![img](../../../images/img-attribute-show-if-false.png) @@ -24,4 +24,4 @@ public int showIfMethod; | Parameter | Description | | - | - | -| Condition | The name of the field, property, or method used for condition checking | \ No newline at end of file +| Condition | The name of the field, property, or method used to evaluate the condition. | diff --git a/docs/articles/en/attributes/show-in-inspector.md b/docs/articles/en/attributes/show-in-inspector.md index 8e818b6..6f1ad65 100644 --- a/docs/articles/en/attributes/show-in-inspector.md +++ b/docs/articles/en/attributes/show-in-inspector.md @@ -1,6 +1,6 @@ # Show In Inspector Attribute -Allows non-serialized fields or properties to be edited in the Inspector. Note that these values are not serialized, and changes are not saved. +Displays nonserialized fields and properties in the Inspector. Writable members can be edited, but their values are not serialized or persisted. ![img](../../../images/img-attribute-show-in-inspector.png) @@ -16,4 +16,4 @@ public int Getter => 10; [field: NonSerialized, ShowInInspector] public string Property { get; set; } = string.Empty; -``` \ No newline at end of file +``` diff --git a/docs/articles/en/attributes/tab-group.md b/docs/articles/en/attributes/tab-group.md index 4c157c6..6a50e46 100644 --- a/docs/articles/en/attributes/tab-group.md +++ b/docs/articles/en/attributes/tab-group.md @@ -27,4 +27,4 @@ public GameObject gamma; | Parameter | Description | | - | - | | GroupPath | Specifies the path of the group. Groups can be nested using `/`. | -| TabName | Specifies the name of the tab to which the member belongs. | \ No newline at end of file +| TabName | Specifies the name of the tab to which the member belongs. | diff --git a/docs/articles/en/attributes/title.md b/docs/articles/en/attributes/title.md index ffec6dd..9687ee5 100644 --- a/docs/articles/en/attributes/title.md +++ b/docs/articles/en/attributes/title.md @@ -19,4 +19,4 @@ public GameObject gamma; | Parameter | Description | | - | - | | Title | Text to display in the header. | -| Subtitle | Text displayed below the title in smaller font. | \ No newline at end of file +| Subtitle | Text displayed below the title in smaller font. | diff --git a/docs/articles/en/attributes/validate-input.md b/docs/articles/en/attributes/validate-input.md index 98a8178..d154be3 100644 --- a/docs/articles/en/attributes/validate-input.md +++ b/docs/articles/en/attributes/validate-input.md @@ -1,6 +1,6 @@ # Validate Input Attribute -Displays a warning if the value of the specified member is false. +Displays a warning when the specified validation condition evaluates to false. ![img](../../../images/img-attribute-validate-input.png) @@ -25,4 +25,4 @@ static bool IsZeroOrGreater(int a) | Parameter | Description | | - | - | | Condition | Name of the field, property, or method used for validation. | -| Message | Text displayed in the warning. | \ No newline at end of file +| Message | Text displayed in the warning. | diff --git a/docs/articles/en/button-attribute.md b/docs/articles/en/button-attribute.md index 0b615ac..7714938 100644 --- a/docs/articles/en/button-attribute.md +++ b/docs/articles/en/button-attribute.md @@ -4,6 +4,7 @@ By adding the `[Button]` attribute to a method, you can display a button in the ```cs using System; +using System.Text; using UnityEngine; using Alchemy.Inspector; @@ -42,4 +43,4 @@ public class ButtonAttributeExample : MonoBehaviour } ``` -![img](../../images/img-button.png) \ No newline at end of file +![img](../../images/img-button.png) diff --git a/docs/articles/en/comparison-with-other-libraries.md b/docs/articles/en/comparison-with-other-libraries.md index 8f5890e..597e0f4 100644 --- a/docs/articles/en/comparison-with-other-libraries.md +++ b/docs/articles/en/comparison-with-other-libraries.md @@ -1,6 +1,6 @@ # Comparison with Other Libraries -Alchemy offers features equivalent to or surpassing those of other assets/libraries for editor extensions. Here's a comparison of Alchemy's features with other assets/libraries: +The table below compares Alchemy with other Inspector and editor-extension libraries: | | Alchemy | [Odin Inspector & Serializer](https://odininspector.com/) | [NaughtyAttributes](https://github.com/dbrizov/NaughtyAttributes) | [Tri Inspector](https://github.com/codewriter-packages/Tri-Inspector) | [Unity Editor Toolbox](https://github.com/arimger/Unity-Editor-Toolbox) | | - | - | - | - | - | - | @@ -9,7 +9,7 @@ Alchemy offers features equivalent to or surpassing those of other assets/librar | Button Attribute | ✔︎ | ✔︎ | ✔︎
(without arguments) | ✔︎ | ✔︎
(without arguments) | | Editing NonSerialized Members | ✔︎ | ✔︎ | ❌ | ✔︎ | ❌ | | SerializeReference Support | ✔︎ | ✔︎ | ❌ | ✔︎ | ✔︎ | -| Serialization Extension | ✔︎
(requires partial) | ✔︎
(inherit from dedicated types) | ❌ | ❌ | ❌
(provides serializable types) | +| Serialization Extension | ✔︎
(requires a partial type) | ✔︎
(requires inheritance from dedicated base types) | ❌ | ❌ | ❌
(provides serializable types) | | UI Toolkit Support | ✔︎ | ✔︎ | ❌ | ✔︎ | ❌ | | EditorWindow Extensions | ✔︎ | ✔︎ | ❌ | ❌ | ❌ | | Hierarchy Extensions | ✔︎ | ❌ | ❌ | ❌ | ✔︎ | diff --git a/docs/articles/en/creating-custom-attribute.md b/docs/articles/en/creating-custom-attribute.md index 76501f7..e3fb88c 100644 --- a/docs/articles/en/creating-custom-attribute.md +++ b/docs/articles/en/creating-custom-attribute.md @@ -1,6 +1,6 @@ # Creating Custom Attributes -By using `AlchemyAttributeDrawer`, it is possible to create custom attributes that work within Alchemy. Here is an example demonstrating the implementation of `HelpBoxAttribute` and its corresponding drawer. +You can create custom attributes for Alchemy by deriving a drawer from `AlchemyAttributeDrawer`. The following example implements `HelpBoxAttribute` and its drawer. First, define the attribute to be added to fields or properties. @@ -21,7 +21,7 @@ public sealed class HelpBoxAttribute : Attribute } ``` -Next, create the drawer corresponding to the defined attribute. Drawer scripts should be placed within the Editor folder. +Next, create a drawer for the attribute. Place drawer scripts in an `Editor` folder. ```cs using UnityEngine.UIElements; @@ -43,6 +43,6 @@ public sealed class HelpBoxDrawer : AlchemyAttributeDrawer } ``` -Implement the `OnCreateElement()` method to add processing when creating the corresponding VisualElement for the member. Unlike regular `PropertyDrawer`s that override the drawing process, here we're adding post-processing after the creation of the Visual Element. This mechanism allows Alchemy to combine multiple drawers. +Implement `OnCreateElement()` to modify the member's `VisualElement` after it is created. Unlike regular `PropertyDrawer` implementations, which replace the drawing process, an `AlchemyAttributeDrawer` applies post-processing to an existing element. This mechanism allows Alchemy to combine multiple drawers. -Additionally, make sure to add the `CustomAttributeDrawer` attribute to the defined drawer, with the type of the defined attribute as an argument. Alchemy uses this attribute to search for the necessary drawers for element rendering. +Add `[CustomAttributeDrawer]` to the drawer and pass it the custom attribute's type. Alchemy uses this metadata to find the drawers required to render each element. diff --git a/docs/articles/en/creating-custom-group-attribute.md b/docs/articles/en/creating-custom-group-attribute.md index 739c110..b387fca 100644 --- a/docs/articles/en/creating-custom-group-attribute.md +++ b/docs/articles/en/creating-custom-group-attribute.md @@ -1,8 +1,8 @@ # Creating Custom Group Attributes -By using `AlchemyGroupDrawer`, it is possible to create custom attributes for grouping fields. Here is an example demonstrating the implementation of `FoldoutGroupAttribute` and its corresponding drawer. (Some parts of the actual implementation have been omitted for the sake of explanation.) +You can create custom field-grouping attributes by deriving a drawer from `AlchemyGroupDrawer`. The following example implements `FoldoutGroupAttribute` and its drawer. Some implementation details are omitted for clarity. -First, define the attribute to be used for defining groups. This attribute must inherit from `PropertyGroupAttribute`. +First, define the attribute that identifies the groups. It must inherit from `PropertyGroupAttribute`. ```cs using Alchemy.Inspector; @@ -14,7 +14,7 @@ public sealed class FoldoutGroupAttribute : PropertyGroupAttribute } ``` -Next, create the drawer corresponding to the defined attribute. Drawer scripts should be placed within the Editor folder. +Next, create a drawer for the attribute. Place drawer scripts in an `Editor` folder. ```cs using UnityEngine.UIElements; @@ -38,4 +38,4 @@ public sealed class FoldoutGroupDrawer : AlchemyGroupDrawer } ``` -Implement the `CreateRootElement(string label)` method to create the root VisualElement for each group. Additionally, make sure to add the `CustomGroupDrawer` attribute to the defined drawer, with the type of the defined attribute as an argument. Alchemy uses this attribute to search for the necessary drawers for group rendering. \ No newline at end of file +Implement `CreateRootElement(string label)` to create the root `VisualElement` for each group. Add `[CustomGroupDrawer]` to the drawer and pass it the custom attribute's type. Alchemy uses this metadata to find the drawers required to render each group. diff --git a/docs/articles/en/debugging-serialized-data.md b/docs/articles/en/debugging-serialized-data.md index a8d0f9d..33a5042 100644 --- a/docs/articles/en/debugging-serialized-data.md +++ b/docs/articles/en/debugging-serialized-data.md @@ -1,6 +1,6 @@ # Debugging Serialized Data -By adding the `[ShowAlchemySerializationData]` attribute along with `[AlchemySerialize]`, you can inspect serialized data from the Inspector. +By adding `[ShowAlchemySerializationData]` alongside `[AlchemySerialize]`, you can inspect the serialized data in the Inspector. ```cs using System; diff --git a/docs/articles/en/decorating-hierarchy.md b/docs/articles/en/decorating-hierarchy.md index 4f479a0..aff693e 100644 --- a/docs/articles/en/decorating-hierarchy.md +++ b/docs/articles/en/decorating-hierarchy.md @@ -1,4 +1,4 @@ -# Decorating Hierarchy +# Decorating the Hierarchy Alchemy allows you to decorate the Hierarchy by adding headers and separators, making it more visually appealing and easier to navigate. @@ -8,12 +8,12 @@ To add headers and separators, navigate to the Hierarchy and click the "+" butto ![img](../../images/img-create-hierarchy-object.png) -These objects used for decoration in the Hierarchy are called `HierarchyObjects` in Alchemy. They are excluded from the build process. If any child objects exist, they will be detached using `transform.DetachChildren()` before deletion. +Alchemy calls these decorative objects `HierarchyObjects`. They are excluded from builds. Before a `HierarchyObject` is deleted, any children are detached using `transform.DetachChildren()`. You can configure the handling of `HierarchyObjects` in the Alchemy settings under `Project Settings > Alchemy`. ![img](../../images/img-project-settings.png) -For individual `HierarchyObjects`, you can adjust their settings from the Inspector. +You can adjust the settings of individual `HierarchyObjects` in the Inspector. -![img](../../images/img-hierarchy-header-inspector.png) \ No newline at end of file +![img](../../images/img-hierarchy-header-inspector.png) diff --git a/docs/articles/en/disable-default-editor.md b/docs/articles/en/disable-default-editor.md index b691967..848bdc9 100644 --- a/docs/articles/en/disable-default-editor.md +++ b/docs/articles/en/disable-default-editor.md @@ -1,5 +1,5 @@ # Disabling the Default Editor -By default, Alchemy uses its own editor class to handle the drawing of all types. However, to avoid conflicts with other libraries or assets, you can disable this behavior. +By default, Alchemy uses its own editor class to render supported types. You can disable this behavior to avoid conflicts with other libraries or assets. -To disable the default editor, add `ALCHEMY_DISABLE_DEFAULT_EDITOR` to the `Scripting Define Symbols` field in `Project Settings > Player`. If you want to use Alchemy's features while this option is enabled, you'll need to define your own editor class that inherits from `AlchemyEditor`. \ No newline at end of file +To disable Alchemy's default editor, add `ALCHEMY_DISABLE_DEFAULT_EDITOR` to the `Scripting Define Symbols` field under `Project Settings > Player`. To continue using Alchemy features while this symbol is defined, create a custom editor class that inherits from `AlchemyEditor`. diff --git a/docs/articles/en/extending-alchemy-editor.md b/docs/articles/en/extending-alchemy-editor.md index de61a37..950a8aa 100644 --- a/docs/articles/en/extending-alchemy-editor.md +++ b/docs/articles/en/extending-alchemy-editor.md @@ -1,10 +1,11 @@ # Extending AlchemyEditor If a MonoBehaviour or ScriptableObject has its own custom editor class, Alchemy attributes won't work by default. -To combine your custom editor extension with Alchemy, you need to inherit from `AlchemyEditor` class instead of the regular `Editor` class. +To combine a custom editor with Alchemy, inherit from the `AlchemyEditor` class instead of the standard `Editor` class. ```cs using UnityEditor; +using UnityEngine.UIElements; using Alchemy.Editor; [CustomEditor(typeof(Example))] @@ -13,9 +14,11 @@ public class EditorExample : AlchemyEditor public override VisualElement CreateInspectorGUI() { // Always call the base CreateInspectorGUI - base.CreateInspectorGUI(); + var root = base.CreateInspectorGUI(); // Add your custom logic here + + return root; } } -``` \ No newline at end of file +``` diff --git a/docs/articles/en/group-attributes.md b/docs/articles/en/group-attributes.md index 68a1584..766b265 100644 --- a/docs/articles/en/group-attributes.md +++ b/docs/articles/en/group-attributes.md @@ -30,7 +30,7 @@ public class GroupAttributesExample : MonoBehaviour ![img](../../images/img-group-1.png) -Each group can be nested by using slashes. +Groups can be nested by separating group names with slashes. ```cs using UnityEngine; @@ -60,7 +60,7 @@ public class GroupAttributesExample : MonoBehaviour ![img](../../images/img-group-2.png) -Additionally, you can add group attributes to a defined Serializable class to change how its members are displayed within corresponding groups. +You can also apply a group attribute to a class marked with `[Serializable]` to control how its members are displayed within the group. ```cs using System; @@ -82,4 +82,4 @@ public class GroupAttributeExample : MonoBehaviour } ``` -![img](../../images/img-group-3.png) \ No newline at end of file +![img](../../images/img-group-3.png) diff --git a/docs/articles/en/hierarchy-toggles-and-icons.md b/docs/articles/en/hierarchy-toggles-and-icons.md index ea51b4a..8ae57ce 100644 --- a/docs/articles/en/hierarchy-toggles-and-icons.md +++ b/docs/articles/en/hierarchy-toggles-and-icons.md @@ -1,9 +1,9 @@ # Toggles and Icons -By integrating Alchemy, you can add toggles to the Hierarchy to switch objects between active and inactive states, as well as icons for each component. +Alchemy can display active-state toggles and component icons for each object in the Hierarchy. ![gif](../../images/gif-hierarchy-toggle.gif) These features are disabled by default. You can configure Hierarchy display settings in `Project Settings > Alchemy`. -![img](../../images/img-project-settings.png) \ No newline at end of file +![img](../../images/img-project-settings.png) diff --git a/docs/articles/en/inspector-extension-with-attributes.md b/docs/articles/en/inspector-extension-with-attributes.md index 42b71ae..f01d0e6 100644 --- a/docs/articles/en/inspector-extension-with-attributes.md +++ b/docs/articles/en/inspector-extension-with-attributes.md @@ -1,11 +1,11 @@ -# Inspector Extension with Attributes +# Inspector Extensions with Attributes Alchemy allows you to extend the Inspector using attributes. To customize the display in the Inspector, you can add attributes to the fields of your class. ```cs using UnityEngine; using UnityEngine.UIElements; -using Alchemy.Inspector; // Add Alchemy.Inspector namespace +using Alchemy.Inspector; // Import the Alchemy.Inspector namespace public class AttributesExample : MonoBehaviour { @@ -25,4 +25,4 @@ public class AttributesExample : MonoBehaviour } ``` -![img](../../images/img-attributes-example.png) \ No newline at end of file +![img](../../images/img-attributes-example.png) diff --git a/docs/articles/en/installation.md b/docs/articles/en/installation.md index d320561..53ee31b 100644 --- a/docs/articles/en/installation.md +++ b/docs/articles/en/installation.md @@ -1,13 +1,13 @@ # Installation -Let's install Alchemy into your project to start using it. +Install Alchemy in your project using one of the following methods. -### Requirements +## Requirements * Unity 2021.2 or later (Unity 2022.1 or later recommended for serialization extensions) -* Serialization 2.0 or later (if using serialization extensions) +* Unity.Serialization 2.0 or later (if using serialization extensions) -### Install via Package Manager (Recommended) +## Install via Package Manager (Recommended) You can install Alchemy via the Package Manager. @@ -31,10 +31,10 @@ Alternatively, you can add the following line to the dependencies block in your } ``` -### Install from unitypackage +## Install from a `.unitypackage` File -You can also install Alchemy from a unitypackage file. +You can also install Alchemy from a `.unitypackage` file. -1. Go to Releases and navigate to the latest release. -2. Download the unitypackage file. +1. Open the latest release on the Releases page. +2. Download the `.unitypackage` file. 3. Open the file and import it into your project. diff --git a/docs/articles/en/saving-editor-window-data.md b/docs/articles/en/saving-editor-window-data.md index c987079..724568f 100644 --- a/docs/articles/en/saving-editor-window-data.md +++ b/docs/articles/en/saving-editor-window-data.md @@ -1,8 +1,8 @@ # Saving EditorWindow Data -The data of an editor window created by inheriting from `AlchemyEditorWindow` is automatically saved in JSON format within the ProjectSettings folder of your project. +Data for an editor window derived from `AlchemyEditorWindow` is automatically saved as JSON in the project's `ProjectSettings` folder. -You can customize the saving/loading process and the destination path by overriding the `SaveWindowData()`, `LoadWindowData()`, and `GetWindowDataPath()` methods. +You can customize the save/load behavior and destination path by overriding the `SaveWindowData()`, `LoadWindowData()`, and `GetWindowDataPath()` methods. ```cs using UnityEditor; @@ -26,14 +26,14 @@ public class EditorWindowExample : AlchemyEditorWindow protected override void LoadWindowData(string dataPath) { - // Write the loading process here + // Implement the loading process here ... } protected override void SaveWindowData(string dataPath) { - // Write the saving process here + // Implement the saving process here ... } } -``` \ No newline at end of file +``` diff --git a/docs/articles/en/serialization-callback.md b/docs/articles/en/serialization-callback.md index 9c52cf4..a1e50dc 100644 --- a/docs/articles/en/serialization-callback.md +++ b/docs/articles/en/serialization-callback.md @@ -1,8 +1,8 @@ # Serialization Callbacks -When using the `[AlchemySerialize]` attribute, the Source Generator automatically implements `ISerializationCallbackReceiver`. Therefore, you cannot use `ISerializationCallbackReceiver` to add callbacks. +When you add `[AlchemySerialize]`, Alchemy's source generator automatically implements `ISerializationCallbackReceiver`. Therefore, you cannot implement that interface yourself to add callbacks. -Instead, Alchemy provides an alternative interface called `IAlchemySerializationCallbackReceiver`. Please use this interface instead of `ISerializationCallbackReceiver` when using `[AlchemySerialize]`. +Instead, implement Alchemy's `IAlchemySerializationCallbackReceiver` interface when using `[AlchemySerialize]`. ```cs [AlchemySerialize] @@ -18,4 +18,4 @@ public partial class AlchemySerializationSample : MonoBehaviour, IAlchemySeriali Debug.Log("OnBeforeSerialize"); } } -``` \ No newline at end of file +``` diff --git a/docs/articles/en/serialization-extension.md b/docs/articles/en/serialization-extension.md index a37e043..a8a32bc 100644 --- a/docs/articles/en/serialization-extension.md +++ b/docs/articles/en/serialization-extension.md @@ -1,16 +1,16 @@ # Serialization Extension -If you want to edit types that Unity cannot serialize normally, such as Dictionary, you can serialize them using the `[AlchemySerialize]` attribute. +To edit types that Unity does not normally serialize, such as dictionaries, use the `[AlchemySerialize]` attribute. -To use serialization extension, you need the [Unity.Serialization](https://docs.unity3d.com/Packages/com.unity.serialization@3.1/manual/index.html) package. Also, please note that reflection-based Unity.Serialization serialization may not work in AOT environments prior to Unity 2022.1. Please refer to the package manual for details. +To use the serialization extension, install the [Unity.Serialization](https://docs.unity3d.com/Packages/com.unity.serialization@3.1/manual/index.html) package. Reflection-based serialization with Unity.Serialization may not work in AOT environments before Unity 2022.1. Refer to the package manual for details. -Here is a sample using Alchemy's serialization extension to serialize various types and make them editable in the Inspector: +The following example uses Alchemy's serialization extension to serialize several types and make them editable in the Inspector: ```cs using System; using System.Collections.Generic; using UnityEngine; -using Alchemy.Serialization; // Add Alchemy.Serialization namespace +using Alchemy.Serialization; // Import the Alchemy.Serialization namespace [AlchemySerialize] public partial class AlchemySerializationExample : MonoBehaviour @@ -44,6 +44,6 @@ Currently, the following types can be edited in the Inspector: - Dictionary<,> - ValueTuple<> - Nullable<> -- class/struct consisting of the above types +- Classes and structs composed of the types above -For technical details on serialization, please refer to [Alchemy's Serialization Process](alchemy-serialization-process.md). \ No newline at end of file +For technical details on serialization, please refer to [Alchemy's Serialization Process](alchemy-serialization-process.md). diff --git a/docs/articles/en/serialize-reference.md b/docs/articles/en/serialize-reference.md index cde1a1d..d987d10 100644 --- a/docs/articles/en/serialize-reference.md +++ b/docs/articles/en/serialize-reference.md @@ -35,6 +35,6 @@ public class SerializeReferenceExample : MonoBehaviour ![img](../../images/img-serialize-reference.png) -Interfaces and abstract classes are displayed as shown above, and you can select and create subclasses from the dropdown. +Interfaces and abstract classes are displayed as shown above. You can select and instantiate a concrete implementation from the dropdown. For more information about SerializeReference serialization, please refer to [Unity's official documentation](https://docs.unity3d.com/6000.1/Documentation/ScriptReference/SerializeReference.html). diff --git a/docs/articles/en/toc.yml b/docs/articles/en/toc.yml index f724391..9000334 100644 --- a/docs/articles/en/toc.yml +++ b/docs/articles/en/toc.yml @@ -1,11 +1,11 @@ -- name: Get Started +- name: Getting Started - name: Alchemy Overview href: about.md - name: Installation href: installation.md - name: Inspector -- name: Inspector Extension with Attributes +- name: Inspector Extensions with Attributes href: inspector-extension-with-attributes.md - name: Group Attributes href: group-attributes.md @@ -102,7 +102,7 @@ - name: Hierarchy - name: Toggles and Icons href: hierarchy-toggles-and-icons.md -- name: Decorating Hierarchy +- name: Decorating the Hierarchy href: decorating-hierarchy.md - name: Editor Window @@ -118,19 +118,19 @@ href: alchemy-serialization-process.md - name: Debugging Serialized Data href: debugging-serialized-data.md -- name: Serialization Callback +- name: Serialization Callbacks href: serialization-callback.md - name: Extensions -- name: Extending Alchemy Editor +- name: Extending AlchemyEditor href: extending-alchemy-editor.md -- name: Creating Custom Attribute +- name: Creating Custom Attributes href: creating-custom-attribute.md -- name: Creating Custom Group Attribute +- name: Creating Custom Group Attributes href: creating-custom-group-attribute.md -- name: Others -- name: Disable Default Editor +- name: Other Topics +- name: Disabling the Default Editor href: disable-default-editor.md - name: Comparison with Other Libraries - href: comparison-with-other-libraries.md \ No newline at end of file + href: comparison-with-other-libraries.md diff --git a/docs/docfx.json b/docs/docfx.json index 38fa07c..6660fdd 100644 --- a/docs/docfx.json +++ b/docs/docfx.json @@ -69,4 +69,4 @@ "baseUrl": "https://annulusgames.github.io/Alchemy" } } -} \ No newline at end of file +} diff --git a/docs/index.md b/docs/index.md index 449ed5e..5a4e521 100644 --- a/docs/index.md +++ b/docs/index.md @@ -2,10 +2,10 @@ ![header](images/header.png) -Alchemy is a library that adds a rich set of editor extensions for Unity. It provides inspector attributes, hierarchy extensions, editor window extensions, serialization extensions using source generators, and more. +Alchemy is a library that adds a rich set of editor extensions for Unity. It provides Inspector attributes, Hierarchy extensions, editor-window extensions, source-generated serialization extensions, and more. https://github.com/annulusgames/Alchemy -### License +## License -This library is under the [MIT License](https://github.com/annulusgames/Alchemy/LICENSE). \ No newline at end of file +This library is available under the [MIT License](https://github.com/annulusgames/Alchemy/blob/main/LICENSE). diff --git a/docs/toc.yml b/docs/toc.yml index 523038f..eeb2887 100644 --- a/docs/toc.yml +++ b/docs/toc.yml @@ -3,4 +3,4 @@ - name: Docs (日本語) href: articles/ja/ - name: API - href: api/ \ No newline at end of file + href: api/