Skip to content

Commit 0664f0f

Browse files
committed
updated readme
1 parent bd30d67 commit 0664f0f

1 file changed

Lines changed: 38 additions & 2 deletions

File tree

README.md

Lines changed: 38 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,18 @@
44
[![twitter](https://img.shields.io/twitter/follow/JoGiezi?style=social)](https://twitter.com/JoGiezi)
55

66
# Scriptable Object Variant for Unity (Scriptable Object Data Overrider)
7+
8+
> [!CAUTION]
9+
> If you are upgrading from a pre-`2.0.0` version, please read the [upgrade section](#upgrading-to-200-from-previous-versions)
10+
11+
## Table of contents
12+
- [Description](#description)
13+
- [Usage](#usage)
14+
- [Implementation](#implementation)
15+
- [Installation](#installation)
16+
- [Upgrading to 2.0.0 from previous versions](#upgrading-to-200-from-previous-versions)
17+
- [Known issues and tweaks to be made](#known-issues-and-tweaks-to-be-made)
18+
719
## Description
820
Adds a field to any scriptable object tagged with the `[SOVariant]` attribute that lets you select an original SO (parent) and override selected fields in the child object.
921

@@ -87,10 +99,19 @@ SOVariantHelper<ScriptableObject>.SetParentOverrideValues(target, parent, new Di
8799

88100
## Implementation
89101
The visual interface is implemented in [Odin](odininspector.com/)'s [`OdinPropertyProcessor`](https://odininspector.com/tutorials/using-property-resolvers-and-attribute-processors/custom-property-processors).
90-
The data with the parent and the overriden fields is kept serialized inside the asset's metadata, set in unity with `AssetImporter.GetAtPath(AssetDatabase.GetAssetPath(targetObject)).userData`.
102+
103+
The data with the parent and the overriden fields is kept in a library object located at `Assets/Plugins/SOVariant/Editor/SOVariantDataLibrary.asset`
104+
105+
<p style="color: grey";>Before 2.0.0:
106+
<strike>The data with the parent and the overriden fields is kept serialized inside the asset's metadata, set in unity with `AssetImporter.GetAtPath(AssetDatabase.GetAssetPath(targetObject)).userData`.</strike></p>
91107

92108
## Installation
93-
> Requires [Odin](odininspector.com/) to be installed before adding the package
109+
> [!WARNING]
110+
> Requires [Odin](odininspector.com/) version `3.2.1.0` to be installed before adding the package.
111+
112+
> [!WARNING]
113+
> This package is maintained for Unity version 2022.3.16f1 LTS.
114+
94115
### Using Unity's package manager
95116
Add the line
96117
```
@@ -109,6 +130,21 @@ the package will be added as a scoped registry, which you can inspect under `Pro
109130
### Alternative
110131
Download and copy all files inside your project.
111132

133+
## Upgrading to 2.0.0 from previous versions
134+
135+
In version `2.0.0` of the package, the data moved from within each object's metadata to using a Scriptable Object library.
136+
Unity's importer being too unstable, reading and writing the data to the metadata became too complicated and often led to errors and failures.
137+
138+
If you were using the package pre-`2.0.0`, a tool has been written to migrate to the new version.
139+
Run `Tools/GieziTools/SOVariant/Upgrade user data to new version`.
140+
This will read all data contained in the metadata and build the library.
141+
If necessary, you can run `Tools/GieziTools/SOVariant/Fix SOVs`.
142+
This will loop through each object and rebuild the parent/child relationship, as well as propagate the parent values to the children.
143+
Because the previous version of the tool was quite unstable, this step is highly encouraged
144+
Additionally, you should check the data to make sure each object has the right values.
145+
146+
This new version should fix a lot of the issues that appeared with newer versions of Unity and with the package being unstable.
147+
112148
## Known issues and tweaks to be made
113149
<details>
114150
<summary>List of known issues</summary>

0 commit comments

Comments
 (0)