Skip to content

Commit 9ba3f3f

Browse files
authored
Update README.md
1 parent 679917d commit 9ba3f3f

File tree

1 file changed

+8
-6
lines changed

1 file changed

+8
-6
lines changed

README.md

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
# [GenericSerializeReference] attribute to serialize generic property in Unity3D
2+
13
Like [`SerializeReference`](https://docs.unity3d.com/ScriptReference/SerializeReference.html) but works on generic property.
24

35
```c#
@@ -12,23 +14,23 @@ public class MyMonoBehavior : MonoBehaviour
1214
```
1315
![image](https://user-images.githubusercontent.com/683655/111064372-b47b6280-84ee-11eb-90c2-22cfbdc65cc0.png)
1416

15-
# Requirement
17+
## Requirement
1618
Unity3D 2020.2+ (not test the version below)
1719

18-
# Installation
20+
## Installation
1921
Openupm: `openupm add com.quabug.generic-serialize-reference`
2022

21-
# Limitations
23+
## Limitations
2224
- Only types from referenced assemblies could be show up in inspector. (usually this is not a big deal when writing game code, but become a major drawback when writing a library)
2325
- Not support `struct` type.
2426
- Not support generic field.
2527
- Not support variance.
2628

27-
# Costs
29+
## Costs
2830
- Extra time to generate IL code while building assembly
2931
- Extra memory space to store a generated field for each property.
3032

31-
# How it works
33+
## How it works
3234
```c#
3335
public class MyMonoBehavior : MonoBehaviour
3436
{
@@ -67,7 +69,7 @@ public class MyMonoBehavior : MonoBehaviour
6769
}
6870
```
6971

70-
# License
72+
## License
7173
[MIT](https://github.com/quabug/GenericSerializeReference/blob/main/LICENSE)
7274

7375
Drawer modified from [TextusGames](https://github.com/TextusGames)'s [UnitySerializedReferenceUI](https://github.com/TextusGames/UnitySerializedReferenceUI) with [MIT](https://github.com/TextusGames/UnitySerializedReferenceUI/blob/master/Assets/Textus/SerializeReferenceUI/LICENSE.txt) license

0 commit comments

Comments
 (0)