├── Changelog.md
├── Changelog.md.meta
├── DataSerializer.meta
├── DataSerializer
├── ApplicationStateObserver.cs
├── ApplicationStateObserver.cs.meta
├── AssemblyGenerator.cs
├── AssemblyGenerator.cs.meta
├── AssetEntry.cs
├── AssetEntry.cs.meta
├── AssetsContainer.cs
├── AssetsContainer.cs.meta
├── AssetsContainerEditor.cs
├── AssetsContainerEditor.cs.meta
├── DataSerializer.cs
├── DataSerializer.cs.meta
├── ITypeProvider.cs
├── ITypeProvider.cs.meta
├── LICENSE
├── LICENSE.meta
├── ReferenceResolver.cs
├── ReferenceResolver.cs.meta
├── Resources.meta
├── Resources
│ ├── ToolBoxAssetsContainer.asset
│ └── ToolBoxAssetsContainer.asset.meta
├── com.intothedev.savesystem.asmdef
└── com.intothedev.savesystem.asmdef.meta
├── OdinSerializer.meta
├── OdinSerializer
├── Config.meta
├── Config
│ ├── AssemblyBuildInfo.cs
│ ├── AssemblyBuildInfo.cs.meta
│ ├── GlobalSerializationConfig.cs
│ └── GlobalSerializationConfig.cs.meta
├── Core.meta
├── Core
│ ├── DataReaderWriters.meta
│ ├── DataReaderWriters
│ │ ├── BaseDataReader.cs
│ │ ├── BaseDataReader.cs.meta
│ │ ├── BaseDataReaderWriter.cs
│ │ ├── BaseDataReaderWriter.cs.meta
│ │ ├── BaseDataWriter.cs
│ │ ├── BaseDataWriter.cs.meta
│ │ ├── Binary.meta
│ │ ├── Binary
│ │ │ ├── BinaryDataReader.cs
│ │ │ ├── BinaryDataReader.cs.meta
│ │ │ ├── BinaryDataWriter.cs
│ │ │ ├── BinaryDataWriter.cs.meta
│ │ │ ├── BinaryEntryType.cs
│ │ │ └── BinaryEntryType.cs.meta
│ │ ├── IDataReader.cs
│ │ ├── IDataReader.cs.meta
│ │ ├── IDataWriter.cs
│ │ ├── IDataWriter.cs.meta
│ │ ├── Json.meta
│ │ ├── Json
│ │ │ ├── JsonConfig.cs
│ │ │ ├── JsonConfig.cs.meta
│ │ │ ├── JsonDataReader.cs
│ │ │ ├── JsonDataReader.cs.meta
│ │ │ ├── JsonDataWriter.cs
│ │ │ ├── JsonDataWriter.cs.meta
│ │ │ ├── JsonTextReader.cs
│ │ │ └── JsonTextReader.cs.meta
│ │ ├── SerializationNodes.meta
│ │ └── SerializationNodes
│ │ │ ├── SerializationNode.cs
│ │ │ ├── SerializationNode.cs.meta
│ │ │ ├── SerializationNodeDataReader.cs
│ │ │ ├── SerializationNodeDataReader.cs.meta
│ │ │ ├── SerializationNodeDataReaderWriterConfig.cs
│ │ │ ├── SerializationNodeDataReaderWriterConfig.cs.meta
│ │ │ ├── SerializationNodeDataWriter.cs
│ │ │ └── SerializationNodeDataWriter.cs.meta
│ ├── FormatterLocators.meta
│ ├── FormatterLocators
│ │ ├── ArrayFormatterLocator.cs
│ │ ├── ArrayFormatterLocator.cs.meta
│ │ ├── DelegateFormatterLocator.cs
│ │ ├── DelegateFormatterLocator.cs.meta
│ │ ├── FormatterLocator.cs
│ │ ├── FormatterLocator.cs.meta
│ │ ├── GenericCollectionFormatterLocator.cs
│ │ ├── GenericCollectionFormatterLocator.cs.meta
│ │ ├── IFormatterLocator.cs
│ │ ├── IFormatterLocator.cs.meta
│ │ ├── ISerializableFormatterLocator.cs
│ │ ├── ISerializableFormatterLocator.cs.meta
│ │ ├── SelfFormatterLocator.cs
│ │ ├── SelfFormatterLocator.cs.meta
│ │ ├── TypeFormatterLocator.cs
│ │ └── TypeFormatterLocator.cs.meta
│ ├── Formatters.meta
│ ├── Formatters
│ │ ├── ArrayFormatter.cs
│ │ ├── ArrayFormatter.cs.meta
│ │ ├── ArrayListFormatter.cs
│ │ ├── ArrayListFormatter.cs.meta
│ │ ├── BaseFormatter.cs
│ │ ├── BaseFormatter.cs.meta
│ │ ├── DateTimeFormatter.cs
│ │ ├── DateTimeFormatter.cs.meta
│ │ ├── DateTimeOffsetFormatter.cs
│ │ ├── DateTimeOffsetFormatter.cs.meta
│ │ ├── DelegateFormatter.cs
│ │ ├── DelegateFormatter.cs.meta
│ │ ├── DerivedDictionaryFormatter.cs
│ │ ├── DerivedDictionaryFormatter.cs.meta
│ │ ├── DictionaryFormatter.cs
│ │ ├── DictionaryFormatter.cs.meta
│ │ ├── DoubleLookupDictionaryFormatter.cs
│ │ ├── DoubleLookupDictionaryFormatter.cs.meta
│ │ ├── EasyBaseFormatter.cs
│ │ ├── EasyBaseFormatter.cs.meta
│ │ ├── EmittedFormatterAttribute.cs
│ │ ├── EmittedFormatterAttribute.cs.meta
│ │ ├── EmptyTypeFormatter.cs
│ │ ├── EmptyTypeFormatter.cs.meta
│ │ ├── FormatterEmitter.cs
│ │ ├── FormatterEmitter.cs.meta
│ │ ├── GenericCollectionFormatter.cs
│ │ ├── GenericCollectionFormatter.cs.meta
│ │ ├── HashSetFormatter.cs
│ │ ├── HashSetFormatter.cs.meta
│ │ ├── IFormatter.cs
│ │ ├── IFormatter.cs.meta
│ │ ├── KeyValuePairFormatter.cs
│ │ ├── KeyValuePairFormatter.cs.meta
│ │ ├── ListFormatter.cs
│ │ ├── ListFormatter.cs.meta
│ │ ├── MethodInfoFormatter.cs
│ │ ├── MethodInfoFormatter.cs.meta
│ │ ├── MinimalBaseFormatter.cs
│ │ ├── MinimalBaseFormatter.cs.meta
│ │ ├── MultiDimensionalArrayFormatter.cs
│ │ ├── MultiDimensionalArrayFormatter.cs.meta
│ │ ├── NullableFormatter.cs
│ │ ├── NullableFormatter.cs.meta
│ │ ├── PrimitiveArrayFormatter.cs
│ │ ├── PrimitiveArrayFormatter.cs.meta
│ │ ├── QueueFormatter.cs
│ │ ├── QueueFormatter.cs.meta
│ │ ├── ReflectionFormatter.cs
│ │ ├── ReflectionFormatter.cs.meta
│ │ ├── ReflectionOrEmittedBaseFormatter.cs
│ │ ├── ReflectionOrEmittedBaseFormatter.cs.meta
│ │ ├── SelfFormatterFormatter.cs
│ │ ├── SelfFormatterFormatter.cs.meta
│ │ ├── SerializableFormatter.cs
│ │ ├── SerializableFormatter.cs.meta
│ │ ├── StackFormatter.cs
│ │ ├── StackFormatter.cs.meta
│ │ ├── TimeSpanFormatter.cs
│ │ ├── TimeSpanFormatter.cs.meta
│ │ ├── TypeFormatter.cs
│ │ ├── TypeFormatter.cs.meta
│ │ ├── VersionFormatter.cs
│ │ └── VersionFormatter.cs.meta
│ ├── Misc.meta
│ ├── Misc
│ │ ├── AllowDeserializeInvalidDataAttribute.cs
│ │ ├── AllowDeserializeInvalidDataAttribute.cs.meta
│ │ ├── AlwaysFormatsSelfAttribute.cs
│ │ ├── AlwaysFormatsSelfAttribute.cs.meta
│ │ ├── ArchitectureInfo.cs
│ │ ├── ArchitectureInfo.cs.meta
│ │ ├── Buffer.cs
│ │ ├── Buffer.cs.meta
│ │ ├── CachedMemoryStream.cs
│ │ ├── CachedMemoryStream.cs.meta
│ │ ├── CustomFormatterAttribute.cs
│ │ ├── CustomFormatterAttribute.cs.meta
│ │ ├── CustomGenericFormatterAttribute.cs
│ │ ├── CustomGenericFormatterAttribute.cs.meta
│ │ ├── CustomLogger.cs
│ │ ├── CustomLogger.cs.meta
│ │ ├── CustomSerializationPolicy.cs
│ │ ├── CustomSerializationPolicy.cs.meta
│ │ ├── DataFormat.cs
│ │ ├── DataFormat.cs.meta
│ │ ├── DefaultLoggers.cs
│ │ ├── DefaultLoggers.cs.meta
│ │ ├── DefaultSerializationBinder.cs
│ │ ├── DefaultSerializationBinder.cs.meta
│ │ ├── DeserializationContext.cs
│ │ ├── DeserializationContext.cs.meta
│ │ ├── EmittedAssemblyAttribute.cs
│ │ ├── EmittedAssemblyAttribute.cs.meta
│ │ ├── EntryType.cs
│ │ ├── EntryType.cs.meta
│ │ ├── ErrorHandlingPolicy.cs
│ │ ├── ErrorHandlingPolicy.cs.meta
│ │ ├── ExcludeDataFromInspectorAttribute.cs
│ │ ├── ExcludeDataFromInspectorAttribute.cs.meta
│ │ ├── FormatterLocationStep.cs
│ │ ├── FormatterLocationStep.cs.meta
│ │ ├── FormatterUtilities.cs
│ │ ├── FormatterUtilities.cs.meta
│ │ ├── IAskIfCanFormatTypes.cs
│ │ ├── IAskIfCanFormatTypes.cs.meta
│ │ ├── IExternalGuidReferenceResolver.cs
│ │ ├── IExternalGuidReferenceResolver.cs.meta
│ │ ├── IExternalIndexReferenceResolver.cs
│ │ ├── IExternalIndexReferenceResolver.cs.meta
│ │ ├── IExternalStringReferenceResolver.cs
│ │ ├── IExternalStringReferenceResolver.cs.meta
│ │ ├── ILogger.cs
│ │ ├── ILogger.cs.meta
│ │ ├── ISelfFormatter.cs
│ │ ├── ISelfFormatter.cs.meta
│ │ ├── ISerializationPolicy.cs
│ │ ├── ISerializationPolicy.cs.meta
│ │ ├── LoggingPolicy.cs
│ │ ├── LoggingPolicy.cs.meta
│ │ ├── NodeInfo.cs
│ │ ├── NodeInfo.cs.meta
│ │ ├── OdinSerializeAttribute.cs
│ │ ├── OdinSerializeAttribute.cs.meta
│ │ ├── PrefabModification.cs
│ │ ├── PrefabModification.cs.meta
│ │ ├── PrefabModificationType.cs
│ │ ├── PrefabModificationType.cs.meta
│ │ ├── PreviouslySerializedAsAttribute.cs
│ │ ├── PreviouslySerializedAsAttribute.cs.meta
│ │ ├── ProperBitConverter.cs
│ │ ├── ProperBitConverter.cs.meta
│ │ ├── RegisterFormatterAttribute.cs
│ │ ├── RegisterFormatterAttribute.cs.meta
│ │ ├── RegisterFormatterLocatorAttribute.cs
│ │ ├── RegisterFormatterLocatorAttribute.cs.meta
│ │ ├── SerializationAbortException.cs
│ │ ├── SerializationAbortException.cs.meta
│ │ ├── SerializationConfig.cs
│ │ ├── SerializationConfig.cs.meta
│ │ ├── SerializationContext.cs
│ │ ├── SerializationContext.cs.meta
│ │ ├── SerializationPolicies.cs
│ │ ├── SerializationPolicies.cs.meta
│ │ ├── SerializationUtility.cs
│ │ ├── SerializationUtility.cs.meta
│ │ ├── TwoWaySerializationBinder.cs
│ │ └── TwoWaySerializationBinder.cs.meta
│ ├── Serializers.meta
│ └── Serializers
│ │ ├── AnySerializer.cs
│ │ ├── AnySerializer.cs.meta
│ │ ├── BooleanSerializer.cs
│ │ ├── BooleanSerializer.cs.meta
│ │ ├── ByteSerializer.cs
│ │ ├── ByteSerializer.cs.meta
│ │ ├── CharSerializer.cs
│ │ ├── CharSerializer.cs.meta
│ │ ├── ComplexTypeSerializer.cs
│ │ ├── ComplexTypeSerializer.cs.meta
│ │ ├── DecimalSerializer.cs
│ │ ├── DecimalSerializer.cs.meta
│ │ ├── DoubleSerializer.cs
│ │ ├── DoubleSerializer.cs.meta
│ │ ├── EnumSerializer.cs
│ │ ├── EnumSerializer.cs.meta
│ │ ├── GuidSerializer.cs
│ │ ├── GuidSerializer.cs.meta
│ │ ├── Int16Serializer.cs
│ │ ├── Int16Serializer.cs.meta
│ │ ├── Int32Serializer.cs
│ │ ├── Int32Serializer.cs.meta
│ │ ├── Int64Serializer.cs
│ │ ├── Int64Serializer.cs.meta
│ │ ├── IntPtrSerializer.cs
│ │ ├── IntPtrSerializer.cs.meta
│ │ ├── SByteSerializer.cs
│ │ ├── SByteSerializer.cs.meta
│ │ ├── Serializer.cs
│ │ ├── Serializer.cs.meta
│ │ ├── SingleSerializer.cs
│ │ ├── SingleSerializer.cs.meta
│ │ ├── StringSerializer.cs
│ │ ├── StringSerializer.cs.meta
│ │ ├── UInt16Serializer.cs
│ │ ├── UInt16Serializer.cs.meta
│ │ ├── UInt32Serializer.cs
│ │ ├── UInt32Serializer.cs.meta
│ │ ├── UInt64Serializer.cs
│ │ ├── UInt64Serializer.cs.meta
│ │ ├── UIntPtrSerializer.cs
│ │ └── UIntPtrSerializer.cs.meta
├── LICENSE
├── LICENSE.meta
├── ToolBox.Serialization.OdinSerializer.asmdef
├── ToolBox.Serialization.OdinSerializer.asmdef.meta
├── Unity Integration.meta
├── Unity Integration
│ ├── AOTSupportScanner.cs
│ ├── AOTSupportScanner.cs.meta
│ ├── AOTSupportUtilities.cs
│ ├── AOTSupportUtilities.cs.meta
│ ├── DictionaryKeySupport.meta
│ ├── DictionaryKeySupport
│ │ ├── BaseDictionaryKeyPathProvider.cs
│ │ ├── BaseDictionaryKeyPathProvider.cs.meta
│ │ ├── DictionaryKeyUtility.cs
│ │ ├── DictionaryKeyUtility.cs.meta
│ │ ├── IDictionaryKeyPathProvider.cs
│ │ ├── IDictionaryKeyPathProvider.cs.meta
│ │ ├── RegisterDictionaryKeyPathProviderAttribute.cs
│ │ ├── RegisterDictionaryKeyPathProviderAttribute.cs.meta
│ │ ├── Vector2DictionaryKeyPathProvider.cs
│ │ ├── Vector2DictionaryKeyPathProvider.cs.meta
│ │ ├── Vector3DictionaryKeyPathProvider.cs
│ │ ├── Vector3DictionaryKeyPathProvider.cs.meta
│ │ ├── Vector4DictionaryKeyPathProvider.cs
│ │ └── Vector4DictionaryKeyPathProvider.cs.meta
│ ├── Formatters.meta
│ ├── Formatters
│ │ ├── AnimationCurveFormatter.cs
│ │ ├── AnimationCurveFormatter.cs.meta
│ │ ├── BoundsFormatter.cs
│ │ ├── BoundsFormatter.cs.meta
│ │ ├── Color32Formatter.cs
│ │ ├── Color32Formatter.cs.meta
│ │ ├── ColorBlockFormatter.cs
│ │ ├── ColorBlockFormatter.cs.meta
│ │ ├── ColorFormatter.cs
│ │ ├── ColorFormatter.cs.meta
│ │ ├── CoroutineFormatter.cs
│ │ ├── CoroutineFormatter.cs.meta
│ │ ├── GradientAlphaKeyFormatter.cs
│ │ ├── GradientAlphaKeyFormatter.cs.meta
│ │ ├── GradientColorKeyFormatter.cs
│ │ ├── GradientColorKeyFormatter.cs.meta
│ │ ├── GradientFormatter.cs
│ │ ├── GradientFormatter.cs.meta
│ │ ├── KeyframeFormatter.cs
│ │ ├── KeyframeFormatter.cs.meta
│ │ ├── LayerMaskFormatter.cs
│ │ ├── LayerMaskFormatter.cs.meta
│ │ ├── QuaternionFormatter.cs
│ │ ├── QuaternionFormatter.cs.meta
│ │ ├── RectFormatter.cs
│ │ ├── RectFormatter.cs.meta
│ │ ├── UnityEventFormatter.cs
│ │ ├── UnityEventFormatter.cs.meta
│ │ ├── Vector2Formatter.cs
│ │ ├── Vector2Formatter.cs.meta
│ │ ├── Vector3Formatter.cs
│ │ ├── Vector3Formatter.cs.meta
│ │ ├── Vector4Formatter.cs
│ │ ├── Vector4Formatter.cs.meta
│ │ ├── VectorIntFormatters.cs
│ │ └── VectorIntFormatters.cs.meta
│ ├── OdinPrefabSerializationEditorUtility.cs
│ ├── OdinPrefabSerializationEditorUtility.cs.meta
│ ├── SerializedUnityObjects.meta
│ ├── SerializedUnityObjects
│ │ ├── IOverridesSerializationFormat.cs
│ │ ├── IOverridesSerializationFormat.cs.meta
│ │ ├── IOverridesSerializationPolicy.cs
│ │ ├── IOverridesSerializationPolicy.cs.meta
│ │ ├── ISupportsPrefabSerialization.cs
│ │ ├── ISupportsPrefabSerialization.cs.meta
│ │ ├── SerializationData.cs
│ │ ├── SerializationData.cs.meta
│ │ ├── SerializedBehaviour.cs
│ │ ├── SerializedBehaviour.cs.meta
│ │ ├── SerializedComponent.cs
│ │ ├── SerializedComponent.cs.meta
│ │ ├── SerializedMonoBehaviour.cs
│ │ ├── SerializedMonoBehaviour.cs.meta
│ │ ├── SerializedScriptableObject.cs
│ │ ├── SerializedScriptableObject.cs.meta
│ │ ├── SerializedStateMachineBehaviour.cs
│ │ ├── SerializedStateMachineBehaviour.cs.meta
│ │ ├── SerializedUnityObject.cs
│ │ └── SerializedUnityObject.cs.meta
│ ├── UnityReferenceResolver.cs
│ ├── UnityReferenceResolver.cs.meta
│ ├── UnitySerializationInitializer.cs
│ ├── UnitySerializationInitializer.cs.meta
│ ├── UnitySerializationUtility.cs
│ └── UnitySerializationUtility.cs.meta
├── Utilities.meta
├── Utilities
│ ├── Extensions.meta
│ ├── Extensions
│ │ ├── FieldInfoExtensions.cs
│ │ ├── FieldInfoExtensions.cs.meta
│ │ ├── GarbageFreeIterators.cs
│ │ ├── GarbageFreeIterators.cs.meta
│ │ ├── LinqExtensions.cs
│ │ ├── LinqExtensions.cs.meta
│ │ ├── MemberInfoExtensions.cs
│ │ ├── MemberInfoExtensions.cs.meta
│ │ ├── MethodInfoExtensions.cs
│ │ ├── MethodInfoExtensions.cs.meta
│ │ ├── Operator.cs
│ │ ├── Operator.cs.meta
│ │ ├── PathUtilities.cs
│ │ ├── PathUtilities.cs.meta
│ │ ├── PropertyInfoExtensions.cs
│ │ ├── PropertyInfoExtensions.cs.meta
│ │ ├── StringExtensions.cs
│ │ ├── StringExtensions.cs.meta
│ │ ├── TypeExtensions.cs
│ │ ├── TypeExtensions.cs.meta
│ │ ├── UnityExtensions.cs
│ │ └── UnityExtensions.cs.meta
│ ├── Misc.meta
│ └── Misc
│ │ ├── AssemblyImportSettingsUtilities.cs
│ │ ├── AssemblyImportSettingsUtilities.cs.meta
│ │ ├── Cache.cs
│ │ ├── Cache.cs.meta
│ │ ├── DoubleLookupDictionary.cs
│ │ ├── DoubleLookupDictionary.cs.meta
│ │ ├── EmitUtilities.cs
│ │ ├── EmitUtilities.cs.meta
│ │ ├── FastTypeComparer.cs
│ │ ├── FastTypeComparer.cs.meta
│ │ ├── Flags.cs
│ │ ├── Flags.cs.meta
│ │ ├── ICacheNotificationReceiver.cs
│ │ ├── ICacheNotificationReceiver.cs.meta
│ │ ├── ImmutableList.cs
│ │ ├── ImmutableList.cs.meta
│ │ ├── MemberAliasFieldInfo.cs
│ │ ├── MemberAliasFieldInfo.cs.meta
│ │ ├── MemberAliasMethodInfo.cs
│ │ ├── MemberAliasMethodInfo.cs.meta
│ │ ├── MemberAliasPropertyInfo.cs
│ │ ├── MemberAliasPropertyInfo.cs.meta
│ │ ├── ReferenceEqualityComparer.cs
│ │ ├── ReferenceEqualityComparer.cs.meta
│ │ ├── UnityVersion.cs
│ │ ├── UnityVersion.cs.meta
│ │ ├── UnsafeUtilities.cs
│ │ └── UnsafeUtilities.cs.meta
├── Version.txt
└── Version.txt.meta
├── README.md
├── README.md.meta
├── package.json
└── package.json.meta
/Changelog.md:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/Changelog.md.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: e6b8a408158645639ad2c298d3ff918f
3 | TextScriptImporter:
4 | externalObjects: {}
5 | userData:
6 | assetBundleName:
7 | assetBundleVariant:
8 |
--------------------------------------------------------------------------------
/DataSerializer.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 3f70101a6192407f916c7929eb17b6bf
3 | folderAsset: yes
4 | DefaultImporter:
5 | externalObjects: {}
6 | userData:
7 | assetBundleName:
8 | assetBundleVariant:
9 |
--------------------------------------------------------------------------------
/DataSerializer/ApplicationStateObserver.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using UnityEngine;
3 |
4 | namespace ToolBox.Serialization
5 | {
6 | internal sealed class ApplicationStateObserver : MonoBehaviour
7 | {
8 | public event Action OnQuit;
9 |
10 | #if !UNITY_IOS && !UNITY_ANDROID
11 | private void OnApplicationQuit()
12 | {
13 | OnQuit?.Invoke();
14 | }
15 | #else
16 | private void OnApplicationPause(bool pause)
17 | {
18 | if (pause)
19 | OnQuit?.Invoke();
20 | }
21 |
22 | private void OnApplicationFocus(bool focus)
23 | {
24 | if (!focus)
25 | OnQuit?.Invoke();
26 | }
27 | #endif
28 | }
29 | }
30 |
--------------------------------------------------------------------------------
/DataSerializer/ApplicationStateObserver.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 94aee7f8ec3149b4685b3e33763bfb39
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {instanceID: 0}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/DataSerializer/AssemblyGenerator.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 2218a72bfe330074dbf6a999a3a68aa3
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {instanceID: 0}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/DataSerializer/AssetEntry.cs:
--------------------------------------------------------------------------------
1 | using UnityEngine;
2 |
3 | namespace ToolBox.Serialization
4 | {
5 | [System.Serializable]
6 | internal sealed class AssetEntry
7 | {
8 | [SerializeField] private string _guid = string.Empty;
9 | [SerializeField] private Object _asset = null;
10 |
11 | public string Guid => _guid;
12 | public Object Asset => _asset;
13 |
14 | public AssetEntry(string guid, Object asset)
15 | {
16 | _guid = guid;
17 | _asset = asset;
18 | }
19 | }
20 | }
21 |
--------------------------------------------------------------------------------
/DataSerializer/AssetEntry.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 6304884b19ef38c4eb6da734878118f5
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {instanceID: 0}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/DataSerializer/AssetsContainer.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: b83822947c1311a439dc1350d5e17f83
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {instanceID: 0}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/DataSerializer/AssetsContainerEditor.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: a997768cd70bc314580e0c57050c40b9
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {instanceID: 0}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/DataSerializer/DataSerializer.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 1e80d0109c2fd5644acb6a7a62cc9ce2
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {instanceID: 0}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/DataSerializer/ITypeProvider.cs:
--------------------------------------------------------------------------------
1 | using System;
2 |
3 | namespace ToolBox.Serialization
4 | {
5 | public interface ITypeProvider
6 | {
7 | Type[] GetTypes();
8 | }
9 | }
--------------------------------------------------------------------------------
/DataSerializer/ITypeProvider.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 48eb805697d54b20a5c8ffe6e8409069
3 | timeCreated: 1620899258
--------------------------------------------------------------------------------
/DataSerializer/LICENSE:
--------------------------------------------------------------------------------
1 | MIT License
2 |
3 | Copyright (c) 2021 Vladislav Kinyashov
4 |
5 | Permission is hereby granted, free of charge, to any person obtaining a copy
6 | of this software and associated documentation files (the "Software"), to deal
7 | in the Software without restriction, including without limitation the rights
8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | copies of the Software, and to permit persons to whom the Software is
10 | furnished to do so, subject to the following conditions:
11 |
12 | The above copyright notice and this permission notice shall be included in all
13 | copies or substantial portions of the Software.
14 |
15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21 | SOFTWARE.
22 |
--------------------------------------------------------------------------------
/DataSerializer/LICENSE.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: a1da13fc8a788e849bcaac69d0e770e0
3 | DefaultImporter:
4 | externalObjects: {}
5 | userData:
6 | assetBundleName:
7 | assetBundleVariant:
8 |
--------------------------------------------------------------------------------
/DataSerializer/ReferenceResolver.cs:
--------------------------------------------------------------------------------
1 | using ToolBox.Serialization.OdinSerializer;
2 | using UnityEngine;
3 |
4 | namespace ToolBox.Serialization
5 | {
6 | internal sealed class ReferenceResolver : IExternalIndexReferenceResolver
7 | {
8 | private readonly AssetsContainer _assetsContainer;
9 |
10 | public ReferenceResolver(AssetsContainer assetsContainer)
11 | {
12 | _assetsContainer = assetsContainer;
13 | }
14 |
15 | public bool TryResolveReference(int index, out object value)
16 | {
17 | value = null;
18 |
19 | if (index == 0)
20 | {
21 | return false;
22 | }
23 |
24 | var success = _assetsContainer.TryGetObject((ushort)index, out var obj);
25 |
26 | value = obj;
27 | return success;
28 | }
29 |
30 | public bool CanReference(object value, out int index)
31 | {
32 | index = 0;
33 |
34 | if (value is not Object obj)
35 | {
36 | return false;
37 | }
38 |
39 | var success = _assetsContainer.TryGetId(obj, out var id);
40 |
41 | index = id;
42 | return success;
43 | }
44 | }
45 | }
--------------------------------------------------------------------------------
/DataSerializer/ReferenceResolver.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 9da1a027eed244359f845d3a8542fe5b
3 | timeCreated: 1714835535
--------------------------------------------------------------------------------
/DataSerializer/Resources.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 03512cecfc9dc5448a6d3f05983c5dcf
3 | folderAsset: yes
4 | DefaultImporter:
5 | externalObjects: {}
6 | userData:
7 | assetBundleName:
8 | assetBundleVariant:
9 |
--------------------------------------------------------------------------------
/DataSerializer/Resources/ToolBoxAssetsContainer.asset:
--------------------------------------------------------------------------------
1 | %YAML 1.1
2 | %TAG !u! tag:unity3d.com,2011:
3 | --- !u!114 &11400000
4 | MonoBehaviour:
5 | m_ObjectHideFlags: 0
6 | m_CorrespondingSourceObject: {fileID: 0}
7 | m_PrefabInstance: {fileID: 0}
8 | m_PrefabAsset: {fileID: 0}
9 | m_GameObject: {fileID: 0}
10 | m_Enabled: 1
11 | m_EditorHideFlags: 0
12 | m_Script: {fileID: 11500000, guid: b83822947c1311a439dc1350d5e17f83, type: 3}
13 | m_Name: ToolBoxAssetsContainer
14 | m_EditorClassIdentifier:
15 | _savedAssets: []
16 | _paths: []
17 |
--------------------------------------------------------------------------------
/DataSerializer/Resources/ToolBoxAssetsContainer.asset.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 28d030f0121639943891d27ce8883a35
3 | NativeFormatImporter:
4 | externalObjects: {}
5 | mainObjectFileID: 11400000
6 | userData:
7 | assetBundleName:
8 | assetBundleVariant:
9 |
--------------------------------------------------------------------------------
/DataSerializer/com.intothedev.savesystem.asmdef:
--------------------------------------------------------------------------------
1 | {
2 | "name": "com.intothedev.savesystem",
3 | "rootNamespace": "",
4 | "references": [
5 | "ToolBox.Serialization.OdinSerializer"
6 | ],
7 | "includePlatforms": [],
8 | "excludePlatforms": [],
9 | "allowUnsafeCode": false,
10 | "overrideReferences": false,
11 | "precompiledReferences": [],
12 | "autoReferenced": true,
13 | "defineConstraints": [],
14 | "versionDefines": [],
15 | "noEngineReferences": false
16 | }
--------------------------------------------------------------------------------
/DataSerializer/com.intothedev.savesystem.asmdef.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 85179bbe79433b845b29975bda38e6a6
3 | AssemblyDefinitionImporter:
4 | externalObjects: {}
5 | userData:
6 | assetBundleName:
7 | assetBundleVariant:
8 |
--------------------------------------------------------------------------------
/OdinSerializer.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: bd66b8e145574c242ac364d94b4a2bf2
3 | folderAsset: yes
4 | DefaultImporter:
5 | externalObjects: {}
6 | userData:
7 | assetBundleName:
8 | assetBundleVariant:
9 |
--------------------------------------------------------------------------------
/OdinSerializer/Config.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 7648cbc802ff4f8469db8f0e132e2d3b
3 | folderAsset: yes
4 | DefaultImporter:
5 | externalObjects: {}
6 | userData:
7 | assetBundleName:
8 | assetBundleVariant:
9 |
--------------------------------------------------------------------------------
/OdinSerializer/Config/AssemblyBuildInfo.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 60517bcc14b105518c4bed060f8e177c
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {instanceID: 0}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/OdinSerializer/Config/GlobalSerializationConfig.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: e27adcd68a9f5970540201b87acffe99
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {instanceID: 0}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/OdinSerializer/Core.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: eacc19cb04584174ca818fea8262f897
3 | folderAsset: yes
4 | DefaultImporter:
5 | externalObjects: {}
6 | userData:
7 | assetBundleName:
8 | assetBundleVariant:
9 |
--------------------------------------------------------------------------------
/OdinSerializer/Core/DataReaderWriters.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 31485af373d02a04db700b37228ac6b9
3 | folderAsset: yes
4 | DefaultImporter:
5 | externalObjects: {}
6 | userData:
7 | assetBundleName:
8 | assetBundleVariant:
9 |
--------------------------------------------------------------------------------
/OdinSerializer/Core/DataReaderWriters/BaseDataReader.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 6a6df883d7eacab7bdc93580fd5a6def
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {instanceID: 0}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/OdinSerializer/Core/DataReaderWriters/BaseDataReaderWriter.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 6c38bf9d13eca22d8f18363cda069de7
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {instanceID: 0}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/OdinSerializer/Core/DataReaderWriters/BaseDataWriter.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 13f05c600ff322f5c6673d03df52427c
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {instanceID: 0}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/OdinSerializer/Core/DataReaderWriters/Binary.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: b9969f5194a10c1429191da7b6c63fa5
3 | folderAsset: yes
4 | DefaultImporter:
5 | externalObjects: {}
6 | userData:
7 | assetBundleName:
8 | assetBundleVariant:
9 |
--------------------------------------------------------------------------------
/OdinSerializer/Core/DataReaderWriters/Binary/BinaryDataReader.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: c6c669c41098d422943649a62871dea5
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {instanceID: 0}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/OdinSerializer/Core/DataReaderWriters/Binary/BinaryDataWriter.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 3d4b0cc25d64f075a540ae788eacb61f
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {instanceID: 0}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/OdinSerializer/Core/DataReaderWriters/Binary/BinaryEntryType.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 1d38d920e7e3c179f67633df470f39f1
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {instanceID: 0}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/OdinSerializer/Core/DataReaderWriters/IDataReader.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 2fb2fd49c4d02c49743c2b88a46815f5
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {instanceID: 0}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/OdinSerializer/Core/DataReaderWriters/IDataWriter.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 4bb83480cb4d37ae671bab5ba03e73ff
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {instanceID: 0}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/OdinSerializer/Core/DataReaderWriters/Json.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: cbc0968453c9b4f478b0edc64cb8b67e
3 | folderAsset: yes
4 | DefaultImporter:
5 | externalObjects: {}
6 | userData:
7 | assetBundleName:
8 | assetBundleVariant:
9 |
--------------------------------------------------------------------------------
/OdinSerializer/Core/DataReaderWriters/Json/JsonConfig.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 5aad8a6a393b956b1aaba423782a9192
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {instanceID: 0}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/OdinSerializer/Core/DataReaderWriters/Json/JsonDataReader.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 656dd50b0d0a851601fd9dfd48e94b87
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {instanceID: 0}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/OdinSerializer/Core/DataReaderWriters/Json/JsonDataWriter.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 9cc6e09389ccab958852a7a2d80225d0
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {instanceID: 0}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/OdinSerializer/Core/DataReaderWriters/Json/JsonTextReader.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 1b75e9581b8482dc665ef4d91015489b
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {instanceID: 0}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/OdinSerializer/Core/DataReaderWriters/SerializationNodes.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 43e67c9a6f21b804794bc9fc997d7ccb
3 | folderAsset: yes
4 | DefaultImporter:
5 | externalObjects: {}
6 | userData:
7 | assetBundleName:
8 | assetBundleVariant:
9 |
--------------------------------------------------------------------------------
/OdinSerializer/Core/DataReaderWriters/SerializationNodes/SerializationNode.cs:
--------------------------------------------------------------------------------
1 | //-----------------------------------------------------------------------
2 | //
3 | // Copyright (c) 2018 Sirenix IVS
4 | //
5 | // Licensed under the Apache License, Version 2.0 (the "License");
6 | // you may not use this file except in compliance with the License.
7 | // You may obtain a copy of the License at
8 | //
9 | // http://www.apache.org/licenses/LICENSE-2.0
10 | //
11 | // Unless required by applicable law or agreed to in writing, software
12 | // distributed under the License is distributed on an "AS IS" BASIS,
13 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 | // See the License for the specific language governing permissions and
15 | // limitations under the License.
16 | //
17 | //-----------------------------------------------------------------------
18 | namespace ToolBox.Serialization.OdinSerializer
19 | {
20 | using System;
21 |
22 | ///
23 | /// A serialization node as used by the format.
24 | ///
25 | [Serializable]
26 | public struct SerializationNode
27 | {
28 | ///
29 | /// The name of the node.
30 | ///
31 | public string Name;
32 |
33 | ///
34 | /// The entry type of the node.
35 | ///
36 | public EntryType Entry;
37 |
38 | ///
39 | /// The data contained in the node. Depending on the entry type and name, as well as nodes encountered prior to this one, the format can vary wildly.
40 | ///
41 | public string Data;
42 | }
43 | }
--------------------------------------------------------------------------------
/OdinSerializer/Core/DataReaderWriters/SerializationNodes/SerializationNode.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 67f46edceb9df456c41c12683691adc2
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {instanceID: 0}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/OdinSerializer/Core/DataReaderWriters/SerializationNodes/SerializationNodeDataReader.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 758990971e1300f2114e56626afbf6f0
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {instanceID: 0}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/OdinSerializer/Core/DataReaderWriters/SerializationNodes/SerializationNodeDataReaderWriterConfig.cs:
--------------------------------------------------------------------------------
1 | //-----------------------------------------------------------------------
2 | //
3 | // Copyright (c) 2018 Sirenix IVS
4 | //
5 | // Licensed under the Apache License, Version 2.0 (the "License");
6 | // you may not use this file except in compliance with the License.
7 | // You may obtain a copy of the License at
8 | //
9 | // http://www.apache.org/licenses/LICENSE-2.0
10 | //
11 | // Unless required by applicable law or agreed to in writing, software
12 | // distributed under the License is distributed on an "AS IS" BASIS,
13 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 | // See the License for the specific language governing permissions and
15 | // limitations under the License.
16 | //
17 | //-----------------------------------------------------------------------
18 | namespace ToolBox.Serialization.OdinSerializer
19 | {
20 | ///
21 | /// Shared config class for and .
22 | ///
23 | public static class SerializationNodeDataReaderWriterConfig
24 | {
25 | ///
26 | /// The string to use to separate node id's from their names.
27 | ///
28 | public const string NodeIdSeparator = "|";
29 | }
30 | }
--------------------------------------------------------------------------------
/OdinSerializer/Core/DataReaderWriters/SerializationNodes/SerializationNodeDataReaderWriterConfig.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: f90ee7d073cabc755bada1384e1e2ee6
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {instanceID: 0}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/OdinSerializer/Core/DataReaderWriters/SerializationNodes/SerializationNodeDataWriter.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 530343c9e7f4c2a32232db8d96dc456e
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {instanceID: 0}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/OdinSerializer/Core/FormatterLocators.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 1b2c84d8e9f91304bb62f61f9e9098e2
3 | folderAsset: yes
4 | DefaultImporter:
5 | externalObjects: {}
6 | userData:
7 | assetBundleName:
8 | assetBundleVariant:
9 |
--------------------------------------------------------------------------------
/OdinSerializer/Core/FormatterLocators/ArrayFormatterLocator.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: c758adcd93e7b5ec518f3747f3136fa3
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {instanceID: 0}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/OdinSerializer/Core/FormatterLocators/DelegateFormatterLocator.cs:
--------------------------------------------------------------------------------
1 | //-----------------------------------------------------------------------
2 | //
3 | // Copyright (c) 2018 Sirenix IVS
4 | //
5 | // Licensed under the Apache License, Version 2.0 (the "License");
6 | // you may not use this file except in compliance with the License.
7 | // You may obtain a copy of the License at
8 | //
9 | // http://www.apache.org/licenses/LICENSE-2.0
10 | //
11 | // Unless required by applicable law or agreed to in writing, software
12 | // distributed under the License is distributed on an "AS IS" BASIS,
13 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 | // See the License for the specific language governing permissions and
15 | // limitations under the License.
16 | //
17 | //-----------------------------------------------------------------------
18 |
19 | using ToolBox.Serialization.OdinSerializer;
20 |
21 | [assembly: RegisterFormatterLocator(typeof(DelegateFormatterLocator), -50)]
22 |
23 | namespace ToolBox.Serialization.OdinSerializer
24 | {
25 | using Utilities;
26 | using System;
27 |
28 | internal class DelegateFormatterLocator : IFormatterLocator
29 | {
30 | public bool TryGetFormatter(Type type, FormatterLocationStep step, ISerializationPolicy policy, bool allowWeakFallbackFormatters, out IFormatter formatter)
31 | {
32 | if (!typeof(Delegate).IsAssignableFrom(type))
33 | {
34 | formatter = null;
35 | return false;
36 | }
37 |
38 | try
39 | {
40 | formatter = (IFormatter)Activator.CreateInstance(typeof(DelegateFormatter<>).MakeGenericType(type));
41 | }
42 | catch (Exception ex)
43 | {
44 | #pragma warning disable CS0618 // Type or member is obsolete
45 | if (allowWeakFallbackFormatters && (ex is ExecutionEngineException || ex.GetBaseException() is ExecutionEngineException))
46 | #pragma warning restore CS0618 // Type or member is obsolete
47 | {
48 | formatter = new WeakDelegateFormatter(type);
49 | }
50 | else throw;
51 | }
52 |
53 | return true;
54 | }
55 | }
56 | }
--------------------------------------------------------------------------------
/OdinSerializer/Core/FormatterLocators/DelegateFormatterLocator.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: dd5485e737c9a4e531ea3f0711f1c310
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {instanceID: 0}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/OdinSerializer/Core/FormatterLocators/FormatterLocator.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 5ea16c612a418e93cbc62f739909b337
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {instanceID: 0}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/OdinSerializer/Core/FormatterLocators/GenericCollectionFormatterLocator.cs:
--------------------------------------------------------------------------------
1 | //-----------------------------------------------------------------------
2 | //
3 | // Copyright (c) 2018 Sirenix IVS
4 | //
5 | // Licensed under the Apache License, Version 2.0 (the "License");
6 | // you may not use this file except in compliance with the License.
7 | // You may obtain a copy of the License at
8 | //
9 | // http://www.apache.org/licenses/LICENSE-2.0
10 | //
11 | // Unless required by applicable law or agreed to in writing, software
12 | // distributed under the License is distributed on an "AS IS" BASIS,
13 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 | // See the License for the specific language governing permissions and
15 | // limitations under the License.
16 | //
17 | //-----------------------------------------------------------------------
18 |
19 | using ToolBox.Serialization.OdinSerializer;
20 |
21 | [assembly: RegisterFormatterLocator(typeof(GenericCollectionFormatterLocator), -100)]
22 |
23 | namespace ToolBox.Serialization.OdinSerializer
24 | {
25 | using Utilities;
26 | using System;
27 |
28 | internal class GenericCollectionFormatterLocator : IFormatterLocator
29 | {
30 | public bool TryGetFormatter(Type type, FormatterLocationStep step, ISerializationPolicy policy, bool allowWeakFallbackFormatters, out IFormatter formatter)
31 | {
32 | Type elementType;
33 | if (step != FormatterLocationStep.AfterRegisteredFormatters || !GenericCollectionFormatter.CanFormat(type, out elementType))
34 | {
35 | formatter = null;
36 | return false;
37 | }
38 |
39 | try
40 | {
41 | formatter = (IFormatter)Activator.CreateInstance(typeof(GenericCollectionFormatter<,>).MakeGenericType(type, elementType));
42 | }
43 | catch (Exception ex)
44 | {
45 | #pragma warning disable CS0618 // Type or member is obsolete
46 | if (allowWeakFallbackFormatters && (ex is ExecutionEngineException || ex.GetBaseException() is ExecutionEngineException))
47 | #pragma warning restore CS0618 // Type or member is obsolete
48 | {
49 | formatter = new WeakGenericCollectionFormatter(type, elementType);
50 | }
51 | else throw;
52 | }
53 |
54 | return true;
55 | }
56 | }
57 | }
--------------------------------------------------------------------------------
/OdinSerializer/Core/FormatterLocators/GenericCollectionFormatterLocator.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 417cf33d6f3e5ea771dcde6e1473ce5f
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {instanceID: 0}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/OdinSerializer/Core/FormatterLocators/IFormatterLocator.cs:
--------------------------------------------------------------------------------
1 | //-----------------------------------------------------------------------
2 | //
3 | // Copyright (c) 2018 Sirenix IVS
4 | //
5 | // Licensed under the Apache License, Version 2.0 (the "License");
6 | // you may not use this file except in compliance with the License.
7 | // You may obtain a copy of the License at
8 | //
9 | // http://www.apache.org/licenses/LICENSE-2.0
10 | //
11 | // Unless required by applicable law or agreed to in writing, software
12 | // distributed under the License is distributed on an "AS IS" BASIS,
13 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 | // See the License for the specific language governing permissions and
15 | // limitations under the License.
16 | //
17 | //-----------------------------------------------------------------------
18 |
19 | namespace ToolBox.Serialization.OdinSerializer
20 | {
21 | using System;
22 |
23 | public interface IFormatterLocator
24 | {
25 | bool TryGetFormatter(Type type, FormatterLocationStep step, ISerializationPolicy policy, bool allowWeakFallbackFormatters, out IFormatter formatter);
26 | }
27 | }
--------------------------------------------------------------------------------
/OdinSerializer/Core/FormatterLocators/IFormatterLocator.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 3b0a83e867ab7851d21efb14c43a39e1
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {instanceID: 0}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/OdinSerializer/Core/FormatterLocators/ISerializableFormatterLocator.cs:
--------------------------------------------------------------------------------
1 | //-----------------------------------------------------------------------
2 | //
3 | // Copyright (c) 2018 Sirenix IVS
4 | //
5 | // Licensed under the Apache License, Version 2.0 (the "License");
6 | // you may not use this file except in compliance with the License.
7 | // You may obtain a copy of the License at
8 | //
9 | // http://www.apache.org/licenses/LICENSE-2.0
10 | //
11 | // Unless required by applicable law or agreed to in writing, software
12 | // distributed under the License is distributed on an "AS IS" BASIS,
13 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 | // See the License for the specific language governing permissions and
15 | // limitations under the License.
16 | //
17 | //-----------------------------------------------------------------------
18 |
19 | using ToolBox.Serialization.OdinSerializer;
20 |
21 | [assembly: RegisterFormatterLocator(typeof(ISerializableFormatterLocator), -110)]
22 |
23 | namespace ToolBox.Serialization.OdinSerializer
24 | {
25 | using Utilities;
26 | using System;
27 | using System.Runtime.Serialization;
28 |
29 | internal class ISerializableFormatterLocator : IFormatterLocator
30 | {
31 | public bool TryGetFormatter(Type type, FormatterLocationStep step, ISerializationPolicy policy, bool allowWeakFallbackFormatters, out IFormatter formatter)
32 | {
33 | if (step != FormatterLocationStep.AfterRegisteredFormatters || !typeof(ISerializable).IsAssignableFrom(type))
34 | {
35 | formatter = null;
36 | return false;
37 | }
38 |
39 | try
40 | {
41 | formatter = (IFormatter)Activator.CreateInstance(typeof(SerializableFormatter<>).MakeGenericType(type));
42 | }
43 | catch (Exception ex)
44 | {
45 | #pragma warning disable CS0618 // Type or member is obsolete
46 | if (allowWeakFallbackFormatters && (ex is ExecutionEngineException || ex.GetBaseException() is ExecutionEngineException))
47 | #pragma warning restore CS0618 // Type or member is obsolete
48 | {
49 | formatter = new WeakSerializableFormatter(type);
50 | }
51 | else throw;
52 | }
53 |
54 | return true;
55 | }
56 | }
57 | }
--------------------------------------------------------------------------------
/OdinSerializer/Core/FormatterLocators/ISerializableFormatterLocator.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 4c1a8a20bb7aaed4055b27ae6e97acad
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {instanceID: 0}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/OdinSerializer/Core/FormatterLocators/SelfFormatterLocator.cs:
--------------------------------------------------------------------------------
1 | //-----------------------------------------------------------------------
2 | //
3 | // Copyright (c) 2018 Sirenix IVS
4 | //
5 | // Licensed under the Apache License, Version 2.0 (the "License");
6 | // you may not use this file except in compliance with the License.
7 | // You may obtain a copy of the License at
8 | //
9 | // http://www.apache.org/licenses/LICENSE-2.0
10 | //
11 | // Unless required by applicable law or agreed to in writing, software
12 | // distributed under the License is distributed on an "AS IS" BASIS,
13 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 | // See the License for the specific language governing permissions and
15 | // limitations under the License.
16 | //
17 | //-----------------------------------------------------------------------
18 |
19 | using ToolBox.Serialization.OdinSerializer;
20 |
21 | [assembly: RegisterFormatterLocator(typeof(SelfFormatterLocator), -60)]
22 |
23 | namespace ToolBox.Serialization.OdinSerializer
24 | {
25 | using System;
26 | using Utilities;
27 |
28 | internal class SelfFormatterLocator : IFormatterLocator
29 | {
30 | public bool TryGetFormatter(Type type, FormatterLocationStep step, ISerializationPolicy policy, bool allowWeakFallbackFormatters, out IFormatter formatter)
31 | {
32 | formatter = null;
33 |
34 | if (!typeof(ISelfFormatter).IsAssignableFrom(type)) return false;
35 |
36 | if ((step == FormatterLocationStep.BeforeRegisteredFormatters && type.IsDefined())
37 | || step == FormatterLocationStep.AfterRegisteredFormatters)
38 | {
39 | try
40 | {
41 | formatter = (IFormatter)Activator.CreateInstance(typeof(SelfFormatterFormatter<>).MakeGenericType(type));
42 | }
43 | catch (Exception ex)
44 | {
45 | #pragma warning disable CS0618 // Type or member is obsolete
46 | if (allowWeakFallbackFormatters && (ex is ExecutionEngineException || ex.GetBaseException() is ExecutionEngineException))
47 | #pragma warning restore CS0618 // Type or member is obsolete
48 | {
49 | formatter = new WeakSelfFormatterFormatter(type);
50 | }
51 | else throw;
52 | }
53 |
54 | return true;
55 | }
56 |
57 | return false;
58 | }
59 | }
60 | }
--------------------------------------------------------------------------------
/OdinSerializer/Core/FormatterLocators/SelfFormatterLocator.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 035cee6f463d09fb606d915e4a3abb47
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {instanceID: 0}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/OdinSerializer/Core/FormatterLocators/TypeFormatterLocator.cs:
--------------------------------------------------------------------------------
1 | //-----------------------------------------------------------------------
2 | //
3 | // Copyright (c) 2018 Sirenix IVS
4 | //
5 | // Licensed under the Apache License, Version 2.0 (the "License");
6 | // you may not use this file except in compliance with the License.
7 | // You may obtain a copy of the License at
8 | //
9 | // http://www.apache.org/licenses/LICENSE-2.0
10 | //
11 | // Unless required by applicable law or agreed to in writing, software
12 | // distributed under the License is distributed on an "AS IS" BASIS,
13 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 | // See the License for the specific language governing permissions and
15 | // limitations under the License.
16 | //
17 | //-----------------------------------------------------------------------
18 |
19 | using ToolBox.Serialization.OdinSerializer;
20 |
21 | [assembly: RegisterFormatterLocator(typeof(TypeFormatterLocator), -70)]
22 |
23 | namespace ToolBox.Serialization.OdinSerializer
24 | {
25 | using System;
26 |
27 | internal class TypeFormatterLocator : IFormatterLocator
28 | {
29 | public bool TryGetFormatter(Type type, FormatterLocationStep step, ISerializationPolicy policy, bool allowWeakFallbackFormatters, out IFormatter formatter)
30 | {
31 | if (!typeof(Type).IsAssignableFrom(type))
32 | {
33 | formatter = null;
34 | return false;
35 | }
36 |
37 | formatter = new TypeFormatter();
38 | return true;
39 | }
40 | }
41 | }
--------------------------------------------------------------------------------
/OdinSerializer/Core/FormatterLocators/TypeFormatterLocator.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: c650062cf8d5162f8ccc662edcf718fa
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {instanceID: 0}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/OdinSerializer/Core/Formatters.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 170e63f048f0ecc42b7052accf063bf1
3 | folderAsset: yes
4 | DefaultImporter:
5 | externalObjects: {}
6 | userData:
7 | assetBundleName:
8 | assetBundleVariant:
9 |
--------------------------------------------------------------------------------
/OdinSerializer/Core/Formatters/ArrayFormatter.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 0731e8f8288e84036bfd93438ee66620
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {instanceID: 0}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/OdinSerializer/Core/Formatters/ArrayListFormatter.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 5750a13428f04b96e6f0c5c83d29fc47
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {instanceID: 0}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/OdinSerializer/Core/Formatters/BaseFormatter.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: a10741a4e99c2fd5740b4d8ba1c08bd3
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {instanceID: 0}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/OdinSerializer/Core/Formatters/DateTimeFormatter.cs:
--------------------------------------------------------------------------------
1 | //-----------------------------------------------------------------------
2 | //
3 | // Copyright (c) 2018 Sirenix IVS
4 | //
5 | // Licensed under the Apache License, Version 2.0 (the "License");
6 | // you may not use this file except in compliance with the License.
7 | // You may obtain a copy of the License at
8 | //
9 | // http://www.apache.org/licenses/LICENSE-2.0
10 | //
11 | // Unless required by applicable law or agreed to in writing, software
12 | // distributed under the License is distributed on an "AS IS" BASIS,
13 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 | // See the License for the specific language governing permissions and
15 | // limitations under the License.
16 | //
17 | //-----------------------------------------------------------------------
18 |
19 | using ToolBox.Serialization.OdinSerializer;
20 |
21 | [assembly: RegisterFormatter(typeof(DateTimeFormatter))]
22 |
23 | namespace ToolBox.Serialization.OdinSerializer
24 | {
25 | using System;
26 |
27 | ///
28 | /// Custom formatter for the type.
29 | ///
30 | ///
31 | public sealed class DateTimeFormatter : MinimalBaseFormatter
32 | {
33 | ///
34 | /// Reads into the specified value using the specified reader.
35 | ///
36 | /// The value to read into.
37 | /// The reader to use.
38 | protected override void Read(ref DateTime value, IDataReader reader)
39 | {
40 | string name;
41 |
42 | if (reader.PeekEntry(out name) == EntryType.Integer)
43 | {
44 | long binary;
45 | reader.ReadInt64(out binary);
46 | value = DateTime.FromBinary(binary);
47 | }
48 | }
49 |
50 | ///
51 | /// Writes from the specified value using the specified writer.
52 | ///
53 | /// The value to write from.
54 | /// The writer to use.
55 | protected override void Write(ref DateTime value, IDataWriter writer)
56 | {
57 | writer.WriteInt64(null, value.ToBinary());
58 | }
59 | }
60 | }
--------------------------------------------------------------------------------
/OdinSerializer/Core/Formatters/DateTimeFormatter.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 1380503d467e1d145ba6e5af1eb14cf6
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {instanceID: 0}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/OdinSerializer/Core/Formatters/DateTimeOffsetFormatter.cs:
--------------------------------------------------------------------------------
1 | //-----------------------------------------------------------------------
2 | //
3 | // Copyright (c) 2018 Sirenix IVS
4 | //
5 | // Licensed under the Apache License, Version 2.0 (the "License");
6 | // you may not use this file except in compliance with the License.
7 | // You may obtain a copy of the License at
8 | //
9 | // http://www.apache.org/licenses/LICENSE-2.0
10 | //
11 | // Unless required by applicable law or agreed to in writing, software
12 | // distributed under the License is distributed on an "AS IS" BASIS,
13 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 | // See the License for the specific language governing permissions and
15 | // limitations under the License.
16 | //
17 | //-----------------------------------------------------------------------
18 |
19 | using ToolBox.Serialization.OdinSerializer;
20 |
21 | [assembly: RegisterFormatter(typeof(DateTimeOffsetFormatter))]
22 |
23 | namespace ToolBox.Serialization.OdinSerializer
24 | {
25 | using System.Globalization;
26 | using System;
27 |
28 | ///
29 | /// Custom formatter for the type.
30 | ///
31 | ///
32 | public sealed class DateTimeOffsetFormatter : MinimalBaseFormatter
33 | {
34 | ///
35 | /// Reads into the specified value using the specified reader.
36 | ///
37 | /// The value to read into.
38 | /// The reader to use.
39 | protected override void Read(ref DateTimeOffset value, IDataReader reader)
40 | {
41 | string name;
42 |
43 | if (reader.PeekEntry(out name) == EntryType.String)
44 | {
45 | string str;
46 | reader.ReadString(out str);
47 | DateTimeOffset.TryParse(str, out value);
48 | }
49 | }
50 |
51 | ///
52 | /// Writes from the specified value using the specified writer.
53 | ///
54 | /// The value to write from.
55 | /// The writer to use.
56 | protected override void Write(ref DateTimeOffset value, IDataWriter writer)
57 | {
58 | writer.WriteString(null, value.ToString("O", CultureInfo.InvariantCulture));
59 | }
60 | }
61 | }
--------------------------------------------------------------------------------
/OdinSerializer/Core/Formatters/DateTimeOffsetFormatter.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: e3e5e94b4f2be2ea4ff8c7b4f22c4c42
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {instanceID: 0}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/OdinSerializer/Core/Formatters/DelegateFormatter.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 1847ab02f426fdc3ee601a2a8026dd44
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {instanceID: 0}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/OdinSerializer/Core/Formatters/DerivedDictionaryFormatter.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 3358dc2fbcff67e10a978da0b3ceadc7
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {instanceID: 0}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/OdinSerializer/Core/Formatters/DictionaryFormatter.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: c3d11ce07047ca0d818a4324996f0740
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {instanceID: 0}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/OdinSerializer/Core/Formatters/DoubleLookupDictionaryFormatter.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 1034d60868c2ef60aae2bcadef2304ee
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {instanceID: 0}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/OdinSerializer/Core/Formatters/EasyBaseFormatter.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 739f7f7011be534a842dde18fd104134
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {instanceID: 0}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/OdinSerializer/Core/Formatters/EmittedFormatterAttribute.cs:
--------------------------------------------------------------------------------
1 | //-----------------------------------------------------------------------
2 | //
3 | // Copyright (c) 2018 Sirenix IVS
4 | //
5 | // Licensed under the Apache License, Version 2.0 (the "License");
6 | // you may not use this file except in compliance with the License.
7 | // You may obtain a copy of the License at
8 | //
9 | // http://www.apache.org/licenses/LICENSE-2.0
10 | //
11 | // Unless required by applicable law or agreed to in writing, software
12 | // distributed under the License is distributed on an "AS IS" BASIS,
13 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 | // See the License for the specific language governing permissions and
15 | // limitations under the License.
16 | //
17 | //-----------------------------------------------------------------------
18 |
19 | namespace ToolBox.Serialization.OdinSerializer
20 | {
21 | using System;
22 |
23 | ///
24 | /// Indicates that this formatter type has been emitted. Never put this on a type!
25 | ///
26 | [AttributeUsage(AttributeTargets.Class)]
27 | public class EmittedFormatterAttribute : Attribute
28 | {
29 | }
30 | }
--------------------------------------------------------------------------------
/OdinSerializer/Core/Formatters/EmittedFormatterAttribute.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 9089928d003280e6e43fcdc85313245e
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {instanceID: 0}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/OdinSerializer/Core/Formatters/EmptyTypeFormatter.cs:
--------------------------------------------------------------------------------
1 | //-----------------------------------------------------------------------
2 | //
3 | // Copyright (c) 2018 Sirenix IVS
4 | //
5 | // Licensed under the Apache License, Version 2.0 (the "License");
6 | // you may not use this file except in compliance with the License.
7 | // You may obtain a copy of the License at
8 | //
9 | // http://www.apache.org/licenses/LICENSE-2.0
10 | //
11 | // Unless required by applicable law or agreed to in writing, software
12 | // distributed under the License is distributed on an "AS IS" BASIS,
13 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 | // See the License for the specific language governing permissions and
15 | // limitations under the License.
16 | //
17 | //-----------------------------------------------------------------------
18 |
19 | namespace ToolBox.Serialization.OdinSerializer
20 | {
21 | ///
22 | /// A formatter for empty types. It writes no data, and skips all data that is to be read, deserializing a "default" value.
23 | ///
24 | public class EmptyTypeFormatter : EasyBaseFormatter
25 | {
26 | ///
27 | /// Skips the entry to read.
28 | ///
29 | protected override void ReadDataEntry(ref T value, string entryName, EntryType entryType, IDataReader reader)
30 | {
31 | // Just skip
32 | reader.SkipEntry();
33 | }
34 |
35 | ///
36 | /// Does nothing at all.
37 | ///
38 | protected override void WriteDataEntries(ref T value, IDataWriter writer)
39 | {
40 | // Do nothing
41 | }
42 | }
43 | }
--------------------------------------------------------------------------------
/OdinSerializer/Core/Formatters/EmptyTypeFormatter.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 443ba0beaf4ddb6d7974b709dd26181a
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {instanceID: 0}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/OdinSerializer/Core/Formatters/FormatterEmitter.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 2698c093decbf4fa2b3f11244cbcb8dc
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {instanceID: 0}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/OdinSerializer/Core/Formatters/GenericCollectionFormatter.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 9603f33d0f833c8a0bd33b80a8be6224
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {instanceID: 0}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/OdinSerializer/Core/Formatters/HashSetFormatter.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: f9acc43b01632dcdfd311c735dfdab4f
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {instanceID: 0}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/OdinSerializer/Core/Formatters/IFormatter.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: aa4d6f6900bd51dce01be0cb95ad9036
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {instanceID: 0}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/OdinSerializer/Core/Formatters/KeyValuePairFormatter.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: bf765f69604b743ff733d5ceb9402ad1
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {instanceID: 0}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/OdinSerializer/Core/Formatters/ListFormatter.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 1b09a38475c1317cc0604031a20ec8c2
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {instanceID: 0}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/OdinSerializer/Core/Formatters/MethodInfoFormatter.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: a71303cdd37d60246468a972a816378c
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {instanceID: 0}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/OdinSerializer/Core/Formatters/MinimalBaseFormatter.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 96e935eac4129a1dc69906d86939c033
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {instanceID: 0}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/OdinSerializer/Core/Formatters/MultiDimensionalArrayFormatter.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: a38886156778da161695ee94ef232782
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {instanceID: 0}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/OdinSerializer/Core/Formatters/NullableFormatter.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 5974cc3e760264b1a4b6e8da69bcfcb7
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {instanceID: 0}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/OdinSerializer/Core/Formatters/PrimitiveArrayFormatter.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 318aea443cbe7bef382e506c0facbdc5
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {instanceID: 0}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/OdinSerializer/Core/Formatters/QueueFormatter.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 0222238181c77e6e4f7ec583dde526c3
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {instanceID: 0}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/OdinSerializer/Core/Formatters/ReflectionFormatter.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 5a0591da7b3a773a3d1d84d1aa71403d
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {instanceID: 0}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/OdinSerializer/Core/Formatters/ReflectionOrEmittedBaseFormatter.cs:
--------------------------------------------------------------------------------
1 | //-----------------------------------------------------------------------
2 | //
3 | // Copyright (c) 2018 Sirenix IVS
4 | //
5 | // Licensed under the Apache License, Version 2.0 (the "License");
6 | // you may not use this file except in compliance with the License.
7 | // You may obtain a copy of the License at
8 | //
9 | // http://www.apache.org/licenses/LICENSE-2.0
10 | //
11 | // Unless required by applicable law or agreed to in writing, software
12 | // distributed under the License is distributed on an "AS IS" BASIS,
13 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 | // See the License for the specific language governing permissions and
15 | // limitations under the License.
16 | //
17 | //-----------------------------------------------------------------------
18 |
19 | #if (UNITY_EDITOR || UNITY_STANDALONE) && !ENABLE_IL2CPP
20 | #define CAN_EMIT
21 | #endif
22 |
23 | namespace ToolBox.Serialization.OdinSerializer
24 | {
25 | public abstract class ReflectionOrEmittedBaseFormatter : ReflectionFormatter
26 | {
27 | #if CAN_EMIT
28 |
29 | protected override void DeserializeImplementation(ref T value, IDataReader reader)
30 | {
31 | var formatter = FormatterEmitter.GetEmittedFormatter(typeof(T), reader.Context.Config.SerializationPolicy) as FormatterEmitter.RuntimeEmittedFormatter;
32 |
33 | if (formatter == null)
34 | return;
35 |
36 | int count = 0;
37 | string name;
38 | EntryType entry;
39 |
40 | while ((entry = reader.PeekEntry(out name)) != EntryType.EndOfNode && entry != EntryType.EndOfArray && entry != EntryType.EndOfStream)
41 | {
42 | formatter.Read(ref value, name, entry, reader);
43 |
44 | count++;
45 |
46 | if (count > 1000)
47 | {
48 | reader.Context.Config.DebugContext.LogError("Breaking out of infinite reading loop!");
49 | break;
50 | }
51 | }
52 | }
53 |
54 | protected override void SerializeImplementation(ref T value, IDataWriter writer)
55 | {
56 | var formatter = FormatterEmitter.GetEmittedFormatter(typeof(T), writer.Context.Config.SerializationPolicy) as FormatterEmitter.RuntimeEmittedFormatter;
57 |
58 | if (formatter == null)
59 | return;
60 |
61 | formatter.Write(ref value, writer);
62 | }
63 | #endif
64 | }
65 | }
--------------------------------------------------------------------------------
/OdinSerializer/Core/Formatters/ReflectionOrEmittedBaseFormatter.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 18ce9356ce14e94ada943ae2ca0d8f78
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {instanceID: 0}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/OdinSerializer/Core/Formatters/SelfFormatterFormatter.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 48dd526b9b377fd6dc48087349f73c47
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {instanceID: 0}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/OdinSerializer/Core/Formatters/SerializableFormatter.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 73d1c6351a5cef85efdb6581208c4f94
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {instanceID: 0}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/OdinSerializer/Core/Formatters/StackFormatter.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: ea5ff2d9b5df3406d99b844756aa8ffd
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {instanceID: 0}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/OdinSerializer/Core/Formatters/TimeSpanFormatter.cs:
--------------------------------------------------------------------------------
1 | //-----------------------------------------------------------------------
2 | //
3 | // Copyright (c) 2018 Sirenix IVS
4 | //
5 | // Licensed under the Apache License, Version 2.0 (the "License");
6 | // you may not use this file except in compliance with the License.
7 | // You may obtain a copy of the License at
8 | //
9 | // http://www.apache.org/licenses/LICENSE-2.0
10 | //
11 | // Unless required by applicable law or agreed to in writing, software
12 | // distributed under the License is distributed on an "AS IS" BASIS,
13 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 | // See the License for the specific language governing permissions and
15 | // limitations under the License.
16 | //
17 | //-----------------------------------------------------------------------
18 |
19 | using ToolBox.Serialization.OdinSerializer;
20 |
21 | [assembly: RegisterFormatter(typeof(TimeSpanFormatter))]
22 |
23 | namespace ToolBox.Serialization.OdinSerializer
24 | {
25 | using System;
26 |
27 | ///
28 | /// Custom formatter for the type.
29 | ///
30 | ///
31 | public sealed class TimeSpanFormatter : MinimalBaseFormatter
32 | {
33 | ///
34 | /// Reads into the specified value using the specified reader.
35 | ///
36 | /// The value to read into.
37 | /// The reader to use.
38 | protected override void Read(ref TimeSpan value, IDataReader reader)
39 | {
40 | string name;
41 |
42 | if (reader.PeekEntry(out name) == EntryType.Integer)
43 | {
44 | long ticks;
45 | reader.ReadInt64(out ticks);
46 | value = new TimeSpan(ticks);
47 | }
48 | }
49 |
50 | ///
51 | /// Writes from the specified value using the specified writer.
52 | ///
53 | /// The value to write from.
54 | /// The writer to use.
55 | protected override void Write(ref TimeSpan value, IDataWriter writer)
56 | {
57 | writer.WriteInt64(null, value.Ticks);
58 | }
59 | }
60 | }
--------------------------------------------------------------------------------
/OdinSerializer/Core/Formatters/TimeSpanFormatter.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: dbfb8322a7bcf04e3b040b9f62e202d2
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {instanceID: 0}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/OdinSerializer/Core/Formatters/TypeFormatter.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 70a0c1ae2653dadfe76c81a9775a1406
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {instanceID: 0}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/OdinSerializer/Core/Formatters/VersionFormatter.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 9f5212401202e0c378c2d20c36522292
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {instanceID: 0}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/OdinSerializer/Core/Misc.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: d369292bdf1068846b405ca263293d10
3 | folderAsset: yes
4 | DefaultImporter:
5 | externalObjects: {}
6 | userData:
7 | assetBundleName:
8 | assetBundleVariant:
9 |
--------------------------------------------------------------------------------
/OdinSerializer/Core/Misc/AllowDeserializeInvalidDataAttribute.cs:
--------------------------------------------------------------------------------
1 | //-----------------------------------------------------------------------
2 | //
3 | // Copyright (c) 2018 Sirenix IVS
4 | //
5 | // Licensed under the Apache License, Version 2.0 (the "License");
6 | // you may not use this file except in compliance with the License.
7 | // You may obtain a copy of the License at
8 | //
9 | // http://www.apache.org/licenses/LICENSE-2.0
10 | //
11 | // Unless required by applicable law or agreed to in writing, software
12 | // distributed under the License is distributed on an "AS IS" BASIS,
13 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 | // See the License for the specific language governing permissions and
15 | // limitations under the License.
16 | //
17 | //-----------------------------------------------------------------------
18 |
19 | namespace ToolBox.Serialization.OdinSerializer
20 | {
21 | using System;
22 |
23 | ///
24 | ///
25 | /// Applying this attribute to a type indicates that in the case where, when expecting to deserialize an instance of the type
26 | /// or any of its derived types, but encountering an incompatible, uncastable type in the data being read, the serializer
27 | /// should attempt to deserialize an instance of the expected type using the stored, possibly invalid data.
28 | ///
29 | ///
30 | /// This is equivalent to the option, expect type-specific instead
31 | /// of global.
32 | ///
33 | ///
34 | [AttributeUsage(AttributeTargets.Class | AttributeTargets.Struct, AllowMultiple = false, Inherited = true)]
35 | public class AllowDeserializeInvalidDataAttribute : Attribute
36 | {
37 | }
38 | }
--------------------------------------------------------------------------------
/OdinSerializer/Core/Misc/AllowDeserializeInvalidDataAttribute.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: a1a191d5a3f3ac3623992998e84b2823
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {instanceID: 0}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/OdinSerializer/Core/Misc/AlwaysFormatsSelfAttribute.cs:
--------------------------------------------------------------------------------
1 | //-----------------------------------------------------------------------
2 | //
3 | // Copyright (c) 2018 Sirenix IVS
4 | //
5 | // Licensed under the Apache License, Version 2.0 (the "License");
6 | // you may not use this file except in compliance with the License.
7 | // You may obtain a copy of the License at
8 | //
9 | // http://www.apache.org/licenses/LICENSE-2.0
10 | //
11 | // Unless required by applicable law or agreed to in writing, software
12 | // distributed under the License is distributed on an "AS IS" BASIS,
13 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 | // See the License for the specific language governing permissions and
15 | // limitations under the License.
16 | //
17 | //-----------------------------------------------------------------------
18 | namespace ToolBox.Serialization.OdinSerializer
19 | {
20 | using System;
21 |
22 | ///
23 | /// Use this attribute to specify that a type that implements the
24 | /// interface should *always* format itself regardless of other formatters being specified.
25 | ///
26 | /// This means that the interface will be used to format all types derived from the type that
27 | /// is decorated with this attribute, regardless of custom formatters for the derived types.
28 | ///
29 | ///
30 | [AttributeUsage(AttributeTargets.Class | AttributeTargets.Struct, AllowMultiple = false, Inherited = true)]
31 | public sealed class AlwaysFormatsSelfAttribute : Attribute
32 | {
33 | }
34 | }
--------------------------------------------------------------------------------
/OdinSerializer/Core/Misc/AlwaysFormatsSelfAttribute.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 81f4e093d8901efb76e6aee8ffb57433
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {instanceID: 0}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/OdinSerializer/Core/Misc/ArchitectureInfo.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 9e96bd6be961e77decb91e26b05d548d
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {instanceID: 0}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/OdinSerializer/Core/Misc/Buffer.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 391501b1c4202e0c659200440daa3e3d
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {instanceID: 0}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/OdinSerializer/Core/Misc/CachedMemoryStream.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 8b22a8777a2a2e8ac9e358e4aabcada5
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {instanceID: 0}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/OdinSerializer/Core/Misc/CustomFormatterAttribute.cs:
--------------------------------------------------------------------------------
1 | //-----------------------------------------------------------------------
2 | //
3 | // Copyright (c) 2018 Sirenix IVS
4 | //
5 | // Licensed under the Apache License, Version 2.0 (the "License");
6 | // you may not use this file except in compliance with the License.
7 | // You may obtain a copy of the License at
8 | //
9 | // http://www.apache.org/licenses/LICENSE-2.0
10 | //
11 | // Unless required by applicable law or agreed to in writing, software
12 | // distributed under the License is distributed on an "AS IS" BASIS,
13 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 | // See the License for the specific language governing permissions and
15 | // limitations under the License.
16 | //
17 | //-----------------------------------------------------------------------
18 |
19 | namespace ToolBox.Serialization.OdinSerializer
20 | {
21 | using System;
22 |
23 | ///
24 | /// Attribute indicating that a class which implements the interface somewhere in its hierarchy is a custom formatter for the type T.
25 | ///
26 | ///
27 | [AttributeUsage(AttributeTargets.Class)]
28 | [Obsolete("Use a RegisterFormatterAttribute applied to the containing assembly instead.", true)]
29 | [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)]
30 | public class CustomFormatterAttribute : Attribute
31 | {
32 | ///
33 | /// The priority of the formatter. Of all the available custom formatters, the formatter with the highest priority is always chosen.
34 | ///
35 | public readonly int Priority;
36 |
37 | ///
38 | /// Initializes a new instance of the class with priority 0.
39 | ///
40 | public CustomFormatterAttribute()
41 | {
42 | this.Priority = 0;
43 | }
44 |
45 | ///
46 | /// Initializes a new instance of the class.
47 | ///
48 | /// The priority of the formatter. Of all the available custom formatters, the formatter with the highest priority is always chosen.
49 | public CustomFormatterAttribute(int priority = 0)
50 | {
51 | this.Priority = priority;
52 | }
53 | }
54 | }
--------------------------------------------------------------------------------
/OdinSerializer/Core/Misc/CustomFormatterAttribute.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 1230bd68e831ed72a1ba7944805d4619
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {instanceID: 0}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/OdinSerializer/Core/Misc/CustomGenericFormatterAttribute.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 2a53ebe596457578de10102286c8c33e
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {instanceID: 0}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/OdinSerializer/Core/Misc/CustomLogger.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: b7659e23098a0f00958dd790de140de9
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {instanceID: 0}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/OdinSerializer/Core/Misc/CustomSerializationPolicy.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 7c048d28ce2cbcbb8277c1c9dffa9013
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {instanceID: 0}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/OdinSerializer/Core/Misc/DataFormat.cs:
--------------------------------------------------------------------------------
1 | //-----------------------------------------------------------------------
2 | //
3 | // Copyright (c) 2018 Sirenix IVS
4 | //
5 | // Licensed under the Apache License, Version 2.0 (the "License");
6 | // you may not use this file except in compliance with the License.
7 | // You may obtain a copy of the License at
8 | //
9 | // http://www.apache.org/licenses/LICENSE-2.0
10 | //
11 | // Unless required by applicable law or agreed to in writing, software
12 | // distributed under the License is distributed on an "AS IS" BASIS,
13 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 | // See the License for the specific language governing permissions and
15 | // limitations under the License.
16 | //
17 | //-----------------------------------------------------------------------
18 |
19 | namespace ToolBox.Serialization.OdinSerializer
20 | {
21 | ///
22 | /// Specifies a data format to read and write in.
23 | ///
24 | public enum DataFormat
25 | {
26 | ///
27 | /// A custom packed binary format. This format is most efficient and almost allocation-free,
28 | /// but its serialized data is not human-readable.
29 | ///
30 | Binary = 0,
31 |
32 | ///
33 | /// A JSON format compliant with the json specification found at "http://www.json.org/".
34 | ///
35 | /// This format has rather sluggish performance and allocates frightening amounts of string garbage.
36 | ///
37 | JSON = 1,
38 |
39 | ///
40 | /// A format that does not serialize to a byte stream, but to a list of data nodes in memory
41 | /// which can then be serialized by Unity.
42 | ///
43 | /// This format is highly inefficient, and is primarily used for ensuring that Unity assets
44 | /// are mergeable by individual values when saved in Unity's text format. This makes
45 | /// serialized values more robust and data recovery easier in case of issues.
46 | ///
47 | /// This format is *not* recommended for use in builds.
48 | ///
49 | Nodes = 2
50 | }
51 | }
--------------------------------------------------------------------------------
/OdinSerializer/Core/Misc/DataFormat.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 94f21f862e976b23399807ca60618ddf
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {instanceID: 0}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/OdinSerializer/Core/Misc/DefaultLoggers.cs:
--------------------------------------------------------------------------------
1 | namespace ToolBox.Serialization.OdinSerializer
2 | {
3 | ///
4 | /// Defines default loggers for serialization and deserialization. This class and all of its loggers are thread safe.
5 | ///
6 | public static class DefaultLoggers
7 | {
8 | private static readonly object LOCK = new object();
9 | private static volatile ILogger unityLogger;
10 |
11 | ///
12 | /// The default logger - usually this is .
13 | ///
14 | public static ILogger DefaultLogger
15 | {
16 | get
17 | {
18 | return UnityLogger;
19 | }
20 | }
21 |
22 | ///
23 | /// Logs messages using Unity's class.
24 | ///
25 | public static ILogger UnityLogger
26 | {
27 | get
28 | {
29 | if (unityLogger == null)
30 | {
31 | lock (LOCK)
32 | {
33 | if (unityLogger == null)
34 | {
35 | unityLogger = new CustomLogger(UnityEngine.Debug.LogWarning, UnityEngine.Debug.LogError, UnityEngine.Debug.LogException);
36 | }
37 | }
38 | }
39 |
40 | return unityLogger;
41 | }
42 | }
43 | }
44 | }
--------------------------------------------------------------------------------
/OdinSerializer/Core/Misc/DefaultLoggers.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: a9cafdf065f7a1f552799a5cda92d056
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {instanceID: 0}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/OdinSerializer/Core/Misc/DefaultSerializationBinder.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 7054f45a751cccb30fdad8835f5402ed
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {instanceID: 0}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/OdinSerializer/Core/Misc/DeserializationContext.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: bd60894dbaf5133e6e02ad30db05ea61
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {instanceID: 0}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/OdinSerializer/Core/Misc/EmittedAssemblyAttribute.cs:
--------------------------------------------------------------------------------
1 | //-----------------------------------------------------------------------
2 | //
3 | // Copyright (c) 2018 Sirenix IVS
4 | //
5 | // Licensed under the Apache License, Version 2.0 (the "License");
6 | // you may not use this file except in compliance with the License.
7 | // You may obtain a copy of the License at
8 | //
9 | // http://www.apache.org/licenses/LICENSE-2.0
10 | //
11 | // Unless required by applicable law or agreed to in writing, software
12 | // distributed under the License is distributed on an "AS IS" BASIS,
13 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 | // See the License for the specific language governing permissions and
15 | // limitations under the License.
16 | //
17 | //-----------------------------------------------------------------------
18 |
19 | namespace ToolBox.Serialization.OdinSerializer
20 | {
21 | using System;
22 |
23 | [AttributeUsage(AttributeTargets.Assembly, AllowMultiple = false)]
24 | [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)]
25 | public sealed class EmittedAssemblyAttribute : Attribute
26 | {
27 | [Obsolete("This attribute cannot be used in code, and is only meant to be applied to dynamically emitted assemblies.", true)]
28 | public EmittedAssemblyAttribute() { }
29 | }
30 | }
--------------------------------------------------------------------------------
/OdinSerializer/Core/Misc/EmittedAssemblyAttribute.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 94c69b6e3fc36bd986130467208d02a4
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {instanceID: 0}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/OdinSerializer/Core/Misc/EntryType.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 3d68fbc8fa11a73678131d56bb23a17e
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {instanceID: 0}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/OdinSerializer/Core/Misc/ErrorHandlingPolicy.cs:
--------------------------------------------------------------------------------
1 | namespace ToolBox.Serialization.OdinSerializer
2 | {
3 | ///
4 | /// The policy for handling errors during serialization and deserialization.
5 | ///
6 | public enum ErrorHandlingPolicy
7 | {
8 | ///
9 | /// Attempts will be made to recover from errors and continue serialization. Data may become invalid.
10 | ///
11 | Resilient,
12 |
13 | ///
14 | /// Exceptions will be thrown when errors are logged.
15 | ///
16 | ThrowOnErrors,
17 |
18 | ///
19 | /// Exceptions will be thrown when warnings or errors are logged.
20 | ///
21 | ThrowOnWarningsAndErrors
22 | }
23 | }
--------------------------------------------------------------------------------
/OdinSerializer/Core/Misc/ErrorHandlingPolicy.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 2d01082e89c258db410e67ce1512d0b2
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {instanceID: 0}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/OdinSerializer/Core/Misc/ExcludeDataFromInspectorAttribute.cs:
--------------------------------------------------------------------------------
1 | //-----------------------------------------------------------------------
2 | //
3 | // Copyright (c) 2018 Sirenix IVS
4 | //
5 | // Licensed under the Apache License, Version 2.0 (the "License");
6 | // you may not use this file except in compliance with the License.
7 | // You may obtain a copy of the License at
8 | //
9 | // http://www.apache.org/licenses/LICENSE-2.0
10 | //
11 | // Unless required by applicable law or agreed to in writing, software
12 | // distributed under the License is distributed on an "AS IS" BASIS,
13 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 | // See the License for the specific language governing permissions and
15 | // limitations under the License.
16 | //
17 | //-----------------------------------------------------------------------
18 | namespace ToolBox.Serialization.OdinSerializer
19 | {
20 | using System;
21 |
22 | ///
23 | ///
24 | /// Causes Odin's inspector to completely ignore a given member, preventing it from even being included in an Odin PropertyTree,
25 | /// and such will not cause any performance hits in the inspector.
26 | ///
27 | /// Note that Odin can still serialize an excluded member - it is merely ignored in the inspector itself.
28 | ///
29 | [AttributeUsage(AttributeTargets.Field | AttributeTargets.Property, AllowMultiple = false, Inherited = true)]
30 | [Obsolete("Use [HideInInspector] instead - it now also excludes the member completely from becoming a property in the property tree.", false)]
31 | [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)]
32 | public sealed class ExcludeDataFromInspectorAttribute : Attribute
33 | {
34 | }
35 | }
--------------------------------------------------------------------------------
/OdinSerializer/Core/Misc/ExcludeDataFromInspectorAttribute.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 4263174bc4849019434ffb76277cf6fb
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {instanceID: 0}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/OdinSerializer/Core/Misc/FormatterLocationStep.cs:
--------------------------------------------------------------------------------
1 | //-----------------------------------------------------------------------
2 | //
3 | // Copyright (c) 2018 Sirenix IVS
4 | //
5 | // Licensed under the Apache License, Version 2.0 (the "License");
6 | // you may not use this file except in compliance with the License.
7 | // You may obtain a copy of the License at
8 | //
9 | // http://www.apache.org/licenses/LICENSE-2.0
10 | //
11 | // Unless required by applicable law or agreed to in writing, software
12 | // distributed under the License is distributed on an "AS IS" BASIS,
13 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 | // See the License for the specific language governing permissions and
15 | // limitations under the License.
16 | //
17 | //-----------------------------------------------------------------------
18 |
19 | namespace ToolBox.Serialization.OdinSerializer
20 | {
21 | public enum FormatterLocationStep
22 | {
23 | BeforeRegisteredFormatters,
24 | AfterRegisteredFormatters
25 | }
26 | }
--------------------------------------------------------------------------------
/OdinSerializer/Core/Misc/FormatterLocationStep.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 345cab2395be6ad266ebcbab31897ae6
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {instanceID: 0}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/OdinSerializer/Core/Misc/FormatterUtilities.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 618b4f3878f43a6b04e29f073763a723
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {instanceID: 0}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/OdinSerializer/Core/Misc/IAskIfCanFormatTypes.cs:
--------------------------------------------------------------------------------
1 | //-----------------------------------------------------------------------
2 | //
3 | // Copyright (c) 2018 Sirenix IVS
4 | //
5 | // Licensed under the Apache License, Version 2.0 (the "License");
6 | // you may not use this file except in compliance with the License.
7 | // You may obtain a copy of the License at
8 | //
9 | // http://www.apache.org/licenses/LICENSE-2.0
10 | //
11 | // Unless required by applicable law or agreed to in writing, software
12 | // distributed under the License is distributed on an "AS IS" BASIS,
13 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 | // See the License for the specific language governing permissions and
15 | // limitations under the License.
16 | //
17 | //-----------------------------------------------------------------------
18 |
19 | namespace ToolBox.Serialization.OdinSerializer
20 | {
21 | using System;
22 |
23 | public interface IAskIfCanFormatTypes
24 | {
25 | bool CanFormatType(Type type);
26 | }
27 | }
--------------------------------------------------------------------------------
/OdinSerializer/Core/Misc/IAskIfCanFormatTypes.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: ff6a40cdc72f6fabfc05d399b689ef79
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {instanceID: 0}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/OdinSerializer/Core/Misc/IExternalGuidReferenceResolver.cs:
--------------------------------------------------------------------------------
1 | //-----------------------------------------------------------------------
2 | //
3 | // Copyright (c) 2018 Sirenix IVS
4 | //
5 | // Licensed under the Apache License, Version 2.0 (the "License");
6 | // you may not use this file except in compliance with the License.
7 | // You may obtain a copy of the License at
8 | //
9 | // http://www.apache.org/licenses/LICENSE-2.0
10 | //
11 | // Unless required by applicable law or agreed to in writing, software
12 | // distributed under the License is distributed on an "AS IS" BASIS,
13 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 | // See the License for the specific language governing permissions and
15 | // limitations under the License.
16 | //
17 | //-----------------------------------------------------------------------
18 |
19 | namespace ToolBox.Serialization.OdinSerializer
20 | {
21 | using System;
22 |
23 | ///
24 | /// Resolves external guid references to reference objects during serialization and deserialization.
25 | ///
26 | public interface IExternalGuidReferenceResolver
27 | {
28 | ///
29 | /// Gets or sets the next resolver in the chain.
30 | ///
31 | ///
32 | /// The next resolver in the chain.
33 | ///
34 | IExternalGuidReferenceResolver NextResolver { get; set; }
35 |
36 | ///
37 | /// Tries to resolve a reference from a given Guid.
38 | ///
39 | /// The Guid to resolve.
40 | /// The resolved value.
41 | /// true if the value was resolved; otherwise, false.
42 | bool TryResolveReference(Guid guid, out object value);
43 |
44 | ///
45 | /// Determines whether this resolver can reference the specified value with a Guid.
46 | ///
47 | /// The value to check.
48 | /// The Guid which references the value.
49 | /// true if the value can be referenced; otherwise, false.
50 | bool CanReference(object value, out Guid guid);
51 | }
52 | }
--------------------------------------------------------------------------------
/OdinSerializer/Core/Misc/IExternalGuidReferenceResolver.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: ad9e8df68f584e8f311e4fa9538e973e
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {instanceID: 0}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/OdinSerializer/Core/Misc/IExternalIndexReferenceResolver.cs:
--------------------------------------------------------------------------------
1 | //-----------------------------------------------------------------------
2 | //
3 | // Copyright (c) 2018 Sirenix IVS
4 | //
5 | // Licensed under the Apache License, Version 2.0 (the "License");
6 | // you may not use this file except in compliance with the License.
7 | // You may obtain a copy of the License at
8 | //
9 | // http://www.apache.org/licenses/LICENSE-2.0
10 | //
11 | // Unless required by applicable law or agreed to in writing, software
12 | // distributed under the License is distributed on an "AS IS" BASIS,
13 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 | // See the License for the specific language governing permissions and
15 | // limitations under the License.
16 | //
17 | //-----------------------------------------------------------------------
18 |
19 | namespace ToolBox.Serialization.OdinSerializer
20 | {
21 | ///
22 | /// Resolves external index references to reference objects during serialization and deserialization.
23 | ///
24 | public interface IExternalIndexReferenceResolver
25 | {
26 | ///
27 | /// Tries to resolve the given reference index to a reference value.
28 | ///
29 | /// The index to resolve.
30 | /// The resolved value.
31 | /// true if the index could be resolved to a value, otherwise false.
32 | bool TryResolveReference(int index, out object value);
33 |
34 | ///
35 | /// Determines whether the specified value can be referenced externally via this resolver.
36 | ///
37 | /// The value to reference.
38 | /// The index of the resolved value, if it can be referenced.
39 | /// true if the reference can be resolved, otherwise false.
40 | bool CanReference(object value, out int index);
41 | }
42 | }
--------------------------------------------------------------------------------
/OdinSerializer/Core/Misc/IExternalIndexReferenceResolver.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 9873baffde8b622983d547f4d2ef1b4d
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {instanceID: 0}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/OdinSerializer/Core/Misc/IExternalStringReferenceResolver.cs:
--------------------------------------------------------------------------------
1 | //-----------------------------------------------------------------------
2 | //
3 | // Copyright (c) 2018 Sirenix IVS
4 | //
5 | // Licensed under the Apache License, Version 2.0 (the "License");
6 | // you may not use this file except in compliance with the License.
7 | // You may obtain a copy of the License at
8 | //
9 | // http://www.apache.org/licenses/LICENSE-2.0
10 | //
11 | // Unless required by applicable law or agreed to in writing, software
12 | // distributed under the License is distributed on an "AS IS" BASIS,
13 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 | // See the License for the specific language governing permissions and
15 | // limitations under the License.
16 | //
17 | //-----------------------------------------------------------------------
18 | namespace ToolBox.Serialization.OdinSerializer
19 | {
20 | ///
21 | /// Resolves external strings references to reference objects during serialization and deserialization.
22 | ///
23 | public interface IExternalStringReferenceResolver
24 | {
25 | ///
26 | /// Gets or sets the next resolver in the chain.
27 | ///
28 | ///
29 | /// The next resolver in the chain.
30 | ///
31 | IExternalStringReferenceResolver NextResolver { get; set; }
32 |
33 | ///
34 | /// Tries to resolve a reference from a given Guid.
35 | ///
36 | /// The to resolve.
37 | /// The resolved value.
38 | /// true if the value was resolved; otherwise, false.
39 | bool TryResolveReference(string id, out object value);
40 |
41 | ///
42 | /// Determines whether this resolver can reference the specified value with a string.
43 | ///
44 | /// The value to check.
45 | /// The string which references the value.
46 | /// true if the value can be referenced; otherwise, false.
47 | bool CanReference(object value, out string id);
48 | }
49 | }
--------------------------------------------------------------------------------
/OdinSerializer/Core/Misc/IExternalStringReferenceResolver.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: d633ccb54c73f83e470869e9448093ac
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {instanceID: 0}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/OdinSerializer/Core/Misc/ILogger.cs:
--------------------------------------------------------------------------------
1 | namespace ToolBox.Serialization.OdinSerializer
2 | {
3 | using System;
4 |
5 | ///
6 | /// Implements methods for logging warnings, errors and exceptions during serialization and deserialization.
7 | ///
8 | public interface ILogger
9 | {
10 | ///
11 | /// Logs a warning.
12 | ///
13 | /// The warning to log.
14 | void LogWarning(string warning);
15 |
16 | ///
17 | /// Logs an error.
18 | ///
19 | /// The error to log.
20 | void LogError(string error);
21 |
22 | ///
23 | /// Logs an exception.
24 | ///
25 | /// The exception to log.
26 | void LogException(Exception exception);
27 | }
28 | }
--------------------------------------------------------------------------------
/OdinSerializer/Core/Misc/ILogger.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 06038c8617a6f155f016443d25c27aa2
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {instanceID: 0}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/OdinSerializer/Core/Misc/ISelfFormatter.cs:
--------------------------------------------------------------------------------
1 | //-----------------------------------------------------------------------
2 | //
3 | // Copyright (c) 2018 Sirenix IVS
4 | //
5 | // Licensed under the Apache License, Version 2.0 (the "License");
6 | // you may not use this file except in compliance with the License.
7 | // You may obtain a copy of the License at
8 | //
9 | // http://www.apache.org/licenses/LICENSE-2.0
10 | //
11 | // Unless required by applicable law or agreed to in writing, software
12 | // distributed under the License is distributed on an "AS IS" BASIS,
13 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 | // See the License for the specific language governing permissions and
15 | // limitations under the License.
16 | //
17 | //-----------------------------------------------------------------------
18 | namespace ToolBox.Serialization.OdinSerializer
19 | {
20 | ///
21 | /// Specifies that a type is capable of serializing itself using an and an
22 | /// .
23 | ///
24 | /// The deserialized type instance will be created without a constructor call using the
25 | ///
26 | /// method if it is a reference type, otherwise it will be created using default(type).
27 | ///
28 | /// Use to specify that a class which implements this
29 | /// interface should *always* format itself regardless of other formatters being specified.
30 | ///
31 | public interface ISelfFormatter
32 | {
33 | ///
34 | /// Serializes the instance's data using the given writer.
35 | ///
36 | void Serialize(IDataWriter writer);
37 |
38 | ///
39 | /// Deserializes data into the instance using the given reader.
40 | ///
41 | void Deserialize(IDataReader reader);
42 | }
43 | }
--------------------------------------------------------------------------------
/OdinSerializer/Core/Misc/ISelfFormatter.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: f05c64a6babec6e94d438a5e259b302b
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {instanceID: 0}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/OdinSerializer/Core/Misc/ISerializationPolicy.cs:
--------------------------------------------------------------------------------
1 | //-----------------------------------------------------------------------
2 | //
3 | // Copyright (c) 2018 Sirenix IVS
4 | //
5 | // Licensed under the Apache License, Version 2.0 (the "License");
6 | // you may not use this file except in compliance with the License.
7 | // You may obtain a copy of the License at
8 | //
9 | // http://www.apache.org/licenses/LICENSE-2.0
10 | //
11 | // Unless required by applicable law or agreed to in writing, software
12 | // distributed under the License is distributed on an "AS IS" BASIS,
13 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 | // See the License for the specific language governing permissions and
15 | // limitations under the License.
16 | //
17 | //-----------------------------------------------------------------------
18 | namespace ToolBox.Serialization.OdinSerializer
19 | {
20 | using System.Reflection;
21 |
22 | ///
23 | /// Defines which members to serialize and deserialize when there aren't any custom formatters for a type.
24 | /// Usually, it governs the behaviour of the and classes.
25 | ///
26 | public interface ISerializationPolicy
27 | {
28 | ///
29 | /// Gets the identifier of the policy. This can be stored in the serialization metadata, so the policy used to serialize can be recovered upon deserialization without knowing the policy ahead of time. This ID should preferably be unique.
30 | ///
31 | ///
32 | /// The identifier of the policy.
33 | ///
34 | string ID { get; }
35 |
36 | ///
37 | /// Gets a value indicating whether to allow non serializable types. (Types which are not decorated with .)
38 | ///
39 | ///
40 | /// true if serializable types are allowed; otherwise, false.
41 | ///
42 | bool AllowNonSerializableTypes { get; }
43 |
44 | ///
45 | /// Gets a value indicating whether a given should be serialized or not.
46 | ///
47 | /// The member to check.
48 | /// true if the given member should be serialized, otherwise, false.
49 | bool ShouldSerializeMember(MemberInfo member);
50 | }
51 | }
--------------------------------------------------------------------------------
/OdinSerializer/Core/Misc/ISerializationPolicy.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: aa01448a764fca173f6d7cdbdd4ea039
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {instanceID: 0}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/OdinSerializer/Core/Misc/LoggingPolicy.cs:
--------------------------------------------------------------------------------
1 | namespace ToolBox.Serialization.OdinSerializer
2 | {
3 | ///
4 | /// The policy for which level of logging to do during serialization and deserialization.
5 | ///
6 | public enum LoggingPolicy
7 | {
8 | ///
9 | /// Log errors.
10 | ///
11 | LogErrors,
12 |
13 | ///
14 | /// Log both warnings and errors.
15 | ///
16 | LogWarningsAndErrors,
17 |
18 | ///
19 | /// Log nothing at all. Note: Some extremely severe categories of errors are logged regardless of this setting.
20 | ///
21 | Silent
22 | }
23 | }
--------------------------------------------------------------------------------
/OdinSerializer/Core/Misc/LoggingPolicy.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 8a8a0735b4663d78637ac10a17a4bd1f
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {instanceID: 0}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/OdinSerializer/Core/Misc/NodeInfo.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 6975a8f56e91b72d928a4091494035bb
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {instanceID: 0}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/OdinSerializer/Core/Misc/OdinSerializeAttribute.cs:
--------------------------------------------------------------------------------
1 | //-----------------------------------------------------------------------
2 | //
3 | // Copyright (c) 2018 Sirenix IVS
4 | //
5 | // Licensed under the Apache License, Version 2.0 (the "License");
6 | // you may not use this file except in compliance with the License.
7 | // You may obtain a copy of the License at
8 | //
9 | // http://www.apache.org/licenses/LICENSE-2.0
10 | //
11 | // Unless required by applicable law or agreed to in writing, software
12 | // distributed under the License is distributed on an "AS IS" BASIS,
13 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 | // See the License for the specific language governing permissions and
15 | // limitations under the License.
16 | //
17 | //-----------------------------------------------------------------------
18 |
19 | namespace ToolBox.Serialization.OdinSerializer
20 | {
21 | using System;
22 |
23 | ///
24 | /// Indicates that an instance field or auto-property should be serialized by Odin.
25 | ///
26 | ///
27 | [JetBrains.Annotations.MeansImplicitUse]
28 | [AttributeUsage(AttributeTargets.Field | AttributeTargets.Property)]
29 | public class OdinSerializeAttribute : Attribute
30 | {
31 | }
32 | }
--------------------------------------------------------------------------------
/OdinSerializer/Core/Misc/OdinSerializeAttribute.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 1fd1cd2b26ec720dde305bae8a352bf7
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {instanceID: 0}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/OdinSerializer/Core/Misc/PrefabModification.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: c55f71c23cef45e2025ba7cc04b93367
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {instanceID: 0}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/OdinSerializer/Core/Misc/PrefabModificationType.cs:
--------------------------------------------------------------------------------
1 | //-----------------------------------------------------------------------
2 | //
3 | // Copyright (c) 2018 Sirenix IVS
4 | //
5 | // Licensed under the Apache License, Version 2.0 (the "License");
6 | // you may not use this file except in compliance with the License.
7 | // You may obtain a copy of the License at
8 | //
9 | // http://www.apache.org/licenses/LICENSE-2.0
10 | //
11 | // Unless required by applicable law or agreed to in writing, software
12 | // distributed under the License is distributed on an "AS IS" BASIS,
13 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 | // See the License for the specific language governing permissions and
15 | // limitations under the License.
16 | //
17 | //-----------------------------------------------------------------------
18 | namespace ToolBox.Serialization.OdinSerializer
19 | {
20 | ///
21 | /// Types of prefab modification that can be applied.
22 | ///
23 | public enum PrefabModificationType
24 | {
25 | ///
26 | /// A value has been changed at a given path.
27 | ///
28 | Value,
29 |
30 | ///
31 | /// A list length has been changed at a given path.
32 | ///
33 | ListLength,
34 |
35 | ///
36 | /// A dictionary has been changed at a given path.
37 | ///
38 | Dictionary
39 | }
40 | }
--------------------------------------------------------------------------------
/OdinSerializer/Core/Misc/PrefabModificationType.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 99a6fba3ad0fcee2bb8df4a07f40cfc3
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {instanceID: 0}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/OdinSerializer/Core/Misc/PreviouslySerializedAsAttribute.cs:
--------------------------------------------------------------------------------
1 | //-----------------------------------------------------------------------
2 | //
3 | // Copyright (c) 2018 Sirenix IVS
4 | //
5 | // Licensed under the Apache License, Version 2.0 (the "License");
6 | // you may not use this file except in compliance with the License.
7 | // You may obtain a copy of the License at
8 | //
9 | // http://www.apache.org/licenses/LICENSE-2.0
10 | //
11 | // Unless required by applicable law or agreed to in writing, software
12 | // distributed under the License is distributed on an "AS IS" BASIS,
13 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 | // See the License for the specific language governing permissions and
15 | // limitations under the License.
16 | //
17 | //-----------------------------------------------------------------------
18 | namespace ToolBox.Serialization.OdinSerializer
19 | {
20 | using System;
21 |
22 | ///
23 | /// Indicates that an instance field or auto-property was previously serialized with a different name, so that values serialized with the old name will be properly deserialized into this member.
24 | ///
25 | /// This does the same as Unity's FormerlySerializedAs attribute, except it can also be applied to properties.
26 | ///
27 | ///
28 | [AttributeUsage(AttributeTargets.Field | AttributeTargets.Property)]
29 | public class PreviouslySerializedAsAttribute : Attribute
30 | {
31 | ///
32 | /// The former name.
33 | ///
34 | public string Name { get; private set; }
35 |
36 | ///
37 | /// Initializes a new instance of the class.
38 | ///
39 | /// The former name.
40 | public PreviouslySerializedAsAttribute(string name)
41 | {
42 | this.Name = name;
43 | }
44 | }
45 | }
--------------------------------------------------------------------------------
/OdinSerializer/Core/Misc/PreviouslySerializedAsAttribute.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 7417ec884af3115038e6ee6326b93fd6
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {instanceID: 0}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/OdinSerializer/Core/Misc/ProperBitConverter.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 41468d0d936668071e9c398d53a1d3ed
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {instanceID: 0}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/OdinSerializer/Core/Misc/RegisterFormatterAttribute.cs:
--------------------------------------------------------------------------------
1 | //-----------------------------------------------------------------------
2 | //
3 | // Copyright (c) 2018 Sirenix IVS
4 | //
5 | // Licensed under the Apache License, Version 2.0 (the "License");
6 | // you may not use this file except in compliance with the License.
7 | // You may obtain a copy of the License at
8 | //
9 | // http://www.apache.org/licenses/LICENSE-2.0
10 | //
11 | // Unless required by applicable law or agreed to in writing, software
12 | // distributed under the License is distributed on an "AS IS" BASIS,
13 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 | // See the License for the specific language governing permissions and
15 | // limitations under the License.
16 | //
17 | //-----------------------------------------------------------------------
18 |
19 | namespace ToolBox.Serialization.OdinSerializer
20 | {
21 | using System;
22 |
23 | [AttributeUsage(AttributeTargets.Assembly, AllowMultiple = true)]
24 | public class RegisterFormatterAttribute : Attribute
25 | {
26 | public Type FormatterType { get; private set; }
27 | public Type WeakFallback { get; private set; }
28 | public int Priority { get; private set; }
29 |
30 | public RegisterFormatterAttribute(Type formatterType, int priority = 0)
31 | {
32 | this.FormatterType = formatterType;
33 | this.Priority = priority;
34 | }
35 |
36 | public RegisterFormatterAttribute(Type formatterType, Type weakFallback, int priority = 0)
37 | {
38 | this.FormatterType = formatterType;
39 | this.WeakFallback = weakFallback;
40 | this.Priority = priority;
41 | }
42 | }
43 | }
--------------------------------------------------------------------------------
/OdinSerializer/Core/Misc/RegisterFormatterAttribute.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 92a9394fb735645f2647d04baaceeade
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {instanceID: 0}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/OdinSerializer/Core/Misc/RegisterFormatterLocatorAttribute.cs:
--------------------------------------------------------------------------------
1 | //-----------------------------------------------------------------------
2 | //
3 | // Copyright (c) 2018 Sirenix IVS
4 | //
5 | // Licensed under the Apache License, Version 2.0 (the "License");
6 | // you may not use this file except in compliance with the License.
7 | // You may obtain a copy of the License at
8 | //
9 | // http://www.apache.org/licenses/LICENSE-2.0
10 | //
11 | // Unless required by applicable law or agreed to in writing, software
12 | // distributed under the License is distributed on an "AS IS" BASIS,
13 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 | // See the License for the specific language governing permissions and
15 | // limitations under the License.
16 | //
17 | //-----------------------------------------------------------------------
18 |
19 | namespace ToolBox.Serialization.OdinSerializer
20 | {
21 | using System;
22 |
23 | [AttributeUsage(AttributeTargets.Assembly, AllowMultiple = true)]
24 | public class RegisterFormatterLocatorAttribute : Attribute
25 | {
26 | public Type FormatterLocatorType { get; private set; }
27 | public int Priority { get; private set; }
28 |
29 | public RegisterFormatterLocatorAttribute(Type formatterLocatorType, int priority = 0)
30 | {
31 | this.FormatterLocatorType = formatterLocatorType;
32 | this.Priority = priority;
33 | }
34 | }
35 | }
--------------------------------------------------------------------------------
/OdinSerializer/Core/Misc/RegisterFormatterLocatorAttribute.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 986d976f88440fe556da0c188ba12006
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {instanceID: 0}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/OdinSerializer/Core/Misc/SerializationAbortException.cs:
--------------------------------------------------------------------------------
1 | //-----------------------------------------------------------------------
2 | //
3 | // Copyright (c) 2018 Sirenix IVS
4 | //
5 | // Licensed under the Apache License, Version 2.0 (the "License");
6 | // you may not use this file except in compliance with the License.
7 | // You may obtain a copy of the License at
8 | //
9 | // http://www.apache.org/licenses/LICENSE-2.0
10 | //
11 | // Unless required by applicable law or agreed to in writing, software
12 | // distributed under the License is distributed on an "AS IS" BASIS,
13 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 | // See the License for the specific language governing permissions and
15 | // limitations under the License.
16 | //
17 | //-----------------------------------------------------------------------
18 |
19 | namespace ToolBox.Serialization.OdinSerializer
20 | {
21 | using System;
22 |
23 | ///
24 | /// An exception thrown when the serialization system has encountered an issue so severe that serialization is being aborted. If this exception is caught in the serialization system somewhere, it should be rethrown.
25 | ///
26 | public class SerializationAbortException : Exception
27 | {
28 | ///
29 | /// Initializes a new instance of the class.
30 | ///
31 | /// The message.
32 | public SerializationAbortException(string message)
33 | : base(message)
34 | {
35 | }
36 |
37 | ///
38 | /// Initializes a new instance of the class.
39 | ///
40 | /// The message.
41 | /// The inner exception.
42 | public SerializationAbortException(string message, Exception innerException)
43 | : base(message, innerException)
44 | {
45 | }
46 | }
47 | }
--------------------------------------------------------------------------------
/OdinSerializer/Core/Misc/SerializationAbortException.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: b6aa07a8b398138807e545d2f7ab800e
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {instanceID: 0}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/OdinSerializer/Core/Misc/SerializationConfig.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 96122c4f7993fced95c9a0eb25c8048f
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {instanceID: 0}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/OdinSerializer/Core/Misc/SerializationContext.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 2640ed6582586886dfafdd912bfaf623
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {instanceID: 0}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/OdinSerializer/Core/Misc/SerializationPolicies.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: fecea0c87b04d53b7b002e9ceb7bb94d
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {instanceID: 0}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/OdinSerializer/Core/Misc/SerializationUtility.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 691515254000c4d40fd358b0d47ce617
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {instanceID: 0}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/OdinSerializer/Core/Misc/TwoWaySerializationBinder.cs:
--------------------------------------------------------------------------------
1 | //-----------------------------------------------------------------------
2 | //
3 | // Copyright (c) 2018 Sirenix IVS
4 | //
5 | // Licensed under the Apache License, Version 2.0 (the "License");
6 | // you may not use this file except in compliance with the License.
7 | // You may obtain a copy of the License at
8 | //
9 | // http://www.apache.org/licenses/LICENSE-2.0
10 | //
11 | // Unless required by applicable law or agreed to in writing, software
12 | // distributed under the License is distributed on an "AS IS" BASIS,
13 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 | // See the License for the specific language governing permissions and
15 | // limitations under the License.
16 | //
17 | //-----------------------------------------------------------------------
18 |
19 | namespace ToolBox.Serialization.OdinSerializer
20 | {
21 | using System;
22 |
23 | ///
24 | /// Binds types to strings during serialization, and strings to types during deserialization.
25 | ///
26 | public abstract class TwoWaySerializationBinder
27 | {
28 | ///
29 | /// Provides a default, catch-all implementation. This binder only includes assembly names, without versions and tokens, in order to increase compatibility.
30 | ///
31 | public static readonly TwoWaySerializationBinder Default = new DefaultSerializationBinder();
32 |
33 | ///
34 | /// Bind a type to a name.
35 | ///
36 | /// The type to bind.
37 | /// The debug context to log to.
38 | /// The name that the type has been bound to.
39 | public abstract string BindToName(Type type, DebugContext debugContext = null);
40 |
41 | ///
42 | /// Binds a name to a type.
43 | ///
44 | /// The name of the type to bind.
45 | /// The debug context to log to.
46 | /// The type that the name has been bound to, or null if the type could not be resolved.
47 | public abstract Type BindToType(string typeName, DebugContext debugContext = null);
48 |
49 | ///
50 | /// Determines whether the specified type name is mapped.
51 | ///
52 | public abstract bool ContainsType(string typeName);
53 | }
54 | }
--------------------------------------------------------------------------------
/OdinSerializer/Core/Misc/TwoWaySerializationBinder.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 876239bc947153f9fb3f6f295b403e11
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {instanceID: 0}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/OdinSerializer/Core/Serializers.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: ffea1b4eb36828649bd7bab90fadfd61
3 | folderAsset: yes
4 | DefaultImporter:
5 | externalObjects: {}
6 | userData:
7 | assetBundleName:
8 | assetBundleVariant:
9 |
--------------------------------------------------------------------------------
/OdinSerializer/Core/Serializers/AnySerializer.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: c6bed9136de1d41404e2805076a6123e
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {instanceID: 0}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/OdinSerializer/Core/Serializers/BooleanSerializer.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: da54a32f46cb6a94807727bfad26d03c
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {instanceID: 0}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/OdinSerializer/Core/Serializers/ByteSerializer.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 14c459857207efb7bff9144d42a34aa7
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {instanceID: 0}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/OdinSerializer/Core/Serializers/CharSerializer.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: d4b6cc142a5092cd1572e0f8b6295255
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {instanceID: 0}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/OdinSerializer/Core/Serializers/ComplexTypeSerializer.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: de41099f7e2e7102b4b8ff914f4a5e1d
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {instanceID: 0}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/OdinSerializer/Core/Serializers/DecimalSerializer.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 0ac4bd8acd129554a336cfdb43be88b0
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {instanceID: 0}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/OdinSerializer/Core/Serializers/DoubleSerializer.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: c824250f4d18529b60f17da851ee5765
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {instanceID: 0}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/OdinSerializer/Core/Serializers/EnumSerializer.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: e8aa735637b359809ded6300cd57b273
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {instanceID: 0}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/OdinSerializer/Core/Serializers/GuidSerializer.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 6e14e8e30890c80a18a2607fc624ebf3
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {instanceID: 0}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/OdinSerializer/Core/Serializers/Int16Serializer.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: d23f096fae05e8120df6a1a4309e0b89
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {instanceID: 0}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/OdinSerializer/Core/Serializers/Int32Serializer.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 478dfe3520d49952a739723535283079
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {instanceID: 0}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/OdinSerializer/Core/Serializers/Int64Serializer.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 4a97a4504f17d76bbe5554325d1fd04e
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {instanceID: 0}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/OdinSerializer/Core/Serializers/IntPtrSerializer.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 0152dd2d52ac583a208a1fcc8eb6c9cd
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {instanceID: 0}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/OdinSerializer/Core/Serializers/SByteSerializer.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: a4710e0c6fbd02229ab534bff39ec8fb
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {instanceID: 0}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/OdinSerializer/Core/Serializers/Serializer.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 65177bbbab19830232e62349c0a4f264
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {instanceID: 0}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/OdinSerializer/Core/Serializers/SingleSerializer.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: b198138f3178994bb001be2054f741d3
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {instanceID: 0}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/OdinSerializer/Core/Serializers/StringSerializer.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 609395ff1250db4f6e26dfa27316bcf6
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {instanceID: 0}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/OdinSerializer/Core/Serializers/UInt16Serializer.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: a000b0f2af1b880edf2eeac0077d432c
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {instanceID: 0}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/OdinSerializer/Core/Serializers/UInt32Serializer.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: dc76558a33bcad24ed7ee3e22783acab
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {instanceID: 0}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/OdinSerializer/Core/Serializers/UInt64Serializer.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: efd4c8dcc2006088b5ca44d1ded160a3
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {instanceID: 0}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/OdinSerializer/Core/Serializers/UIntPtrSerializer.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 90ad7cb69e9f2a9a216e7aafed746fc4
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {instanceID: 0}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/OdinSerializer/LICENSE.meta:
--------------------------------------------------------------------------------
1 |
2 | fileFormatVersion: 2
3 | guid: e33861c0a72b1abb7ce6222ea5e11c84
4 | TextScriptImporter:
5 | userData:
6 | assetBundleName:
7 | assetBundleVariant:
8 |
--------------------------------------------------------------------------------
/OdinSerializer/ToolBox.Serialization.OdinSerializer.asmdef:
--------------------------------------------------------------------------------
1 | {
2 | "name": "ToolBox.Serialization.OdinSerializer",
3 | "references": [],
4 | "includePlatforms": [],
5 | "excludePlatforms": [],
6 | "allowUnsafeCode": true,
7 | "overrideReferences": false,
8 | "precompiledReferences": [],
9 | "autoReferenced": true,
10 | "defineConstraints": [],
11 | "versionDefines": []
12 | }
--------------------------------------------------------------------------------
/OdinSerializer/ToolBox.Serialization.OdinSerializer.asmdef.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 7d491a4487b0aa01ed511252ac3c660f
3 | folderAsset: yes
4 | DefaultImporter:
5 | externalObjects: {}
6 | userData:
7 | assetBundleName:
8 | assetBundleVariant:
9 |
--------------------------------------------------------------------------------
/OdinSerializer/Unity Integration.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 359f07f841517fe40a411a54bec3a570
3 | folderAsset: yes
4 | DefaultImporter:
5 | externalObjects: {}
6 | userData:
7 | assetBundleName:
8 | assetBundleVariant:
9 |
--------------------------------------------------------------------------------
/OdinSerializer/Unity Integration/AOTSupportScanner.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 3b5751cd2cace309d31c36f4cf8381b1
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {instanceID: 0}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/OdinSerializer/Unity Integration/AOTSupportUtilities.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 10a7f775c3097c63ad191f00fee90081
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {instanceID: 0}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/OdinSerializer/Unity Integration/DictionaryKeySupport.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 5aec1b81ad6ff0646ba4cf79052b96b3
3 | folderAsset: yes
4 | DefaultImporter:
5 | externalObjects: {}
6 | userData:
7 | assetBundleName:
8 | assetBundleVariant:
9 |
--------------------------------------------------------------------------------
/OdinSerializer/Unity Integration/DictionaryKeySupport/BaseDictionaryKeyPathProvider.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 207f2c5a18fd2d80e5b51153a05dba11
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {instanceID: 0}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/OdinSerializer/Unity Integration/DictionaryKeySupport/DictionaryKeyUtility.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 427cadbc2df6eb140316955a4a6771be
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {instanceID: 0}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/OdinSerializer/Unity Integration/DictionaryKeySupport/IDictionaryKeyPathProvider.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 8cd85f7704cc5ef7fbca96516a58ff4b
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {instanceID: 0}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/OdinSerializer/Unity Integration/DictionaryKeySupport/RegisterDictionaryKeyPathProviderAttribute.cs:
--------------------------------------------------------------------------------
1 | //-----------------------------------------------------------------------
2 | //
3 | // Copyright (c) 2018 Sirenix IVS
4 | //
5 | // Licensed under the Apache License, Version 2.0 (the "License");
6 | // you may not use this file except in compliance with the License.
7 | // You may obtain a copy of the License at
8 | //
9 | // http://www.apache.org/licenses/LICENSE-2.0
10 | //
11 | // Unless required by applicable law or agreed to in writing, software
12 | // distributed under the License is distributed on an "AS IS" BASIS,
13 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 | // See the License for the specific language governing permissions and
15 | // limitations under the License.
16 | //
17 | //-----------------------------------------------------------------------
18 |
19 | namespace ToolBox.Serialization.OdinSerializer
20 | {
21 | using System;
22 |
23 | [AttributeUsage(AttributeTargets.Assembly, AllowMultiple = true)]
24 | public sealed class RegisterDictionaryKeyPathProviderAttribute : Attribute
25 | {
26 | public readonly Type ProviderType;
27 |
28 | public RegisterDictionaryKeyPathProviderAttribute(Type providerType)
29 | {
30 | this.ProviderType = providerType;
31 | }
32 | }
33 | }
--------------------------------------------------------------------------------
/OdinSerializer/Unity Integration/DictionaryKeySupport/RegisterDictionaryKeyPathProviderAttribute.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 4e57d433fafc1696dcb4305764d5bdd0
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {instanceID: 0}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/OdinSerializer/Unity Integration/DictionaryKeySupport/Vector2DictionaryKeyPathProvider.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 5e6cb2beb47f62cf7a7fa7033b4ceda4
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {instanceID: 0}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/OdinSerializer/Unity Integration/DictionaryKeySupport/Vector3DictionaryKeyPathProvider.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 0337ebeee1d7362a39ada17a5c89d4d1
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {instanceID: 0}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/OdinSerializer/Unity Integration/DictionaryKeySupport/Vector4DictionaryKeyPathProvider.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 0b365bf9bfdbbb5739ad07b85686c04f
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {instanceID: 0}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/OdinSerializer/Unity Integration/Formatters.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: d8b79577d32e516458c57445ad17cf7d
3 | folderAsset: yes
4 | DefaultImporter:
5 | externalObjects: {}
6 | userData:
7 | assetBundleName:
8 | assetBundleVariant:
9 |
--------------------------------------------------------------------------------
/OdinSerializer/Unity Integration/Formatters/AnimationCurveFormatter.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 0c277d82db3e2a94f9460496be976c9f
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {instanceID: 0}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/OdinSerializer/Unity Integration/Formatters/BoundsFormatter.cs:
--------------------------------------------------------------------------------
1 | //-----------------------------------------------------------------------
2 | //
3 | // Copyright (c) 2018 Sirenix IVS
4 | //
5 | // Licensed under the Apache License, Version 2.0 (the "License");
6 | // you may not use this file except in compliance with the License.
7 | // You may obtain a copy of the License at
8 | //
9 | // http://www.apache.org/licenses/LICENSE-2.0
10 | //
11 | // Unless required by applicable law or agreed to in writing, software
12 | // distributed under the License is distributed on an "AS IS" BASIS,
13 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 | // See the License for the specific language governing permissions and
15 | // limitations under the License.
16 | //
17 | //-----------------------------------------------------------------------
18 |
19 | using ToolBox.Serialization.OdinSerializer;
20 |
21 | [assembly: RegisterFormatter(typeof(BoundsFormatter))]
22 |
23 | namespace ToolBox.Serialization.OdinSerializer
24 | {
25 | using UnityEngine;
26 |
27 | ///
28 | /// Custom formatter for the type.
29 | ///
30 | ///
31 | public class BoundsFormatter : MinimalBaseFormatter
32 | {
33 | private static readonly Serializer Vector3Serializer = Serializer.Get();
34 |
35 | ///
36 | /// Reads into the specified value using the specified reader.
37 | ///
38 | /// The value to read into.
39 | /// The reader to use.
40 | protected override void Read(ref Bounds value, IDataReader reader)
41 | {
42 | value.center = Vector3Serializer.ReadValue(reader);
43 | value.size = Vector3Serializer.ReadValue(reader);
44 | }
45 |
46 | ///
47 | /// Writes from the specified value using the specified writer.
48 | ///
49 | /// The value to write from.
50 | /// The writer to use.
51 | protected override void Write(ref Bounds value, IDataWriter writer)
52 | {
53 | Vector3Serializer.WriteValue(value.center, writer);
54 | Vector3Serializer.WriteValue(value.size, writer);
55 | }
56 | }
57 | }
--------------------------------------------------------------------------------
/OdinSerializer/Unity Integration/Formatters/BoundsFormatter.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: b48cbb7cde86285b1d5a2462c6151eee
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {instanceID: 0}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/OdinSerializer/Unity Integration/Formatters/Color32Formatter.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 8abbc7c3f0f6aa320d871cbf6f8937fd
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {instanceID: 0}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/OdinSerializer/Unity Integration/Formatters/ColorBlockFormatter.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 1378b87301b623527a63d358bd5efa1b
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {instanceID: 0}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/OdinSerializer/Unity Integration/Formatters/ColorFormatter.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: d019aa43f92e57e2dd7fd5c3df53a313
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {instanceID: 0}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/OdinSerializer/Unity Integration/Formatters/CoroutineFormatter.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: afdb8299eaea9910b3fc94197e4952dc
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {instanceID: 0}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/OdinSerializer/Unity Integration/Formatters/GradientAlphaKeyFormatter.cs:
--------------------------------------------------------------------------------
1 | //-----------------------------------------------------------------------
2 | //
3 | // Copyright (c) 2018 Sirenix IVS
4 | //
5 | // Licensed under the Apache License, Version 2.0 (the "License");
6 | // you may not use this file except in compliance with the License.
7 | // You may obtain a copy of the License at
8 | //
9 | // http://www.apache.org/licenses/LICENSE-2.0
10 | //
11 | // Unless required by applicable law or agreed to in writing, software
12 | // distributed under the License is distributed on an "AS IS" BASIS,
13 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 | // See the License for the specific language governing permissions and
15 | // limitations under the License.
16 | //
17 | //-----------------------------------------------------------------------
18 |
19 | using ToolBox.Serialization.OdinSerializer;
20 |
21 | [assembly: RegisterFormatter(typeof(GradientAlphaKeyFormatter))]
22 |
23 | namespace ToolBox.Serialization.OdinSerializer
24 | {
25 | using UnityEngine;
26 |
27 | ///
28 | /// Custom formatter for the type.
29 | ///
30 | ///
31 | public class GradientAlphaKeyFormatter : MinimalBaseFormatter
32 | {
33 | private static readonly Serializer FloatSerializer = Serializer.Get();
34 |
35 | ///
36 | /// Reads into the specified value using the specified reader.
37 | ///
38 | /// The value to read into.
39 | /// The reader to use.
40 | protected override void Read(ref GradientAlphaKey value, IDataReader reader)
41 | {
42 | value.alpha = GradientAlphaKeyFormatter.FloatSerializer.ReadValue(reader);
43 | value.time = GradientAlphaKeyFormatter.FloatSerializer.ReadValue(reader);
44 | }
45 |
46 | ///
47 | /// Writes from the specified value using the specified writer.
48 | ///
49 | /// The value to write from.
50 | /// The writer to use.
51 | protected override void Write(ref GradientAlphaKey value, IDataWriter writer)
52 | {
53 | GradientAlphaKeyFormatter.FloatSerializer.WriteValue(value.alpha, writer);
54 | GradientAlphaKeyFormatter.FloatSerializer.WriteValue(value.time, writer);
55 | }
56 | }
57 | }
--------------------------------------------------------------------------------
/OdinSerializer/Unity Integration/Formatters/GradientAlphaKeyFormatter.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 9587eca0e82f897b2abf22fc40cb1b53
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {instanceID: 0}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/OdinSerializer/Unity Integration/Formatters/GradientColorKeyFormatter.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 5145e6db343b1e8e8a573d046b2b9903
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {instanceID: 0}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/OdinSerializer/Unity Integration/Formatters/GradientFormatter.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: dfc4a1481540e307e2cbbb97d990fe1a
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {instanceID: 0}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/OdinSerializer/Unity Integration/Formatters/KeyframeFormatter.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: b68c1697295aa5d1f76e15070221a31e
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {instanceID: 0}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/OdinSerializer/Unity Integration/Formatters/LayerMaskFormatter.cs:
--------------------------------------------------------------------------------
1 | //-----------------------------------------------------------------------
2 | //
3 | // Copyright (c) 2018 Sirenix IVS
4 | //
5 | // Licensed under the Apache License, Version 2.0 (the "License");
6 | // you may not use this file except in compliance with the License.
7 | // You may obtain a copy of the License at
8 | //
9 | // http://www.apache.org/licenses/LICENSE-2.0
10 | //
11 | // Unless required by applicable law or agreed to in writing, software
12 | // distributed under the License is distributed on an "AS IS" BASIS,
13 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 | // See the License for the specific language governing permissions and
15 | // limitations under the License.
16 | //
17 | //-----------------------------------------------------------------------
18 |
19 | using ToolBox.Serialization.OdinSerializer;
20 |
21 | [assembly: RegisterFormatter(typeof(LayerMaskFormatter))]
22 |
23 | namespace ToolBox.Serialization.OdinSerializer
24 | {
25 | using UnityEngine;
26 |
27 | ///
28 | /// Custom formatter for the type.
29 | ///
30 | ///
31 | public class LayerMaskFormatter : MinimalBaseFormatter
32 | {
33 | private static readonly Serializer IntSerializer = Serializer.Get();
34 |
35 | ///
36 | /// Reads into the specified value using the specified reader.
37 | ///
38 | /// The value to read into.
39 | /// The reader to use.
40 | protected override void Read(ref LayerMask value, IDataReader reader)
41 | {
42 | value.value = LayerMaskFormatter.IntSerializer.ReadValue(reader);
43 | }
44 |
45 | ///
46 | /// Writes from the specified value using the specified writer.
47 | ///
48 | /// The value to write from.
49 | /// The writer to use.
50 | protected override void Write(ref LayerMask value, IDataWriter writer)
51 | {
52 | LayerMaskFormatter.IntSerializer.WriteValue(value.value, writer);
53 | }
54 | }
55 | }
--------------------------------------------------------------------------------
/OdinSerializer/Unity Integration/Formatters/LayerMaskFormatter.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: f56031c384ded2f9ff85885b66146788
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {instanceID: 0}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/OdinSerializer/Unity Integration/Formatters/QuaternionFormatter.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 90777e1a519dd5fe64c46a0798f7b468
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {instanceID: 0}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/OdinSerializer/Unity Integration/Formatters/RectFormatter.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 72168b0ed2e29ca3c1daaa6e964e81d7
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {instanceID: 0}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/OdinSerializer/Unity Integration/Formatters/UnityEventFormatter.cs:
--------------------------------------------------------------------------------
1 | //-----------------------------------------------------------------------
2 | //
3 | // Copyright (c) 2018 Sirenix IVS
4 | //
5 | // Licensed under the Apache License, Version 2.0 (the "License");
6 | // you may not use this file except in compliance with the License.
7 | // You may obtain a copy of the License at
8 | //
9 | // http://www.apache.org/licenses/LICENSE-2.0
10 | //
11 | // Unless required by applicable law or agreed to in writing, software
12 | // distributed under the License is distributed on an "AS IS" BASIS,
13 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 | // See the License for the specific language governing permissions and
15 | // limitations under the License.
16 | //
17 | //-----------------------------------------------------------------------
18 |
19 | using ToolBox.Serialization.OdinSerializer;
20 |
21 | [assembly: RegisterFormatter(typeof(UnityEventFormatter<>), weakFallback: typeof(WeakUnityEventFormatter))]
22 |
23 | namespace ToolBox.Serialization.OdinSerializer
24 | {
25 | using System;
26 | using UnityEngine.Events;
27 |
28 | ///
29 | /// Custom generic formatter for the , , and types.
30 | ///
31 | /// The type of UnityEvent that this formatter can serialize and deserialize.
32 | ///
33 | public class UnityEventFormatter : ReflectionFormatter where T : UnityEventBase, new()
34 | {
35 | ///
36 | /// Get an uninitialized object of type .
37 | ///
38 | ///
39 | /// An uninitialized object of type .
40 | ///
41 | protected override T GetUninitializedObject()
42 | {
43 | return new T();
44 | }
45 | }
46 |
47 | public class WeakUnityEventFormatter : WeakReflectionFormatter
48 | {
49 | public WeakUnityEventFormatter(Type serializedType) : base(serializedType)
50 | {
51 | }
52 |
53 | protected override object GetUninitializedObject()
54 | {
55 | return Activator.CreateInstance(this.SerializedType);
56 | }
57 | }
58 | }
--------------------------------------------------------------------------------
/OdinSerializer/Unity Integration/Formatters/UnityEventFormatter.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: f27ad5e4ade7272dc06837c01e86767f
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {instanceID: 0}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/OdinSerializer/Unity Integration/Formatters/Vector2Formatter.cs:
--------------------------------------------------------------------------------
1 | //-----------------------------------------------------------------------
2 | //
3 | // Copyright (c) 2018 Sirenix IVS
4 | //
5 | // Licensed under the Apache License, Version 2.0 (the "License");
6 | // you may not use this file except in compliance with the License.
7 | // You may obtain a copy of the License at
8 | //
9 | // http://www.apache.org/licenses/LICENSE-2.0
10 | //
11 | // Unless required by applicable law or agreed to in writing, software
12 | // distributed under the License is distributed on an "AS IS" BASIS,
13 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 | // See the License for the specific language governing permissions and
15 | // limitations under the License.
16 | //
17 | //-----------------------------------------------------------------------
18 |
19 | using ToolBox.Serialization.OdinSerializer;
20 |
21 | [assembly: RegisterFormatter(typeof(Vector2Formatter))]
22 |
23 | namespace ToolBox.Serialization.OdinSerializer
24 | {
25 | using UnityEngine;
26 |
27 | ///
28 | /// Custom formatter for the type.
29 | ///
30 | ///
31 | public class Vector2Formatter : MinimalBaseFormatter
32 | {
33 | private static readonly Serializer FloatSerializer = Serializer.Get();
34 |
35 | ///
36 | /// Reads into the specified value using the specified reader.
37 | ///
38 | /// The value to read into.
39 | /// The reader to use.
40 | protected override void Read(ref Vector2 value, IDataReader reader)
41 | {
42 | value.x = Vector2Formatter.FloatSerializer.ReadValue(reader);
43 | value.y = Vector2Formatter.FloatSerializer.ReadValue(reader);
44 | }
45 |
46 | ///
47 | /// Writes from the specified value using the specified writer.
48 | ///
49 | /// The value to write from.
50 | /// The writer to use.
51 | protected override void Write(ref Vector2 value, IDataWriter writer)
52 | {
53 | Vector2Formatter.FloatSerializer.WriteValue(value.x, writer);
54 | Vector2Formatter.FloatSerializer.WriteValue(value.y, writer);
55 | }
56 | }
57 | }
--------------------------------------------------------------------------------
/OdinSerializer/Unity Integration/Formatters/Vector2Formatter.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: efd10f5305244f939f44885ab187a749
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {instanceID: 0}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/OdinSerializer/Unity Integration/Formatters/Vector3Formatter.cs:
--------------------------------------------------------------------------------
1 | //-----------------------------------------------------------------------
2 | //
3 | // Copyright (c) 2018 Sirenix IVS
4 | //
5 | // Licensed under the Apache License, Version 2.0 (the "License");
6 | // you may not use this file except in compliance with the License.
7 | // You may obtain a copy of the License at
8 | //
9 | // http://www.apache.org/licenses/LICENSE-2.0
10 | //
11 | // Unless required by applicable law or agreed to in writing, software
12 | // distributed under the License is distributed on an "AS IS" BASIS,
13 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 | // See the License for the specific language governing permissions and
15 | // limitations under the License.
16 | //
17 | //-----------------------------------------------------------------------
18 |
19 | using ToolBox.Serialization.OdinSerializer;
20 |
21 | [assembly: RegisterFormatter(typeof(Vector3Formatter))]
22 |
23 | namespace ToolBox.Serialization.OdinSerializer
24 | {
25 | using UnityEngine;
26 |
27 | ///
28 | /// Custom formatter for the type.
29 | ///
30 | ///
31 | public class Vector3Formatter : MinimalBaseFormatter
32 | {
33 | private static readonly Serializer FloatSerializer = Serializer.Get();
34 |
35 | ///
36 | /// Reads into the specified value using the specified reader.
37 | ///
38 | /// The value to read into.
39 | /// The reader to use.
40 | protected override void Read(ref Vector3 value, IDataReader reader)
41 | {
42 | value.x = Vector3Formatter.FloatSerializer.ReadValue(reader);
43 | value.y = Vector3Formatter.FloatSerializer.ReadValue(reader);
44 | value.z = Vector3Formatter.FloatSerializer.ReadValue(reader);
45 | }
46 |
47 | ///
48 | /// Writes from the specified value using the specified writer.
49 | ///
50 | /// The value to write from.
51 | /// The writer to use.
52 | protected override void Write(ref Vector3 value, IDataWriter writer)
53 | {
54 | Vector3Formatter.FloatSerializer.WriteValue(value.x, writer);
55 | Vector3Formatter.FloatSerializer.WriteValue(value.y, writer);
56 | Vector3Formatter.FloatSerializer.WriteValue(value.z, writer);
57 | }
58 | }
59 | }
--------------------------------------------------------------------------------
/OdinSerializer/Unity Integration/Formatters/Vector3Formatter.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 0f334ffedc877c28d6833250d82bacc9
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {instanceID: 0}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/OdinSerializer/Unity Integration/Formatters/Vector4Formatter.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: d60e1c548ce1b3e3606d9487e9d843ad
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {instanceID: 0}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/OdinSerializer/Unity Integration/Formatters/VectorIntFormatters.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: e5e74fd92dc5c333477f424d781e45ce
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {instanceID: 0}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/OdinSerializer/Unity Integration/OdinPrefabSerializationEditorUtility.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 9915924b7b5626acc071ff7b07f1699d
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {instanceID: 0}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/OdinSerializer/Unity Integration/SerializedUnityObjects.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: f3c4d207b4cc00b4489ce81ce584b03b
3 | folderAsset: yes
4 | DefaultImporter:
5 | externalObjects: {}
6 | userData:
7 | assetBundleName:
8 | assetBundleVariant:
9 |
--------------------------------------------------------------------------------
/OdinSerializer/Unity Integration/SerializedUnityObjects/IOverridesSerializationFormat.cs:
--------------------------------------------------------------------------------
1 | //-----------------------------------------------------------------------
2 | //
3 | // Copyright (c) 2018 Sirenix IVS
4 | //
5 | // Licensed under the Apache License, Version 2.0 (the "License");
6 | // you may not use this file except in compliance with the License.
7 | // You may obtain a copy of the License at
8 | //
9 | // http://www.apache.org/licenses/LICENSE-2.0
10 | //
11 | // Unless required by applicable law or agreed to in writing, software
12 | // distributed under the License is distributed on an "AS IS" BASIS,
13 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 | // See the License for the specific language governing permissions and
15 | // limitations under the License.
16 | //
17 | //-----------------------------------------------------------------------
18 |
19 | namespace ToolBox.Serialization.OdinSerializer
20 | {
21 | ///
22 | /// Indicates that an Odin-serialized Unity object controls its own serialization format. Every time it is serialized, it will be asked which format to use.
23 | ///
24 | public interface IOverridesSerializationFormat
25 | {
26 | ///
27 | /// Gets the format to use for serialization.
28 | ///
29 | DataFormat GetFormatToSerializeAs(bool isPlayer);
30 | }
31 | }
--------------------------------------------------------------------------------
/OdinSerializer/Unity Integration/SerializedUnityObjects/IOverridesSerializationFormat.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: d37dc2065185fcadd6c6e72a21e001e9
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {instanceID: 0}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/OdinSerializer/Unity Integration/SerializedUnityObjects/IOverridesSerializationPolicy.cs:
--------------------------------------------------------------------------------
1 | //-----------------------------------------------------------------------
2 | //
3 | // Copyright (c) 2018 Sirenix IVS
4 | //
5 | // Licensed under the Apache License, Version 2.0 (the "License");
6 | // you may not use this file except in compliance with the License.
7 | // You may obtain a copy of the License at
8 | //
9 | // http://www.apache.org/licenses/LICENSE-2.0
10 | //
11 | // Unless required by applicable law or agreed to in writing, software
12 | // distributed under the License is distributed on an "AS IS" BASIS,
13 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 | // See the License for the specific language governing permissions and
15 | // limitations under the License.
16 | //
17 | //-----------------------------------------------------------------------
18 |
19 | namespace ToolBox.Serialization.OdinSerializer
20 | {
21 | ///
22 | /// Indicates that an Odin-serialized Unity object provides its own serialization policy rather than using the default policy.
23 | ///
24 | /// Note that THE VALUES RETURNED BY THIS INTERFACE WILL OVERRIDE THE PARAMETERS PASSED TO and .
25 | ///
26 | public interface IOverridesSerializationPolicy
27 | {
28 | ISerializationPolicy SerializationPolicy { get; }
29 | bool OdinSerializesUnityFields { get; }
30 | }
31 | }
--------------------------------------------------------------------------------
/OdinSerializer/Unity Integration/SerializedUnityObjects/IOverridesSerializationPolicy.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: c54b1ef6379381291203c400e524d66c
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {instanceID: 0}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/OdinSerializer/Unity Integration/SerializedUnityObjects/ISupportsPrefabSerialization.cs:
--------------------------------------------------------------------------------
1 | //-----------------------------------------------------------------------
2 | //
3 | // Copyright (c) 2018 Sirenix IVS
4 | //
5 | // Licensed under the Apache License, Version 2.0 (the "License");
6 | // you may not use this file except in compliance with the License.
7 | // You may obtain a copy of the License at
8 | //
9 | // http://www.apache.org/licenses/LICENSE-2.0
10 | //
11 | // Unless required by applicable law or agreed to in writing, software
12 | // distributed under the License is distributed on an "AS IS" BASIS,
13 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 | // See the License for the specific language governing permissions and
15 | // limitations under the License.
16 | //
17 | //-----------------------------------------------------------------------
18 |
19 | namespace ToolBox.Serialization.OdinSerializer
20 | {
21 | ///
22 | /// Indicates that an Odin-serialized Unity object supports prefab serialization.
23 | ///
24 | public interface ISupportsPrefabSerialization
25 | {
26 | ///
27 | /// Gets or sets the serialization data of the object.
28 | ///
29 | SerializationData SerializationData { get; set; }
30 | }
31 | }
--------------------------------------------------------------------------------
/OdinSerializer/Unity Integration/SerializedUnityObjects/ISupportsPrefabSerialization.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: dd3cb3c67dd21d861a2a2c023264770f
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {instanceID: 0}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/OdinSerializer/Unity Integration/SerializedUnityObjects/SerializationData.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: be36d5233767bfb4dc04af70fd98a024
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {instanceID: 0}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/OdinSerializer/Unity Integration/SerializedUnityObjects/SerializedBehaviour.cs:
--------------------------------------------------------------------------------
1 | //-----------------------------------------------------------------------
2 | //
3 | // Copyright (c) 2018 Sirenix IVS
4 | //
5 | // Licensed under the Apache License, Version 2.0 (the "License");
6 | // you may not use this file except in compliance with the License.
7 | // You may obtain a copy of the License at
8 | //
9 | // http://www.apache.org/licenses/LICENSE-2.0
10 | //
11 | // Unless required by applicable law or agreed to in writing, software
12 | // distributed under the License is distributed on an "AS IS" BASIS,
13 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 | // See the License for the specific language governing permissions and
15 | // limitations under the License.
16 | //
17 | //-----------------------------------------------------------------------
18 |
19 | namespace ToolBox.Serialization.OdinSerializer
20 | {
21 | using Utilities;
22 | using UnityEngine;
23 |
24 | ///
25 | /// A Unity Behaviour which is serialized by the Sirenix serialization system.
26 | ///
27 | #if ODIN_INSPECTOR
28 | [Sirenix.OdinInspector.ShowOdinSerializedPropertiesInInspector]
29 | #endif
30 |
31 | public abstract class SerializedBehaviour : Behaviour, ISerializationCallbackReceiver, ISupportsPrefabSerialization
32 | {
33 | [SerializeField, HideInInspector]
34 | private SerializationData serializationData;
35 |
36 | SerializationData ISupportsPrefabSerialization.SerializationData { get { return this.serializationData; } set { this.serializationData = value; } }
37 |
38 | void ISerializationCallbackReceiver.OnAfterDeserialize()
39 | {
40 | if (this.SafeIsUnityNull()) return;
41 | UnitySerializationUtility.DeserializeUnityObject(this, ref this.serializationData);
42 | this.OnAfterDeserialize();
43 | }
44 |
45 | void ISerializationCallbackReceiver.OnBeforeSerialize()
46 | {
47 | if (this.SafeIsUnityNull()) return;
48 | this.OnBeforeSerialize();
49 | UnitySerializationUtility.SerializeUnityObject(this, ref this.serializationData);
50 | }
51 |
52 | ///
53 | /// Invoked after deserialization has taken place.
54 | ///
55 | protected virtual void OnAfterDeserialize()
56 | {
57 | }
58 |
59 | ///
60 | /// Invoked before serialization has taken place.
61 | ///
62 | protected virtual void OnBeforeSerialize()
63 | {
64 | }
65 | }
66 | }
67 |
--------------------------------------------------------------------------------
/OdinSerializer/Unity Integration/SerializedUnityObjects/SerializedBehaviour.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: a902b5479461951c2dd460ab7c1e45aa
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {instanceID: 0}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/OdinSerializer/Unity Integration/SerializedUnityObjects/SerializedComponent.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 5e55ba2b5c6bf139d05d4bd70aa8741c
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {instanceID: 0}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/OdinSerializer/Unity Integration/SerializedUnityObjects/SerializedMonoBehaviour.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 5c70e9eb0defaeba6b4221271db404e8
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {instanceID: 0}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/OdinSerializer/Unity Integration/SerializedUnityObjects/SerializedScriptableObject.cs:
--------------------------------------------------------------------------------
1 | //-----------------------------------------------------------------------
2 | //
3 | // Copyright (c) 2018 Sirenix IVS
4 | //
5 | // Licensed under the Apache License, Version 2.0 (the "License");
6 | // you may not use this file except in compliance with the License.
7 | // You may obtain a copy of the License at
8 | //
9 | // http://www.apache.org/licenses/LICENSE-2.0
10 | //
11 | // Unless required by applicable law or agreed to in writing, software
12 | // distributed under the License is distributed on an "AS IS" BASIS,
13 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 | // See the License for the specific language governing permissions and
15 | // limitations under the License.
16 | //
17 | //-----------------------------------------------------------------------
18 |
19 | namespace ToolBox.Serialization.OdinSerializer
20 | {
21 | using Utilities;
22 | using UnityEngine;
23 |
24 | ///
25 | /// A Unity ScriptableObject which is serialized by the Sirenix serialization system.
26 | ///
27 | #if ODIN_INSPECTOR
28 | [Sirenix.OdinInspector.ShowOdinSerializedPropertiesInInspector]
29 | #endif
30 |
31 | public abstract class SerializedScriptableObject : ScriptableObject, ISerializationCallbackReceiver
32 | {
33 | [SerializeField, HideInInspector]
34 | private SerializationData serializationData;
35 |
36 | void ISerializationCallbackReceiver.OnAfterDeserialize()
37 | {
38 | if (this.SafeIsUnityNull()) return;
39 | UnitySerializationUtility.DeserializeUnityObject(this, ref this.serializationData);
40 | this.OnAfterDeserialize();
41 | }
42 |
43 | void ISerializationCallbackReceiver.OnBeforeSerialize()
44 | {
45 | if (this.SafeIsUnityNull()) return;
46 | this.OnBeforeSerialize();
47 | UnitySerializationUtility.SerializeUnityObject(this, ref this.serializationData);
48 | }
49 |
50 | ///
51 | /// Invoked after deserialization has taken place.
52 | ///
53 | protected virtual void OnAfterDeserialize()
54 | {
55 | }
56 |
57 | ///
58 | /// Invoked before serialization has taken place.
59 | ///
60 | protected virtual void OnBeforeSerialize()
61 | {
62 | }
63 | }
64 | }
65 |
--------------------------------------------------------------------------------
/OdinSerializer/Unity Integration/SerializedUnityObjects/SerializedScriptableObject.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 52b61c977de101896bbde74245ed47f4
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {instanceID: 0}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/OdinSerializer/Unity Integration/SerializedUnityObjects/SerializedStateMachineBehaviour.cs:
--------------------------------------------------------------------------------
1 | //-----------------------------------------------------------------------
2 | //
3 | // Copyright (c) 2018 Sirenix IVS
4 | //
5 | // Licensed under the Apache License, Version 2.0 (the "License");
6 | // you may not use this file except in compliance with the License.
7 | // You may obtain a copy of the License at
8 | //
9 | // http://www.apache.org/licenses/LICENSE-2.0
10 | //
11 | // Unless required by applicable law or agreed to in writing, software
12 | // distributed under the License is distributed on an "AS IS" BASIS,
13 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 | // See the License for the specific language governing permissions and
15 | // limitations under the License.
16 | //
17 | //-----------------------------------------------------------------------
18 |
19 | namespace ToolBox.Serialization.OdinSerializer
20 | {
21 | using Utilities;
22 | using UnityEngine;
23 |
24 | ///
25 | /// A Unity StateMachineBehaviour which is serialized by the Sirenix serialization system.
26 | ///
27 | #if ODIN_INSPECTOR
28 | [Sirenix.OdinInspector.ShowOdinSerializedPropertiesInInspector]
29 | #endif
30 |
31 | public abstract class SerializedStateMachineBehaviour : StateMachineBehaviour, ISerializationCallbackReceiver
32 | {
33 | [SerializeField, HideInInspector]
34 | private SerializationData serializationData;
35 |
36 | void ISerializationCallbackReceiver.OnAfterDeserialize()
37 | {
38 | if (this.SafeIsUnityNull()) return;
39 | UnitySerializationUtility.DeserializeUnityObject(this, ref this.serializationData);
40 | this.OnAfterDeserialize();
41 | }
42 |
43 | void ISerializationCallbackReceiver.OnBeforeSerialize()
44 | {
45 | if (this.SafeIsUnityNull()) return;
46 | this.OnBeforeSerialize();
47 | UnitySerializationUtility.SerializeUnityObject(this, ref this.serializationData);
48 | }
49 |
50 | ///
51 | /// Invoked after deserialization has taken place.
52 | ///
53 | protected virtual void OnAfterDeserialize()
54 | {
55 | }
56 |
57 | ///
58 | /// Invoked before serialization has taken place.
59 | ///
60 | protected virtual void OnBeforeSerialize()
61 | {
62 | }
63 | }
64 | }
65 |
--------------------------------------------------------------------------------
/OdinSerializer/Unity Integration/SerializedUnityObjects/SerializedStateMachineBehaviour.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: ad868b60e77e7ea762d39bdf8471bc06
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {instanceID: 0}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/OdinSerializer/Unity Integration/SerializedUnityObjects/SerializedUnityObject.cs:
--------------------------------------------------------------------------------
1 | //-----------------------------------------------------------------------
2 | //
3 | // Copyright (c) 2018 Sirenix IVS
4 | //
5 | // Licensed under the Apache License, Version 2.0 (the "License");
6 | // you may not use this file except in compliance with the License.
7 | // You may obtain a copy of the License at
8 | //
9 | // http://www.apache.org/licenses/LICENSE-2.0
10 | //
11 | // Unless required by applicable law or agreed to in writing, software
12 | // distributed under the License is distributed on an "AS IS" BASIS,
13 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 | // See the License for the specific language governing permissions and
15 | // limitations under the License.
16 | //
17 | //-----------------------------------------------------------------------
18 |
19 | namespace ToolBox.Serialization.OdinSerializer
20 | {
21 | using Utilities;
22 | using UnityEngine;
23 |
24 | ///
25 | /// A Unity ScriptableObject which is serialized by the Sirenix serialization system.
26 | ///
27 | #if ODIN_INSPECTOR
28 | [Sirenix.OdinInspector.ShowOdinSerializedPropertiesInInspector]
29 | #endif
30 |
31 | public abstract class SerializedUnityObject : UnityEngine.Object, ISerializationCallbackReceiver
32 | {
33 | [SerializeField, HideInInspector]
34 | private SerializationData serializationData;
35 |
36 | void ISerializationCallbackReceiver.OnAfterDeserialize()
37 | {
38 | if (this.SafeIsUnityNull()) return;
39 | UnitySerializationUtility.DeserializeUnityObject(this, ref this.serializationData);
40 | this.OnAfterDeserialize();
41 | }
42 |
43 | void ISerializationCallbackReceiver.OnBeforeSerialize()
44 | {
45 | if (this.SafeIsUnityNull()) return;
46 | this.OnBeforeSerialize();
47 | UnitySerializationUtility.SerializeUnityObject(this, ref this.serializationData);
48 | }
49 |
50 | ///
51 | /// Invoked after deserialization has taken place.
52 | ///
53 | protected virtual void OnAfterDeserialize()
54 | {
55 | }
56 |
57 | ///
58 | /// Invoked before serialization has taken place.
59 | ///
60 | protected virtual void OnBeforeSerialize()
61 | {
62 | }
63 | }
64 | }
65 |
--------------------------------------------------------------------------------
/OdinSerializer/Unity Integration/SerializedUnityObjects/SerializedUnityObject.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: c4b3784dde228015b173d7da56888677
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {instanceID: 0}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/OdinSerializer/Unity Integration/UnityReferenceResolver.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 8345d50ae57a08af570895e3fd4f5015
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {instanceID: 0}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/OdinSerializer/Unity Integration/UnitySerializationInitializer.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 646a7647ac5654a8aeffb7b46374aab6
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {instanceID: 0}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/OdinSerializer/Unity Integration/UnitySerializationUtility.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 5c67d4ad54fb899a46ac65a7ebd7dd23
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {instanceID: 0}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/OdinSerializer/Utilities.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: f8fb31d82544f7f4da1998f77db559dc
3 | folderAsset: yes
4 | DefaultImporter:
5 | externalObjects: {}
6 | userData:
7 | assetBundleName:
8 | assetBundleVariant:
9 |
--------------------------------------------------------------------------------
/OdinSerializer/Utilities/Extensions.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 887ef752faa32de45837fbedf8dd69de
3 | folderAsset: yes
4 | DefaultImporter:
5 | externalObjects: {}
6 | userData:
7 | assetBundleName:
8 | assetBundleVariant:
9 |
--------------------------------------------------------------------------------
/OdinSerializer/Utilities/Extensions/FieldInfoExtensions.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 35e0254df47241911568af2b882251b8
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {instanceID: 0}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/OdinSerializer/Utilities/Extensions/GarbageFreeIterators.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: be8d4602f6556f5477ddf03fea35b95f
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {instanceID: 0}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/OdinSerializer/Utilities/Extensions/LinqExtensions.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 53381e2fc3d388f7d3b568166e16de59
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {instanceID: 0}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/OdinSerializer/Utilities/Extensions/MemberInfoExtensions.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: fdacfa38bedb2e0b782b787dca1a811a
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {instanceID: 0}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/OdinSerializer/Utilities/Extensions/MethodInfoExtensions.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 84918fd8b8136c9c8c0c84994e6f4025
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {instanceID: 0}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/OdinSerializer/Utilities/Extensions/Operator.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 47c8ac44e7de5f669290b54426387666
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {instanceID: 0}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/OdinSerializer/Utilities/Extensions/PathUtilities.cs:
--------------------------------------------------------------------------------
1 | //-----------------------------------------------------------------------
2 | //
3 | // Copyright (c) 2018 Sirenix IVS
4 | //
5 | // Licensed under the Apache License, Version 2.0 (the "License");
6 | // you may not use this file except in compliance with the License.
7 | // You may obtain a copy of the License at
8 | //
9 | // http://www.apache.org/licenses/LICENSE-2.0
10 | //
11 | // Unless required by applicable law or agreed to in writing, software
12 | // distributed under the License is distributed on an "AS IS" BASIS,
13 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 | // See the License for the specific language governing permissions and
15 | // limitations under the License.
16 | //
17 | //-----------------------------------------------------------------------
18 | namespace ToolBox.Serialization.OdinSerializer.Utilities
19 | {
20 | using System;
21 | using System.IO;
22 | using System.Text;
23 |
24 | ///
25 | /// DirectoryInfo method extensions.
26 | ///
27 | public static class PathUtilities
28 | {
29 | ///
30 | /// Determines whether the directory has a given directory in its hierarchy of children.
31 | ///
32 | /// The parent directory.
33 | /// The sub directory.
34 | public static bool HasSubDirectory(this DirectoryInfo parentDir, DirectoryInfo subDir)
35 | {
36 | var parentDirName = parentDir.FullName.TrimEnd('\\', '/');
37 |
38 | while (subDir != null)
39 | {
40 | if (subDir.FullName.TrimEnd('\\', '/') == parentDirName)
41 | {
42 | return true;
43 | }
44 | else
45 | {
46 | subDir = subDir.Parent;
47 | }
48 | }
49 |
50 | return false;
51 | }
52 | }
53 | }
--------------------------------------------------------------------------------
/OdinSerializer/Utilities/Extensions/PathUtilities.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 6333b03c28057467649c5c52b270d5e5
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {instanceID: 0}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/OdinSerializer/Utilities/Extensions/PropertyInfoExtensions.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 4a9f731b2eb55d08c8b1870cc93e00e2
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {instanceID: 0}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/OdinSerializer/Utilities/Extensions/StringExtensions.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: f39c383c6497275741ba968b778ef234
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {instanceID: 0}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/OdinSerializer/Utilities/Extensions/TypeExtensions.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 850bb6de5223451f8e56f15666cda3e2
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {instanceID: 0}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/OdinSerializer/Utilities/Extensions/UnityExtensions.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 459a608ab951c3654dc4e69e935bc59c
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {instanceID: 0}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/OdinSerializer/Utilities/Misc.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 94755b96e1e83ed4bb48f47cca77d438
3 | folderAsset: yes
4 | DefaultImporter:
5 | externalObjects: {}
6 | userData:
7 | assetBundleName:
8 | assetBundleVariant:
9 |
--------------------------------------------------------------------------------
/OdinSerializer/Utilities/Misc/AssemblyImportSettingsUtilities.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: b91947669b972db8f4d91b504bb82b05
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {instanceID: 0}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/OdinSerializer/Utilities/Misc/Cache.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 0078f8577ba94a8af1bdce1456a668b3
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {instanceID: 0}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/OdinSerializer/Utilities/Misc/DoubleLookupDictionary.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: d406f92ffec20f2eea481b11bf825607
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {instanceID: 0}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/OdinSerializer/Utilities/Misc/EmitUtilities.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 3917ec891378872a63b9cf9babfda304
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {instanceID: 0}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/OdinSerializer/Utilities/Misc/FastTypeComparer.cs:
--------------------------------------------------------------------------------
1 | //-----------------------------------------------------------------------
2 | //
3 | // Copyright (c) 2018 Sirenix IVS
4 | //
5 | // Licensed under the Apache License, Version 2.0 (the "License");
6 | // you may not use this file except in compliance with the License.
7 | // You may obtain a copy of the License at
8 | //
9 | // http://www.apache.org/licenses/LICENSE-2.0
10 | //
11 | // Unless required by applicable law or agreed to in writing, software
12 | // distributed under the License is distributed on an "AS IS" BASIS,
13 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 | // See the License for the specific language governing permissions and
15 | // limitations under the License.
16 | //
17 | //-----------------------------------------------------------------------
18 |
19 | namespace ToolBox.Serialization.OdinSerializer.Utilities
20 | {
21 | using System;
22 | using System.Collections.Generic;
23 |
24 | ///
25 | /// Compares types by reference before comparing them using the default type equality operator.
26 | /// This can constitute a *significant* speedup when used as the comparer for dictionaries.
27 | ///
28 | ///
29 | public class FastTypeComparer : IEqualityComparer
30 | {
31 | public static readonly FastTypeComparer Instance = new FastTypeComparer();
32 |
33 | public bool Equals(Type x, Type y)
34 | {
35 | if (object.ReferenceEquals(x, y)) return true; // Oft-used fast path over regular Type.Equals makes this much faster
36 | return x == y;
37 | }
38 |
39 | public int GetHashCode(Type obj)
40 | {
41 | return obj.GetHashCode();
42 | }
43 | }
44 | }
--------------------------------------------------------------------------------
/OdinSerializer/Utilities/Misc/FastTypeComparer.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 958c2f46d963de55b2ae1c3af0a24dee
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {instanceID: 0}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/OdinSerializer/Utilities/Misc/Flags.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 54f74503682271ea3b922fbf9db45d83
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {instanceID: 0}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/OdinSerializer/Utilities/Misc/ICacheNotificationReceiver.cs:
--------------------------------------------------------------------------------
1 | //-----------------------------------------------------------------------
2 | //
3 | // Copyright (c) 2018 Sirenix IVS
4 | //
5 | // Licensed under the Apache License, Version 2.0 (the "License");
6 | // you may not use this file except in compliance with the License.
7 | // You may obtain a copy of the License at
8 | //
9 | // http://www.apache.org/licenses/LICENSE-2.0
10 | //
11 | // Unless required by applicable law or agreed to in writing, software
12 | // distributed under the License is distributed on an "AS IS" BASIS,
13 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 | // See the License for the specific language governing permissions and
15 | // limitations under the License.
16 | //
17 | //-----------------------------------------------------------------------
18 |
19 | namespace ToolBox.Serialization.OdinSerializer.Utilities
20 | {
21 | ///
22 | /// Provides notification callbacks for values that are cached using the class.
23 | ///
24 | public interface ICacheNotificationReceiver
25 | {
26 | ///
27 | /// Called when the cached value is freed.
28 | ///
29 | void OnFreed();
30 |
31 | ///
32 | /// Called when the cached value is claimed.
33 | ///
34 | void OnClaimed();
35 | }
36 | }
--------------------------------------------------------------------------------
/OdinSerializer/Utilities/Misc/ICacheNotificationReceiver.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: e98ac6b7f0392df9a7f50d2159ce0495
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {instanceID: 0}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/OdinSerializer/Utilities/Misc/ImmutableList.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: ebd83d9289193294722949f51761c7e1
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {instanceID: 0}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/OdinSerializer/Utilities/Misc/MemberAliasFieldInfo.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 918063c733db1010fa841c350b66ae05
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {instanceID: 0}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/OdinSerializer/Utilities/Misc/MemberAliasMethodInfo.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 9bd1665fc7add2c658ccb500a0d8472f
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {instanceID: 0}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/OdinSerializer/Utilities/Misc/MemberAliasPropertyInfo.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: bda9b4b0e9eec6f1d2aebb5bfd68ac7f
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {instanceID: 0}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/OdinSerializer/Utilities/Misc/ReferenceEqualityComparer.cs:
--------------------------------------------------------------------------------
1 | //-----------------------------------------------------------------------
2 | //
3 | // Copyright (c) 2018 Sirenix IVS
4 | //
5 | // Licensed under the Apache License, Version 2.0 (the "License");
6 | // you may not use this file except in compliance with the License.
7 | // You may obtain a copy of the License at
8 | //
9 | // http://www.apache.org/licenses/LICENSE-2.0
10 | //
11 | // Unless required by applicable law or agreed to in writing, software
12 | // distributed under the License is distributed on an "AS IS" BASIS,
13 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 | // See the License for the specific language governing permissions and
15 | // limitations under the License.
16 | //
17 | //-----------------------------------------------------------------------
18 |
19 | namespace ToolBox.Serialization.OdinSerializer.Utilities
20 | {
21 | using System;
22 | using System.Collections.Generic;
23 |
24 | ///
25 | /// Compares objects by reference only, ignoring equality operators completely. This is used by the property tree reference dictionaries to keep track of references.
26 | ///
27 | public class ReferenceEqualityComparer : IEqualityComparer where T : class
28 | {
29 | ///
30 | /// A default, cached instance of this generic variant of the reference equality comparer.
31 | ///
32 | public static readonly ReferenceEqualityComparer Default = new ReferenceEqualityComparer();
33 |
34 | ///
35 | /// Returns true if the object references are equal.
36 | ///
37 | public bool Equals(T x, T y)
38 | {
39 | return object.ReferenceEquals(x, y);
40 | }
41 |
42 | ///
43 | /// Returns the result of the object's own GetHashCode method.
44 | ///
45 | public int GetHashCode(T obj)
46 | {
47 | try
48 | {
49 | return obj.GetHashCode();
50 | }
51 | catch (NullReferenceException)
52 | {
53 | return -1;
54 | }
55 | }
56 | }
57 | }
--------------------------------------------------------------------------------
/OdinSerializer/Utilities/Misc/ReferenceEqualityComparer.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 0653045b6d3837e5b20174811ab368a8
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {instanceID: 0}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/OdinSerializer/Utilities/Misc/UnityVersion.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 403585623b2616763be9cbdc95619e84
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {instanceID: 0}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/OdinSerializer/Utilities/Misc/UnsafeUtilities.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 78dcf301a7fbf12e89200193d449e5b8
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {instanceID: 0}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/OdinSerializer/Version.txt:
--------------------------------------------------------------------------------
1 | 2024.2.27 - 3d90af7a
--------------------------------------------------------------------------------
/OdinSerializer/Version.txt.meta:
--------------------------------------------------------------------------------
1 |
2 | fileFormatVersion: 2
3 | guid: 475ee844b07caf62f2e1cdc2cf58ce87
4 | TextScriptImporter:
5 | userData:
6 | assetBundleName:
7 | assetBundleVariant:
8 |
--------------------------------------------------------------------------------
/README.md.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 52f8b4bb1b124e30994e79d513fbd29b
3 | TextScriptImporter:
4 | externalObjects: {}
5 | userData:
6 | assetBundleName:
7 | assetBundleVariant:
8 |
--------------------------------------------------------------------------------
/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "com.intothedev.savesystem",
3 | "version": "1.8.0",
4 | "displayName": "Save System",
5 | "description": "Save System with Odin Serializer.",
6 | "author": {
7 | "name": "IntoTheDev",
8 | "email": "indraayy322@gmail.com",
9 | "url": "https://github.com/IntoTheDev"
10 | },
11 | "type": "tool"
12 | }
13 |
--------------------------------------------------------------------------------
/package.json.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 84620d3740d94a2da8af347017568ccd
3 | TextScriptImporter:
4 | externalObjects: {}
5 | userData:
6 | assetBundleName:
7 | assetBundleVariant:
8 |
--------------------------------------------------------------------------------