|
1 | 1 | # Save System for Unity |
2 | 2 |
|
3 | | -### TODO |
4 | | -- [x] Assets References |
5 | | -- [x] AOT support |
6 | | -- [x] Test with Desktop and Mobile builds. Mono and IL2CPP. (Finally managed to get my hands on this branch again. Testing a few things for now. I'll release this branch in 2023 Q1) |
7 | | - |
8 | | - |
9 | 3 | ## Features |
10 | 4 | - Can save pretty much everything (Vector, Quaternion, Array, List, Class, Struct, etc) |
11 | 5 | - Can save assets references |
12 | 6 | - Easy to use |
13 | 7 | - Fast in terms of performance. Even simple int saving way more faster than ```PlayerPrefs.SetInt()```. Performance test at the end of README |
14 | | -- Save files are encrypted |
| 8 | +- Automatic save file backup |
15 | 9 | - Extensible |
16 | 10 |
|
17 | 11 | ## How to Install |
@@ -92,37 +86,7 @@ public class Player : MonoBehaviour |
92 | 86 |
|
93 | 87 | ### AOT platforms |
94 | 88 |
|
95 | | -[See](https://github.com/neuecc/MessagePack-CSharp#aot-code-generation-support-for-unityxamarin) |
96 | | - |
97 | | -```csharp |
98 | | -using MessagePack; |
99 | | -using MessagePack.Resolvers; |
100 | | -using MessagePack.Unity; |
101 | | -using MessagePack.Unity.Extension; |
102 | | -using Serializer; |
103 | | -using ToolBox.Serialization; |
104 | | -using UnityEngine; |
105 | | - |
106 | | -public static class MessagePackStartup |
107 | | -{ |
108 | | - [RuntimeInitializeOnLoadMethod(RuntimeInitializeLoadType.BeforeSceneLoad)] |
109 | | - private static void Setup() |
110 | | - { |
111 | | - StaticCompositeResolver.Instance.Register( |
112 | | - GeneratedResolver.Instance, |
113 | | - UnityBlitResolver.Instance, |
114 | | - UnityResolver.Instance, |
115 | | - StandardResolver.Instance, |
116 | | - DataSerializerResolver.Instance |
117 | | - ); |
118 | | - |
119 | | - var options = ContractlessStandardResolverAllowPrivate.Options.WithResolver(StaticCompositeResolver.Instance); |
120 | | - |
121 | | - DataSerializer.Options = options; |
122 | | - MessagePackSerializer.DefaultOptions = options; |
123 | | - } |
124 | | -} |
125 | | -``` |
| 89 | +You don’t need to do anything for it to work with AOT/IL2CPP, but if any issues come up, check this out: [AOT code generation support for Unity/Xamarin](https://github.com/neuecc/MessagePack-CSharp#aot-code-generation-support-for-unityxamarin) |
126 | 90 |
|
127 | 91 | ## Performance test |
128 | 92 |
|
|
0 commit comments