├── OdinSerializer ├── Version.txt ├── Core │ ├── Misc │ │ ├── CustomSerialization.cs.meta │ │ ├── Buffer.cs.meta │ │ ├── DataFormat.cs.meta │ │ ├── EntryType.cs.meta │ │ ├── ILogger.cs.meta │ │ ├── NodeInfo.cs.meta │ │ ├── ArchitectureInfo.cs.meta │ │ ├── CustomLogger.cs.meta │ │ ├── DefaultLoggers.cs.meta │ │ ├── ISelfFormatter.cs.meta │ │ ├── LoggingPolicy.cs.meta │ │ ├── CachedMemoryStream.cs.meta │ │ ├── ErrorHandlingPolicy.cs.meta │ │ ├── FormatterLocationStep.cs.meta │ │ ├── FormatterUtilities.cs.meta │ │ ├── IAskIfCanFormatTypes.cs.meta │ │ ├── ISerializationPolicy.cs.meta │ │ ├── ProperBitConverter.cs.meta │ │ ├── SerializationConfig.cs.meta │ │ ├── SerializationContext.cs.meta │ │ ├── SerializationPolicies.cs.meta │ │ ├── SerializationUtility.cs.meta │ │ ├── CustomSerializationPolicy.cs.meta │ │ ├── DefaultSerializationBinder.cs.meta │ │ ├── DeserializationContext.cs.meta │ │ ├── EmittedAssemblyAttribute.cs.meta │ │ ├── OdinSerializeAttribute.cs.meta │ │ ├── RegisterFormatterAttribute.cs.meta │ │ ├── TwoWaySerializationBinder.cs.meta │ │ ├── IExternalGuidReferenceResolver.cs.meta │ │ ├── IExternalIndexReferenceResolver.cs.meta │ │ ├── SerializationAbortException.cs.meta │ │ ├── IExternalStringReferenceResolver.cs.meta │ │ ├── RegisterFormatterLocatorAttribute.cs.meta │ │ ├── LoggingPolicy.cs │ │ ├── ErrorHandlingPolicy.cs │ │ ├── ILogger.cs │ │ ├── IAskIfCanFormatTypes.cs │ │ ├── FormatterLocationStep.cs │ │ ├── DefaultLoggers.cs │ │ ├── OdinSerializeAttribute.cs │ │ ├── EmittedAssemblyAttribute.cs │ │ ├── RegisterFormatterAttribute.cs │ │ ├── RegisterFormatterLocatorAttribute.cs │ │ ├── ISelfFormatter.cs │ │ ├── SerializationAbortException.cs │ │ ├── IExternalIndexReferenceResolver.cs │ │ ├── ISerializationPolicy.cs │ │ ├── TwoWaySerializationBinder.cs │ │ ├── DataFormat.cs │ │ ├── IExternalStringReferenceResolver.cs │ │ └── IExternalGuidReferenceResolver.cs │ ├── Misc.meta │ ├── Formatters.meta │ ├── Serializers.meta │ ├── DataReaderWriters.meta │ ├── FormatterLocators.meta │ ├── DataReaderWriters │ │ ├── Binary.meta │ │ ├── SerializationNodes.meta │ │ ├── IDataReader.cs.meta │ │ ├── IDataWriter.cs.meta │ │ ├── BaseDataReader.cs.meta │ │ ├── BaseDataWriter.cs.meta │ │ ├── BaseDataReaderWriter.cs.meta │ │ ├── Binary │ │ │ ├── BinaryDataReader.cs.meta │ │ │ ├── BinaryDataWriter.cs.meta │ │ │ └── BinaryEntryType.cs.meta │ │ └── SerializationNodes │ │ │ ├── SerializationNode.cs.meta │ │ │ ├── SerializationNodeDataReader.cs.meta │ │ │ ├── SerializationNodeDataWriter.cs.meta │ │ │ ├── SerializationNodeDataReaderWriterConfig.cs.meta │ │ │ ├── SerializationNodeDataReaderWriterConfig.cs │ │ │ └── SerializationNode.cs │ ├── Formatters │ │ ├── IFormatter.cs.meta │ │ ├── ArrayFormatter.cs.meta │ │ ├── BaseFormatter.cs.meta │ │ ├── ListFormatter.cs.meta │ │ ├── QueueFormatter.cs.meta │ │ ├── StackFormatter.cs.meta │ │ ├── TypeFormatter.cs.meta │ │ ├── ArrayListFormatter.cs.meta │ │ ├── DateTimeFormatter.cs.meta │ │ ├── DelegateFormatter.cs.meta │ │ ├── DictionaryFormatter.cs.meta │ │ ├── EasyBaseFormatter.cs.meta │ │ ├── EmptyTypeFormatter.cs.meta │ │ ├── FormatterEmitter.cs.meta │ │ ├── HashSetFormatter.cs.meta │ │ ├── MethodInfoFormatter.cs.meta │ │ ├── MinimalBaseFormatter.cs.meta │ │ ├── NullableFormatter.cs.meta │ │ ├── ReflectionFormatter.cs.meta │ │ ├── TimeSpanFormatter.cs.meta │ │ ├── VersionFormatter.cs.meta │ │ ├── DateTimeOffsetFormatter.cs.meta │ │ ├── EmittedFormatterAttribute.cs.meta │ │ ├── KeyValuePairFormatter.cs.meta │ │ ├── PrimitiveArrayFormatter.cs.meta │ │ ├── SelfFormatterFormatter.cs.meta │ │ ├── SerializableFormatter.cs.meta │ │ ├── DerivedDictionaryFormatter.cs.meta │ │ ├── GenericCollectionFormatter.cs.meta │ │ ├── MultiDimensionalArrayFormatter.cs.meta │ │ ├── DoubleLookupDictionaryFormatter.cs.meta │ │ ├── ReflectionOrEmittedBaseFormatter.cs.meta │ │ ├── EmittedFormatterAttribute.cs │ │ ├── EmptyTypeFormatter.cs │ │ ├── SelfFormatterFormatter.cs │ │ ├── TimeSpanFormatter.cs │ │ ├── DateTimeFormatter.cs │ │ └── DateTimeOffsetFormatter.cs │ ├── Serializers │ │ ├── ByteSerializer.cs.meta │ │ ├── CharSerializer.cs.meta │ │ ├── EnumSerializer.cs.meta │ │ ├── GuidSerializer.cs.meta │ │ ├── Serializer.cs.meta │ │ ├── BooleanSerializer.cs.meta │ │ ├── DecimalSerializer.cs.meta │ │ ├── DoubleSerializer.cs.meta │ │ ├── Int16Serializer.cs.meta │ │ ├── Int32Serializer.cs.meta │ │ ├── Int64Serializer.cs.meta │ │ ├── IntPtrSerializer.cs.meta │ │ ├── SByteSerializer.cs.meta │ │ ├── SingleSerializer.cs.meta │ │ ├── StringSerializer.cs.meta │ │ ├── UInt16Serializer.cs.meta │ │ ├── UInt32Serializer.cs.meta │ │ ├── UInt64Serializer.cs.meta │ │ ├── UIntPtrSerializer.cs.meta │ │ └── ComplexTypeSerializer.cs.meta │ └── FormatterLocators │ │ ├── FormatterLocator.cs.meta │ │ ├── IFormatterLocator.cs.meta │ │ ├── ArrayFormatterLocator.cs.meta │ │ ├── SelfFormatterLocator.cs.meta │ │ ├── TypeFormatterLocator.cs.meta │ │ ├── DelegateFormatterLocator.cs.meta │ │ ├── GenericCollectionFormatterLocator.cs.meta │ │ ├── ISerializableFormatterLocator.cs.meta │ │ ├── IFormatterLocator.cs │ │ ├── TypeFormatterLocator.cs │ │ ├── DelegateFormatterLocator.cs │ │ ├── SelfFormatterLocator.cs │ │ ├── ISerializableFormatterLocator.cs │ │ ├── GenericCollectionFormatterLocator.cs │ │ └── ArrayFormatterLocator.cs ├── LICENSE.meta ├── Version.txt.meta ├── Core.meta ├── Utilities.meta ├── Utilities │ ├── Misc.meta │ ├── Extensions.meta │ ├── Misc │ │ ├── Cache.cs.meta │ │ ├── Flags.cs.meta │ │ ├── EmitUtilities.cs.meta │ │ ├── FastTypeComparer.cs.meta │ │ ├── ImmutableList.cs.meta │ │ ├── UnityVersion.cs.meta │ │ ├── UnsafeUtilities.cs.meta │ │ ├── MemberAliasFieldInfo.cs.meta │ │ ├── MemberAliasMethodInfo.cs.meta │ │ ├── DoubleLookupDictionary.cs.meta │ │ ├── ICacheNotificationReceiver.cs.meta │ │ ├── MemberAliasPropertyInfo.cs.meta │ │ ├── ReferenceEqualityComparer.cs.meta │ │ ├── ICacheNotificationReceiver.cs │ │ ├── FastTypeComparer.cs │ │ └── ReferenceEqualityComparer.cs │ └── Extensions │ │ ├── Operator.cs.meta │ │ ├── LinqExtensions.cs.meta │ │ ├── TypeExtensions.cs.meta │ │ ├── UnityExtensions.cs.meta │ │ ├── FieldInfoExtensions.cs.meta │ │ ├── GarbageFreeIterators.cs.meta │ │ ├── MemberInfoExtensions.cs.meta │ │ ├── MethodInfoExtensions.cs.meta │ │ ├── StringExtensions.cs.meta │ │ ├── PropertyInfoExtensions.cs.meta │ │ ├── LinqExtensions.cs │ │ ├── StringExtensions.cs │ │ └── FieldInfoExtensions.cs ├── Unity Integration.meta ├── Unity Integration │ ├── Formatters.meta │ ├── SerializationData.cs.meta │ ├── AOTSupportUtilities.cs.meta │ ├── UnityReferenceResolver.cs.meta │ ├── Formatters │ │ ├── BoundsFormatter.cs.meta │ │ ├── Color32Formatter.cs.meta │ │ ├── ColorFormatter.cs.meta │ │ ├── GradientFormatter.cs.meta │ │ ├── KeyframeFormatter.cs.meta │ │ ├── RectFormatter.cs.meta │ │ ├── Vector2Formatter.cs.meta │ │ ├── Vector3Formatter.cs.meta │ │ ├── Vector4Formatter.cs.meta │ │ ├── ColorBlockFormatter.cs.meta │ │ ├── CoroutineFormatter.cs.meta │ │ ├── LayerMaskFormatter.cs.meta │ │ ├── QuaternionFormatter.cs.meta │ │ ├── UnityEventFormatter.cs.meta │ │ ├── AnimationCurveFormatter.cs.meta │ │ ├── GradientAlphaKeyFormatter.cs.meta │ │ ├── GradientColorKeyFormatter.cs.meta │ │ ├── UnityEventFormatter.cs │ │ ├── LayerMaskFormatter.cs │ │ ├── Vector2Formatter.cs │ │ ├── BoundsFormatter.cs │ │ ├── GradientAlphaKeyFormatter.cs │ │ └── Vector3Formatter.cs │ ├── UnitySerializationInitializer.cs.meta │ ├── SerializationData.cs │ └── UnitySerializationInitializer.cs ├── ExtEvents.OdinSerializer.asmdef.meta └── ExtEvents.OdinSerializer.asmdef ├── .images ├── no-elements.png ├── new-arg-name.png ├── type-dropdown.png ├── invocation-graph.png ├── one-dynamic-arg.png ├── static-listener.png ├── string-argument.png ├── arg-name-dropdown.png ├── performance-graph.png ├── custom-serializable-arg.png ├── dynamic-argument-dropdown.png ├── dynamic-serialized-dropdown.png ├── one-empty-instance-listener.png └── add-instance-listener.gif ├── Editor ├── Util.meta ├── Drawers.meta ├── Settings.meta ├── AOTGeneration.meta ├── Util │ ├── FoldoutList.cs.meta │ ├── MethodInfoCache.cs.meta │ ├── PropertyObjectCache.cs.meta │ ├── ScriptableObjectCache.cs.meta │ ├── DeserializedValueHolder.cs.meta │ ├── PersistentArgumentHelper.cs.meta │ ├── DeserializedValueHolder.cs │ ├── PersistentArgumentHelper.cs │ ├── PropertyObjectCache.cs │ └── MethodInfoCache.cs ├── Drawers │ ├── ExtEventDrawer.cs.meta │ ├── MethodInfoDrawer.cs.meta │ ├── DynamicListenersDrawer.cs.meta │ ├── PersistentArgumentDrawer.cs.meta │ └── PersistentListenerDrawer.cs.meta ├── Settings │ ├── PreferencesDrawer.cs.meta │ ├── EditorPackageSettings.cs.meta │ ├── PackageSettingsDrawer.cs.meta │ ├── PreferencesDrawer.cs │ └── EditorPackageSettings.cs ├── AOTGeneration │ ├── BuildPostprocessor.cs.meta │ ├── BuildPreprocessor.cs.meta │ ├── AOTAssemblyGenerator.cs.meta │ ├── ExtEventProjectSearcher.cs.meta │ └── BuildPostprocessor.cs ├── ExtEvents.Editor.asmdef.meta └── ExtEvents.Editor.asmdef ├── Runtime ├── Util.meta ├── Events.meta ├── EventElements.meta ├── Util │ ├── Logger.cs.meta │ ├── PackageSettings.cs.meta │ ├── StringExtensions.cs.meta │ ├── ImplicitConversionsCache.cs.meta │ ├── Logger.cs │ ├── StringExtensions.cs │ ├── PackageSettings.cs │ └── ImplicitConversionsCache.cs ├── AssemblyInfo.cs ├── AssemblyInfo.cs.meta ├── Events │ ├── ExtEvent.cs.meta │ ├── BaseExtEvent.cs.meta │ ├── ExtEvent`1.cs.meta │ ├── ExtEvent`2.cs.meta │ ├── ExtEvent`3.cs.meta │ ├── ExtEvent.cs │ ├── ExtEvent`1.cs │ ├── ExtEvent`2.cs │ └── ExtEvent`3.cs ├── ExtEventListener.cs.meta ├── EventArgumentsAttribute.cs.meta ├── EventElements │ ├── Converter.cs.meta │ ├── ArgumentHolder.cs.meta │ ├── BuiltInConverters.tt.meta │ ├── ConverterEmitter.cs.meta │ ├── InvokableCall.cs.meta │ ├── PersistentArgument.cs.meta │ ├── PersistentListener.cs.meta │ ├── PersistentListener.MethodInfo.cs.meta │ ├── BuiltInConverters.cs.meta │ └── ArgumentHolder.cs ├── ExtEvents.asmdef.meta ├── ExtEventListener.cs ├── ExtEvents.asmdef └── EventArgumentsAttribute.cs ├── LICENSE.meta ├── CHANGELOG.md.meta ├── README.md.meta ├── package.json.meta ├── Editor.meta ├── Runtime.meta ├── OdinSerializer.meta ├── .github └── workflows │ └── ci.yml ├── package.json ├── .gitignore ├── .releaserc.json ├── .gitattributes └── LICENSE /OdinSerializer/Version.txt: -------------------------------------------------------------------------------- 1 | 2022.4.7 - 53d2edf9 -------------------------------------------------------------------------------- /.images/no-elements.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SolidAlloy/ExtEvents/HEAD/.images/no-elements.png -------------------------------------------------------------------------------- /.images/new-arg-name.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SolidAlloy/ExtEvents/HEAD/.images/new-arg-name.png -------------------------------------------------------------------------------- /.images/type-dropdown.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SolidAlloy/ExtEvents/HEAD/.images/type-dropdown.png -------------------------------------------------------------------------------- /Editor/Util.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 312fe13fb2be41f78e6fd1fbf1211b56 3 | timeCreated: 1642793424 -------------------------------------------------------------------------------- /Runtime/Util.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: b09ba2a91d2c4dc5935cff427ca150b1 3 | timeCreated: 1642793524 -------------------------------------------------------------------------------- /.images/invocation-graph.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SolidAlloy/ExtEvents/HEAD/.images/invocation-graph.png -------------------------------------------------------------------------------- /.images/one-dynamic-arg.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SolidAlloy/ExtEvents/HEAD/.images/one-dynamic-arg.png -------------------------------------------------------------------------------- /.images/static-listener.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SolidAlloy/ExtEvents/HEAD/.images/static-listener.png -------------------------------------------------------------------------------- /.images/string-argument.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SolidAlloy/ExtEvents/HEAD/.images/string-argument.png -------------------------------------------------------------------------------- /Editor/Drawers.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 8b49847460a842b9a7cb06e3f1db35d8 3 | timeCreated: 1643387047 -------------------------------------------------------------------------------- /Editor/Settings.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: b4871a0fc766451f9dbe226f6aac6c22 3 | timeCreated: 1642793366 -------------------------------------------------------------------------------- /Runtime/Events.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 6b61e3304f864e4d9aeaa5d5d8dd97d7 3 | timeCreated: 1638862621 -------------------------------------------------------------------------------- /.images/arg-name-dropdown.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SolidAlloy/ExtEvents/HEAD/.images/arg-name-dropdown.png -------------------------------------------------------------------------------- /.images/performance-graph.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SolidAlloy/ExtEvents/HEAD/.images/performance-graph.png -------------------------------------------------------------------------------- /Editor/AOTGeneration.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: c356bae33bc945c59e7fb1799032d5b5 3 | timeCreated: 1643386845 -------------------------------------------------------------------------------- /Runtime/EventElements.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: c8b7adc21abf4587baf5a67fde0de802 3 | timeCreated: 1638862633 -------------------------------------------------------------------------------- /Runtime/Util/Logger.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: fe56ff53fe1b4d2487100f7510a687be 3 | timeCreated: 1642529244 -------------------------------------------------------------------------------- /Editor/Util/FoldoutList.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: c2aacb5884e645d9a7d5add130782890 3 | timeCreated: 1642618635 -------------------------------------------------------------------------------- /Runtime/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Runtime.CompilerServices; 2 | 3 | [assembly: InternalsVisibleTo("ExtEvents.Editor")] -------------------------------------------------------------------------------- /Runtime/AssemblyInfo.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 7272992e57bc4cbc98d39810655891f7 3 | timeCreated: 1640899414 -------------------------------------------------------------------------------- /Runtime/Events/ExtEvent.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 46b99ca16a474ddf9eb8b4dcf47f6306 3 | timeCreated: 1638860699 -------------------------------------------------------------------------------- /Runtime/ExtEventListener.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 087f7478cbbe41abae19ea578cdc0c0b 3 | timeCreated: 1642669470 -------------------------------------------------------------------------------- /.images/custom-serializable-arg.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SolidAlloy/ExtEvents/HEAD/.images/custom-serializable-arg.png -------------------------------------------------------------------------------- /Editor/Drawers/ExtEventDrawer.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: b7787244b7c340e598b53636f35bf7b5 3 | timeCreated: 1641196702 -------------------------------------------------------------------------------- /Editor/Util/MethodInfoCache.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: bd8e7d088c0545f18ef43e313f98b688 3 | timeCreated: 1642096989 -------------------------------------------------------------------------------- /Runtime/Events/BaseExtEvent.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 1dcd667b76ee4366bba4cfa1f677cdb9 3 | timeCreated: 1638860824 -------------------------------------------------------------------------------- /Runtime/Events/ExtEvent`1.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: ce81efb9665c4e4795714bdffac328c1 3 | timeCreated: 1638860767 -------------------------------------------------------------------------------- /Runtime/Events/ExtEvent`2.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 83e403deafbc4f0ab62fc99c9081ecf8 3 | timeCreated: 1638860783 -------------------------------------------------------------------------------- /Runtime/Events/ExtEvent`3.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 8cd418df561a4636b80b66f36ec58e42 3 | timeCreated: 1638860796 -------------------------------------------------------------------------------- /Runtime/Util/PackageSettings.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 7d327ecf945f4b1490f8917cde73fcb0 3 | timeCreated: 1642018307 -------------------------------------------------------------------------------- /Runtime/Util/StringExtensions.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 06e7e59ab7ef407ab76f331d8e93353b 3 | timeCreated: 1642516695 -------------------------------------------------------------------------------- /.images/dynamic-argument-dropdown.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SolidAlloy/ExtEvents/HEAD/.images/dynamic-argument-dropdown.png -------------------------------------------------------------------------------- /Editor/Drawers/MethodInfoDrawer.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 03df074327c54211b7904f0b8689fb7f 3 | timeCreated: 1641244635 -------------------------------------------------------------------------------- /Editor/Settings/PreferencesDrawer.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 2c17cbc0d82e4eca96a425eba6847c3a 3 | timeCreated: 1642667043 -------------------------------------------------------------------------------- /Editor/Util/PropertyObjectCache.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 6831c1e46b1541378b4121a35288d333 3 | timeCreated: 1642085639 -------------------------------------------------------------------------------- /Editor/Util/ScriptableObjectCache.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 3be293a834074e3a844fc12a5e587a98 3 | timeCreated: 1641323732 -------------------------------------------------------------------------------- /Runtime/EventArgumentsAttribute.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 72fdbb835def48bf9d654b8ae9bae297 3 | timeCreated: 1641326609 -------------------------------------------------------------------------------- /Runtime/EventElements/Converter.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 7d4b99ddda8a49c3a10c47e5a02e2264 3 | timeCreated: 1653765896 -------------------------------------------------------------------------------- /.images/dynamic-serialized-dropdown.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SolidAlloy/ExtEvents/HEAD/.images/dynamic-serialized-dropdown.png -------------------------------------------------------------------------------- /.images/one-empty-instance-listener.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SolidAlloy/ExtEvents/HEAD/.images/one-empty-instance-listener.png -------------------------------------------------------------------------------- /Editor/AOTGeneration/BuildPostprocessor.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: d9cb98328dfe4419a751d78b63369ac8 3 | timeCreated: 1657114693 -------------------------------------------------------------------------------- /Editor/AOTGeneration/BuildPreprocessor.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: ad04b7b0d45c4291a9c8184d6e79e9b5 3 | timeCreated: 1643375702 -------------------------------------------------------------------------------- /Editor/Drawers/DynamicListenersDrawer.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: cd17e15523304123b551d5fb60784b0e 3 | timeCreated: 1643712149 -------------------------------------------------------------------------------- /Editor/Drawers/PersistentArgumentDrawer.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 0fd511c0484b48eda379c0efaee03bcf 3 | timeCreated: 1641316296 -------------------------------------------------------------------------------- /Editor/Drawers/PersistentListenerDrawer.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 15d3d2646b3e4b6b935e8ff5f82ab0e1 3 | timeCreated: 1641213842 -------------------------------------------------------------------------------- /Editor/Settings/EditorPackageSettings.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 34eb37ffc6864a14b1a4e42a342d66f9 3 | timeCreated: 1642667037 -------------------------------------------------------------------------------- /Editor/Settings/PackageSettingsDrawer.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 282311190bb74d6fae61bb2e132322a2 3 | timeCreated: 1642069038 -------------------------------------------------------------------------------- /Editor/Util/DeserializedValueHolder.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 764f32c83aec47c0a3affecbe8657730 3 | timeCreated: 1641324511 -------------------------------------------------------------------------------- /Editor/Util/PersistentArgumentHelper.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 37bc089236ff457bbbcd7308a18e5780 3 | timeCreated: 1654098817 -------------------------------------------------------------------------------- /Runtime/EventElements/ArgumentHolder.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: c8201c9830ad4fb2b3611f36ccde9112 3 | timeCreated: 1639036657 -------------------------------------------------------------------------------- /Runtime/EventElements/BuiltInConverters.tt.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 7cdb81199c1140c1accdcef3a1ee0b11 3 | timeCreated: 1653766471 -------------------------------------------------------------------------------- /Runtime/EventElements/ConverterEmitter.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 014296a3e5b048fdabd5693eb2c02b82 3 | timeCreated: 1654097440 -------------------------------------------------------------------------------- /Runtime/EventElements/InvokableCall.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 1c8e057b31454ab2a081f38d6d14f62b 3 | timeCreated: 1642423779 -------------------------------------------------------------------------------- /Runtime/Util/ImplicitConversionsCache.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 6e19a555a8ca41959649c9ae52ad50ca 3 | timeCreated: 1654011775 -------------------------------------------------------------------------------- /Editor/AOTGeneration/AOTAssemblyGenerator.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: c640ca147b3f43c59c4f662c25f03fdd 3 | timeCreated: 1643313814 -------------------------------------------------------------------------------- /Editor/AOTGeneration/ExtEventProjectSearcher.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 36f71565b3794e7588662ea892c05d23 3 | timeCreated: 1640899392 -------------------------------------------------------------------------------- /OdinSerializer/Core/Misc/CustomSerialization.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: ec4215effebd4f1f9f33233020f63095 3 | timeCreated: 1652538513 -------------------------------------------------------------------------------- /Runtime/EventElements/PersistentArgument.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 40c1cb7ac3e4451c954e0a39a134be2a 3 | timeCreated: 1641213259 -------------------------------------------------------------------------------- /Runtime/EventElements/PersistentListener.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: f1bad2ded6e24b4e9cc3ba4dc470c1c0 3 | timeCreated: 1638862921 -------------------------------------------------------------------------------- /Runtime/EventElements/PersistentListener.MethodInfo.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: fa73882e0e414049a8d0f94785c604ca 3 | timeCreated: 1641237405 -------------------------------------------------------------------------------- /.images/add-instance-listener.gif: -------------------------------------------------------------------------------- 1 | version https://git-lfs.github.com/spec/v1 2 | oid sha256:e014206c1c6d6bad3e7a9748dd9f8a8ee7ebe578e4125c553a1adad18fafbf32 3 | size 2965327 4 | -------------------------------------------------------------------------------- /OdinSerializer/LICENSE.meta: -------------------------------------------------------------------------------- 1 | 2 | fileFormatVersion: 2 3 | guid: 45377fcdde597b641530786d100a06e9 4 | TextScriptImporter: 5 | userData: 6 | assetBundleName: 7 | assetBundleVariant: 8 | -------------------------------------------------------------------------------- /LICENSE.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 8ad5be941059bd94cabb442b7046e65d 3 | DefaultImporter: 4 | externalObjects: {} 5 | userData: 6 | assetBundleName: 7 | assetBundleVariant: 8 | -------------------------------------------------------------------------------- /OdinSerializer/Version.txt.meta: -------------------------------------------------------------------------------- 1 | 2 | fileFormatVersion: 2 3 | guid: f2cb0c1d850fcc0a2203c8ad39b250d0 4 | TextScriptImporter: 5 | userData: 6 | assetBundleName: 7 | assetBundleVariant: 8 | -------------------------------------------------------------------------------- /CHANGELOG.md.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 49ddd10896133db41bd724e33ca5a11a 3 | TextScriptImporter: 4 | externalObjects: {} 5 | userData: 6 | assetBundleName: 7 | assetBundleVariant: 8 | -------------------------------------------------------------------------------- /README.md.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 1a4d281da9d046e4b938a74068909fbd 3 | TextScriptImporter: 4 | externalObjects: {} 5 | userData: 6 | assetBundleName: 7 | assetBundleVariant: 8 | -------------------------------------------------------------------------------- /package.json.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: ec9fd3c23dc362346bd6102883811f67 3 | PackageManifestImporter: 4 | externalObjects: {} 5 | userData: 6 | assetBundleName: 7 | assetBundleVariant: 8 | -------------------------------------------------------------------------------- /Editor.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 3029678723c9cff4b97abb6fce18468d 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Runtime.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: a9887a0e32c36fc45a29fb9583d0a5a6 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /OdinSerializer.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 16edc555ad593894c9179e7650704e02 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Runtime/ExtEvents.asmdef.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 34b1251e2e34f984c9cb42350fca1bed 3 | AssemblyDefinitionImporter: 4 | externalObjects: {} 5 | userData: 6 | assetBundleName: 7 | assetBundleVariant: 8 | -------------------------------------------------------------------------------- /OdinSerializer/Core.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 4760f28f697bb204aab5d305c1b699aa 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Editor/ExtEvents.Editor.asmdef.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 0a4d547e5130ac2478632a149c923b66 3 | AssemblyDefinitionImporter: 4 | externalObjects: {} 5 | userData: 6 | assetBundleName: 7 | assetBundleVariant: 8 | -------------------------------------------------------------------------------- /Editor/Util/DeserializedValueHolder.cs: -------------------------------------------------------------------------------- 1 | namespace ExtEvents.Editor 2 | { 3 | using UnityEngine; 4 | 5 | public abstract class DeserializedValueHolder : ScriptableObject 6 | { 7 | public T Value; 8 | } 9 | } -------------------------------------------------------------------------------- /OdinSerializer/Core/Misc.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: c0bcc698528e7704b8640af9c56ee630 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /OdinSerializer/Utilities.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 7ceee37654b4b6849bfae2eafd0aea17 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /OdinSerializer/Utilities/Misc.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: c620eaa98fe6eef44a60c369c1227aef 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /OdinSerializer/Core/Formatters.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 9b3d5eb89ac8f1846bc5cfd631685dae 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /OdinSerializer/Core/Serializers.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: ec97a7d675166e1409ea4a370487bd1a 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /OdinSerializer/Unity Integration.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: aa72990f644c61e4fab98b2b8ebaba5f 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /OdinSerializer/Core/DataReaderWriters.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 5795dd4016e06a74a8d88bb4c1ce4819 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /OdinSerializer/Core/FormatterLocators.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: d7a79c3e626a4ad49b28923ec8ef083a 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /OdinSerializer/Utilities/Extensions.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 360c7196f0edbdd4e8821465540adfa5 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /OdinSerializer/Core/DataReaderWriters/Binary.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: bbec7159033b66e40b91a872afea8d2d 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /OdinSerializer/Unity Integration/Formatters.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: f09358350a1da474185523c0afd01867 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /OdinSerializer/ExtEvents.OdinSerializer.asmdef.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: c1b147163196482e79b365bdd8451892 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /OdinSerializer/Core/DataReaderWriters/SerializationNodes.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: e866e841ccd714f43ba18d0d6f86b224 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /OdinSerializer/Core/Misc/Buffer.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 2f50ef6822cd133179efd11c5f282261 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.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 60f2b19a3193cb1c14f0f783b8d4e110 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: 88ff10aebcdfa85274ac065d470951b4 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.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 943ce80a1fb7f4cae83677c823055add 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: 21849a3e1f0bb7afbfa046a746f23c77 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: f73156adf450dc585304dfe2e06e27a3 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: 8dd72437f3f76604555d17cd2d693051 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: 8ad8940ec16f5553869cebeecd2837d1 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: 3cd852d2495a9c9252c8b33db3b15dea 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: df9d9fae14904efa7a2979d44bd58c5b 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.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 18ba1485f8ed22c4d0c8efb7098334e2 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.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 804ece54b6f05a55b0d84a53c9f5432f 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.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 5a19d030af0281f59eb263684a3ea3b6 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Runtime/EventElements/BuiltInConverters.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: ecee708832811154d8cde7e01d799ad8 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Runtime/Util/Logger.cs: -------------------------------------------------------------------------------- 1 | namespace ExtEvents 2 | { 3 | using UnityEngine; 4 | 5 | internal static class Logger 6 | { 7 | public static void LogWarning(string message) 8 | { 9 | if (PackageSettings.ShowInvocationWarning) 10 | Debug.LogWarning(message); 11 | } 12 | } 13 | } -------------------------------------------------------------------------------- /OdinSerializer/Core/Formatters/ArrayFormatter.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: c7a211438cc80bc7ced9318a91ed23db 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: 58e7460140951fffb2ede17551a12ec6 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: b702c787d607e4b2dd482869166b58b2 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: 4c00b24973dd5ff59be6b0986dd591ff 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: 63b4555e81ad1eb985ffd956e2e79355 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: ddaa67494b4e8e41a726c0ecfc6e7bdd 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: 1f08b72be5ee622dcb28987ca2e68048 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.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 8228bbad6f991b0bbe7b3d67b2ab35aa 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.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: c29a7adfe362b0fc3d4bbdbcef2ba2b0 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: a465cfed93009785b4f493308b7d45d5 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.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: f7a1cb36410ca7e4d8b7bba66891489e 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.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: a99a58cfde33d6122ccdc38ec7523602 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: 833591a3422dcdbb08646b509361e689 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: bdb6ab76c8ec35434eaf0cdee75dadd5 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: be7d902bce39d5b97e9f18244106b53e 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: 71b48f9067ffc96ad740d1ec5e826eba 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: e88f99ef13b4cff2a67f39392a7affd9 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: 61b255ea0f2f4ee0e806a8deef50e41f 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: b3e9563aef08d68c7baf348816ddb9a8 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: ccf17068906237d6dfd23a90a549b116 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: 70d0ea59a0a413f01064fa38a2d852a3 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: b977868c67658eccb3ad49e532e29548 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: 3e98eacac45189e0f004d0d06fc79368 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: d036d5a092444c7bf19b0c7bae0e4384 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.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 3cd6439fcb8690b9dcd4b17b2283d0c4 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: 9d6e1e054f75d8ca45f64c354c34ebad 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: e91776b0f62ce4dce7f5f63bb8ff4d1c 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: e1a2cd9c05d8bdf378f081f00ed42302 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: 6b3e67e71d7cfd7e789cfe38089d999d 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: b73a522213461f748c1f5fa2b97a2871 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: edeacdf6892b1802a501660e48f14959 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.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: dc2ce6c6692376cfd69fc619dfcf5725 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: 5ac0ce25046ddd06db45adb87107450f 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: 7d562104ec8d8bc8553a5ce1bc36d47f 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: 7bde79491c0cf271a62aa02ed65499f9 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.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 37748e8e1845ff73860ea07941ae9fa1 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: 19db2e1d32dc9840406f2416c2646250 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: 3f7ed4290a43d6a3d55363c685a1113d 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: 76f4ec1081c0fa65becd66f03bf226ce 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: 08302f1376e94db2b22149f4f2addaa9 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: 94e010adaf3859dab40f4c9e303412aa 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: 0fd1e5a485a80b2bf46cd2079438c59f 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.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 7b21bcf126e6e6382cf681b2663923c6 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: ea3942359a96a3d16b2ed80f9a15cd7b 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: a216a7c9b1bbd3c6a40dfd1950074445 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: 864e3a9553e4989ad945d558aea34795 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: 2d538eb030b56cd6fe245db36fdca565 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.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 563d22d563103a36fda5d7e26b369149 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.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: cd7c2abe47e00280de9f539af2a292fd 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.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: cae6ff928caaf7f6fc6d746a3395302c 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.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 11b1e936aef67d5ab167c4bad12a5bf3 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: 0ecbf43e46576cae798a240ca7c08a99 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: f01a923b3ab62979816bb14fe6798799 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: d24abfd742ad16e7dc4c6ef2a40e736c 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: 4dcd162efeca1fb5d4014000a6bb4873 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: 8b1902d3a83049cd4999334ace9bdcf2 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: 1188c1ca44fc783f42d9af489f43c99f 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: f84a81c10aa474880b3f8a27b12d4c78 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: ba4f6e39197b262de1cb3dbfdbb15380 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: 8b3e6c9018d35375a701719a5a1d831a 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: 4812d81190d7cd219f2ddd2c1ad0d9c7 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: 9e6fc3d22878512feab476bf14ffbe2d 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: 0cf0cc40ef38a6e46fafac7f273fd00b 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: 287bd620f4b7d2de2679d43f5a622581 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: f6ec7fa7e2982607a5188f3e7e185cb9 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/SerializationData.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: c31668999aa392261430b0dd8616f8fc 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: 9d1ab670d72077616cdebf302436583d 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: 4b55a12a294b68cbb4fe1666cdadf35e 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: ea78bc0ba80509b6bbe4c0093e1de641 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: 6744bc4961340b0be20677ef467c3360 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: 4bfb29954d65562b6850ac707aa006b4 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/BaseDataReader.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 5c49c96f814d158414e2557d247ba7fd 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: 49e6a98157341fee46543098fc6c3ea2 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: 2f741574b9b95ad8ae21c559519c7f32 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.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 0baf336348544f3e0c46049bc12ac80f 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.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 1dea522cf1ecdf7f072270d3fb984dfb 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.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 749c2fe0dcac1e74cf83f8511eda0716 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: c021a725ff1684edbe7ce8bc7f08ae61 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: cc0b293357474573f375ad7054523b8a 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: 36779585a3ecc3227b4134495fba84ce 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: 9efc7a542126ac231b4b3eca8a58232c 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.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 9d79a224b6ca853c5e12b80f95d86e16 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.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: a843cba26bcd67e66fd5ca8863ca1bde 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.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 4af2d76c6793183861e71e85ae4c7596 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: cc74ef95a9664146ef16cb8128511588 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: 242a261efa04e951ac3b4dbdb85fbfa0 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: 05c9794227bc75aa5f388c544d7f8dee 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/FieldInfoExtensions.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 81ca113f9cddb1b098b4f369823fa23b 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: d29a6c8d2b965ea0fbc99afe785392d7 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: 723afdcad60de195384e79563d49764f 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: 5c77e9e2fd3345669bdf33aed4512c07 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: 10acf76257685371381196bc462f6be5 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: 48ad20918a9e8612dfe23fc9a5083bd0 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.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: b78dddbe113fc12be49a5767994a5c8f 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: 4a0ebc0af96d8c760030edff36d9f4cd 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.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 0a5c67deb1cb371a3ff3dc8fb10518a4 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: 832668c5c6a0f305f14e0b6ed0732a84 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/BinaryDataReader.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 5e06eeaf65ea4ce6a366afa993aaaef0 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: 486ecb62542993120981c36b7d433e9c 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: e824a885e58f833d8df3a4932bda7990 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/ArrayFormatterLocator.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: dea1ae812c496ceb438209fce88f63d3 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.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 681ef0f423626bf0824f6d9053b7e165 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.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: c06bc652926da6588db46a3d3e1dbb2c 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: 1d8c5a935ebb2099817a2943692445d6 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: e8e997f3b19ef90c2dc3f68f2876e9fd 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: 0c78f5141a994f57ccec57afe3cdb93c 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.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 2dd0a0770a4efa80648c3fa630f1eae1 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.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 3a5530e0cbd5d3fafe1b12f03833b4ee 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.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: b6ae982dc86872ce2432de1e987d3b75 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: 73e877342b5b3ed5ed12516cb04a2252 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: ef79c4091dc16baf25174bf168a21d9e 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: 397fa3461be152d0d17125e54c27ba7d 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: 442e593b22bd787d48b2233207a5b2bf 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: 1eae4e2e60db51035ac9fd8ce91426d2 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.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 92b7571341b9da12fbf4b96247918c5e 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.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 1ced4c85fb8b55e6a7894b70d1b5c087 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: ef10b1073e08e708ac3889df8c78a05e 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: b6bb4d2f0c609652692d4255fd144a79 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.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: dc97510699c31a899528f43065543145 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: 33d42f0b4aabadefd2d33f1c8e03b172 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.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 2a8c3c1d68f1569cbb479860db6b9580 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: 0fd730c887ee594ba2616e745846c1b5 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: 073a02e99c867f074c7cd866eb5267b8 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.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 011b9b4b099eeeaf46e98ed9a8525cd6 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: 7a59b0b55241a6193f25786cbced45a6 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.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 0c69079f29e71d5d29d27858146d05a1 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: ca1d0180bbe7a6d794e99cef1a7ea30e 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.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: b010887b90f2e4324c24c0ac93502945 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.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 35cc3f906f138d8371d566854201d0af 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/AnimationCurveFormatter.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 25194314447bce98422d286caf6e1bc4 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.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: f3b8b9bfc1b03202d5677c795ba7e3b3 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: c65ab0c3becfcb569da12584e0f92407 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/SerializationNode.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 524801acdf6c02978dd1248dc463e065 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: 540595c68dac54ec5586849b5b526106 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: d6890b702605d22743f2289a5aa7de58 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.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: fa5a5418cce51fb346ce48b72db57c30 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Runtime/Util/StringExtensions.cs: -------------------------------------------------------------------------------- 1 | namespace ExtEvents 2 | { 3 | internal static class StringExtensions 4 | { 5 | public static bool IsPropertySetter(this string methodName) 6 | { 7 | return methodName.StartsWith("set_"); 8 | } 9 | 10 | public static bool IsPropertyGetter(this string methodName) 11 | { 12 | return methodName.StartsWith("get_"); 13 | } 14 | } 15 | } -------------------------------------------------------------------------------- /OdinSerializer/ExtEvents.OdinSerializer.asmdef: -------------------------------------------------------------------------------- 1 | { 2 | "name": "ExtEvents.OdinSerializer", 3 | "rootNamespace": "", 4 | "references": [], 5 | "includePlatforms": [], 6 | "excludePlatforms": [], 7 | "allowUnsafeCode": true, 8 | "overrideReferences": false, 9 | "precompiledReferences": [], 10 | "autoReferenced": true, 11 | "defineConstraints": [], 12 | "versionDefines": [], 13 | "noEngineReferences": false 14 | } -------------------------------------------------------------------------------- /Runtime/ExtEventListener.cs: -------------------------------------------------------------------------------- 1 | namespace ExtEvents 2 | { 3 | using System; 4 | 5 | /// 6 | /// An attribute added to a non-public method that you want to use in . 7 | /// By default, only public methods are shown in the method dropdown. 8 | /// 9 | [AttributeUsage(AttributeTargets.Method | AttributeTargets.Property, AllowMultiple = false, Inherited = true)] 10 | public class ExtEventListener : Attribute { } 11 | } -------------------------------------------------------------------------------- /Editor/AOTGeneration/BuildPostprocessor.cs: -------------------------------------------------------------------------------- 1 | namespace ExtEvents.Editor 2 | { 3 | using UnityEditor; 4 | using UnityEditor.Build; 5 | using UnityEditor.Build.Reporting; 6 | 7 | public class BuildPostprocessor : IPostprocessBuildWithReport 8 | { 9 | public int callbackOrder { get; } 10 | 11 | public void OnPostprocessBuild(BuildReport report) 12 | { 13 | AssetDatabase.DeleteAsset(AOTAssemblyGenerator.FolderPath); 14 | } 15 | } 16 | } -------------------------------------------------------------------------------- /.github/workflows/ci.yml: -------------------------------------------------------------------------------- 1 | name: CI 2 | on: 3 | push: 4 | branches: 5 | - main 6 | jobs: 7 | release: 8 | name: release 9 | runs-on: ubuntu-latest 10 | steps: 11 | - uses: actions/checkout@v2 12 | with: 13 | fetch-depth: 0 14 | - name: Release 15 | uses: cycjimmy/semantic-release-action@v2 16 | with: 17 | extra_plugins: | 18 | @semantic-release/changelog 19 | @semantic-release/git 20 | branch: main 21 | env: 22 | GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} -------------------------------------------------------------------------------- /Runtime/ExtEvents.asmdef: -------------------------------------------------------------------------------- 1 | { 2 | "name": "ExtEvents", 3 | "rootNamespace": "ExtEvents", 4 | "references": [ 5 | "TypeReferences", 6 | "Unity.Settings.Editor", 7 | "SolidUtilities", 8 | "ExtEvents.OdinSerializer" 9 | ], 10 | "includePlatforms": [], 11 | "excludePlatforms": [], 12 | "allowUnsafeCode": true, 13 | "overrideReferences": false, 14 | "precompiledReferences": [], 15 | "autoReferenced": true, 16 | "defineConstraints": [], 17 | "versionDefines": [], 18 | "noEngineReferences": false 19 | } -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "com.solidalloy.extevents", 3 | "version": "1.7.0", 4 | "displayName": "ExtEvents", 5 | "description": "UnityEvents, but better.", 6 | "dependencies": { 7 | "com.solidalloy.util": "1.40.0", 8 | "com.unity.settings-manager": "1.0.3", 9 | "com.solidalloy.type-references": "2.16.0", 10 | "com.solidalloy.unity-dropdown": "1.2.0" 11 | }, 12 | "keywords": [ 13 | "event", 14 | "UnityEvent", 15 | "tool", 16 | "editor" 17 | ], 18 | "author": { 19 | "name": "SolidAlloy", 20 | "url": "https://github.com/SolidAlloy/" 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /OdinSerializer/Core/Misc/LoggingPolicy.cs: -------------------------------------------------------------------------------- 1 | namespace ExtEvents.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/ErrorHandlingPolicy.cs: -------------------------------------------------------------------------------- 1 | namespace ExtEvents.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 | } -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # Derived From: 2 | # http://kleber-swf.com/the-definitive-gitignore-for-unity-projects/ 3 | 4 | # ======= # 5 | # Private # 6 | # ======= # 7 | _private/ 8 | Release/ 9 | /Help/ 10 | *.shfbproj_* 11 | 12 | /Assets/Zenject/Extras 13 | 14 | # =============== # 15 | # Unity generated # 16 | # =============== # 17 | Temp/ 18 | Obj/ 19 | UnityGenerated/ 20 | Library/ 21 | 22 | # ===================================== # 23 | # Visual Studio / MonoDevelop generated # 24 | # ===================================== # 25 | ExportedObj/ 26 | *.svd 27 | *.userprefs 28 | *.csproj 29 | *.pidb 30 | *.suo 31 | *.sln 32 | *.user 33 | *.unityproj 34 | *.booproj 35 | 36 | # ============ # 37 | # OS generated # 38 | # ============ # 39 | .DS_Store 40 | .DS_Store? 41 | ._* 42 | .Spotlight-V100 43 | .Trashes 44 | Icon? 45 | ehthumbs.db 46 | Thumbs.db 47 | -------------------------------------------------------------------------------- /OdinSerializer/Core/Misc/ILogger.cs: -------------------------------------------------------------------------------- 1 | namespace ExtEvents.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 | } -------------------------------------------------------------------------------- /Editor/ExtEvents.Editor.asmdef: -------------------------------------------------------------------------------- 1 | { 2 | "name": "ExtEvents.Editor", 3 | "rootNamespace": "ExtEvents.Editor", 4 | "references": [ 5 | "SolidUtilities.Editor", 6 | "ExtEvents", 7 | "SolidUtilities", 8 | "TypeReferences", 9 | "TypeReferences.Editor", 10 | "UnityDropdown.Editor", 11 | "Unity.Settings.Editor", 12 | "GenericUnityObjects.Editor", 13 | "ExtEvents.OdinSerializer" 14 | ], 15 | "includePlatforms": [ 16 | "Editor" 17 | ], 18 | "excludePlatforms": [], 19 | "allowUnsafeCode": false, 20 | "overrideReferences": false, 21 | "precompiledReferences": [], 22 | "autoReferenced": true, 23 | "defineConstraints": [], 24 | "versionDefines": [ 25 | { 26 | "name": "com.solidalloy.generic-unity-objects", 27 | "expression": "", 28 | "define": "GENERIC_UNITY_OBJECTS" 29 | } 30 | ], 31 | "noEngineReferences": false 32 | } -------------------------------------------------------------------------------- /Editor/Util/PersistentArgumentHelper.cs: -------------------------------------------------------------------------------- 1 | namespace ExtEvents.Editor 2 | { 3 | using System; 4 | using TypeReferences; 5 | using UnityEditor; 6 | using UnityEngine.Assertions; 7 | 8 | public static class PersistentArgumentHelper 9 | { 10 | public static Type GetTypeFromProperty(SerializedProperty argProperty, string typeFieldName, string fallbackTypeFieldName = null) 11 | { 12 | var type = GetTypeFromPropertyInternal(argProperty, typeFieldName); 13 | 14 | if (type == null && fallbackTypeFieldName != null) 15 | { 16 | type = GetTypeFromPropertyInternal(argProperty, fallbackTypeFieldName); 17 | } 18 | 19 | return type; 20 | } 21 | 22 | private static Type GetTypeFromPropertyInternal(SerializedProperty argProperty, string typeFieldName) 23 | { 24 | var typeNameAndAssembly = argProperty.FindPropertyRelative($"{typeFieldName}.{nameof(TypeReference._typeNameAndAssembly)}").stringValue; 25 | return Type.GetType(typeNameAndAssembly); 26 | } 27 | } 28 | } -------------------------------------------------------------------------------- /Editor/Util/PropertyObjectCache.cs: -------------------------------------------------------------------------------- 1 | namespace ExtEvents.Editor 2 | { 3 | using System.Collections.Generic; 4 | using SolidUtilities.Editor; 5 | using UnityEditor; 6 | 7 | internal static class PropertyObjectCache 8 | { 9 | private static Dictionary<(SerializedObject serializedObject, string propertyPath), object> _propertyObjects = 10 | new Dictionary<(SerializedObject serializedObject, string propertyPath), object>(); 11 | 12 | public static T GetObject(SerializedProperty serializedProperty) 13 | { 14 | var serializedObject = serializedProperty.serializedObject; 15 | var propertyPath = serializedProperty.propertyPath; 16 | 17 | _propertyObjects.TryGetValue((serializedObject, propertyPath), out object value); 18 | 19 | if (value != null) 20 | { 21 | return (T) value; 22 | } 23 | 24 | value = serializedProperty.GetObject(); 25 | _propertyObjects[(serializedObject, propertyPath)] = value; 26 | return (T) value; 27 | } 28 | } 29 | } -------------------------------------------------------------------------------- /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 ExtEvents.OdinSerializer 20 | { 21 | using System; 22 | 23 | public interface IAskIfCanFormatTypes 24 | { 25 | bool CanFormatType(Type type); 26 | } 27 | } -------------------------------------------------------------------------------- /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 ExtEvents.OdinSerializer 20 | { 21 | public enum FormatterLocationStep 22 | { 23 | BeforeRegisteredFormatters, 24 | AfterRegisteredFormatters 25 | } 26 | } -------------------------------------------------------------------------------- /Editor/Util/MethodInfoCache.cs: -------------------------------------------------------------------------------- 1 | namespace ExtEvents.Editor 2 | { 3 | using System; 4 | using System.Collections.Generic; 5 | using System.Reflection; 6 | using JetBrains.Annotations; 7 | using UnityEngine; 8 | 9 | internal static class MethodInfoCache 10 | { 11 | private static readonly Dictionary<(Type declaringType, string methodName, Type[] argTypes), MethodInfo> _cache = new Dictionary<(Type declaringType, string methodName, Type[] argTypes), MethodInfo>(); 12 | 13 | public static MethodInfo GetItem(Type type, string methodName, bool isStatic, Type[] argTypes) 14 | { 15 | if (_cache.TryGetValue((type, methodName, argTypes), out var value)) 16 | return value; 17 | 18 | var flags = BindingFlags.Public | BindingFlags.NonPublic | (isStatic ? BindingFlags.Static : BindingFlags.Instance | BindingFlags.Static); 19 | var item = type.GetMethod(methodName, flags, null, CallingConventions.Any, argTypes, null); // TODO: check if we need callingconventions.any 20 | _cache.Add((type, methodName, argTypes), item); 21 | return item; 22 | } 23 | } 24 | } -------------------------------------------------------------------------------- /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 ExtEvents.OdinSerializer 20 | { 21 | using System; 22 | 23 | public interface IFormatterLocator 24 | { 25 | bool TryGetFormatter(Type type, FormatterLocationStep step, ISerializationPolicy policy, out IFormatter formatter); 26 | } 27 | } -------------------------------------------------------------------------------- /Runtime/EventArgumentsAttribute.cs: -------------------------------------------------------------------------------- 1 | namespace ExtEvents 2 | { 3 | using System; 4 | using JetBrains.Annotations; 5 | 6 | /// 7 | /// An optional attribute for that provides the names of the arguments it represents when 8 | /// invoked, so that those names are shown in the editor UI. It allows users to better understand which arguments 9 | /// to assign to a listener when adding a listener through editor UI. 10 | /// 11 | [AttributeUsage(AttributeTargets.Field, AllowMultiple = false), BaseTypeRequired(typeof(BaseExtEvent))] 12 | public class EventArgumentsAttribute : Attribute 13 | { 14 | /// 15 | /// The names of the arguments passed to ExtEvent.Invoke(). 16 | /// 17 | public readonly string[] ArgumentNames; 18 | 19 | /// 20 | /// Creates an instance of . 21 | /// 22 | /// The names of the arguments passed to ExtEvent.Invoke(). 23 | public EventArgumentsAttribute(params string[] argumentNames) 24 | { 25 | ArgumentNames = argumentNames; 26 | } 27 | } 28 | } -------------------------------------------------------------------------------- /.releaserc.json: -------------------------------------------------------------------------------- 1 | { 2 | "tagFormat": "${version}", 3 | "plugins": [ 4 | ["@semantic-release/commit-analyzer", { "preset": "angular" }], 5 | "@semantic-release/release-notes-generator", 6 | ["@semantic-release/changelog", { "preset": "angular" }], 7 | ["@semantic-release/npm", { "npmPublish": false }], 8 | ["@semantic-release/git", { 9 | "assets": ["package.json", "CHANGELOG.md"], 10 | "message": "chore(release): ${nextRelease.version} [skip ci]\n\n${nextRelease.notes}" 11 | }], 12 | "@semantic-release/github" 13 | ] 14 | } -------------------------------------------------------------------------------- /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 ExtEvents.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/Misc/DefaultLoggers.cs: -------------------------------------------------------------------------------- 1 | namespace ExtEvents.OdinSerializer 2 | { 3 | using UnityEngine; 4 | 5 | /// 6 | /// Defines default loggers for serialization and deserialization. This class and all of its loggers are thread safe. 7 | /// 8 | public static class DefaultLoggers 9 | { 10 | private static readonly object LOCK = new object(); 11 | private static volatile ILogger unityLogger; 12 | 13 | /// 14 | /// The default logger - usually this is . 15 | /// 16 | public static ILogger DefaultLogger => UnityLogger; 17 | 18 | /// 19 | /// Logs messages using Unity's class. 20 | /// 21 | public static ILogger UnityLogger 22 | { 23 | get 24 | { 25 | if (unityLogger == null) 26 | { 27 | lock (LOCK) 28 | { 29 | if (unityLogger == null) 30 | { 31 | unityLogger = new CustomLogger(Debug.LogWarning, Debug.LogError, Debug.LogException); 32 | } 33 | } 34 | } 35 | 36 | return unityLogger; 37 | } 38 | } 39 | } 40 | } -------------------------------------------------------------------------------- /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 ExtEvents.OdinSerializer 20 | { 21 | using System; 22 | using JetBrains.Annotations; 23 | 24 | /// 25 | /// Indicates that an instance field or auto-property should be serialized by Odin. 26 | /// 27 | /// 28 | [MeansImplicitUse] 29 | [AttributeUsage(AttributeTargets.Field | AttributeTargets.Property)] 30 | public class OdinSerializeAttribute : Attribute 31 | { 32 | } 33 | } -------------------------------------------------------------------------------- /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 ExtEvents.OdinSerializer 20 | { 21 | using System; 22 | using System.ComponentModel; 23 | 24 | [AttributeUsage(AttributeTargets.Assembly)] 25 | [EditorBrowsable(EditorBrowsableState.Never)] 26 | public sealed class EmittedAssemblyAttribute : Attribute 27 | { 28 | [Obsolete("This attribute cannot be used in code, and is only meant to be applied to dynamically emitted assemblies.", true)] 29 | public EmittedAssemblyAttribute() { } 30 | } 31 | } -------------------------------------------------------------------------------- /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 ExtEvents.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/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 ExtEvents.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 int Priority { get; private set; } 28 | 29 | public RegisterFormatterAttribute(Type formatterType, int priority = 0) 30 | { 31 | FormatterType = formatterType; 32 | Priority = priority; 33 | } 34 | } 35 | } -------------------------------------------------------------------------------- /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 ExtEvents.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 | } -------------------------------------------------------------------------------- /Runtime/Util/PackageSettings.cs: -------------------------------------------------------------------------------- 1 | namespace ExtEvents 2 | { 3 | using System.IO; 4 | using UnityEditor; 5 | using UnityEngine; 6 | 7 | public class PackageSettings : ScriptableObject 8 | { 9 | public const string PackageName = "com.solidalloy.ext-events"; 10 | public const string PluginsPath = "Assets/Plugins/ExtEvents"; 11 | 12 | private const string FolderPath = PluginsPath + "/Resources"; 13 | private const string AssetName = "ExtEvents_PackageSettings"; 14 | 15 | [Tooltip("Whether a warning should be logged when an event is invoked but the listener property or method is missing")] 16 | public bool _showInvocationWarning = true; 17 | public static bool ShowInvocationWarning => Instance._showInvocationWarning; 18 | 19 | private static PackageSettings _instance; 20 | internal static PackageSettings Instance 21 | { 22 | get 23 | { 24 | if (_instance == null) 25 | _instance = Resources.Load(AssetName); 26 | 27 | if (_instance != null) 28 | return _instance; 29 | 30 | _instance = CreateInstance(); 31 | 32 | #if UNITY_EDITOR 33 | Directory.CreateDirectory(FolderPath); 34 | AssetDatabase.CreateAsset(_instance, $"{FolderPath}/{AssetName}.asset"); 35 | #endif 36 | 37 | return _instance; 38 | } 39 | } 40 | } 41 | } -------------------------------------------------------------------------------- /Runtime/EventElements/ArgumentHolder.cs: -------------------------------------------------------------------------------- 1 | namespace ExtEvents 2 | { 3 | using System; 4 | using System.Runtime.CompilerServices; 5 | using UnityEngine; 6 | using UnityEngine.Scripting; 7 | 8 | /// 9 | /// A class that allows to serialize any object through UnityEngine.JsonUtility. 10 | /// Without this class, Vector2 or int passed to JsonUtility won't be serialized properly. 11 | /// Also, by exposing 'object Value' it is possible to deserialize the object without knowing its type. 12 | /// 13 | public abstract class ArgumentHolder 14 | { 15 | [Preserve] 16 | public abstract unsafe void* ValuePointer { get; } 17 | 18 | [Preserve] 19 | public abstract object Value { get; set; } 20 | 21 | public abstract Type ValueType { get; } 22 | } 23 | 24 | [Serializable] 25 | public class ArgumentHolder : ArgumentHolder 26 | { 27 | [SerializeField] private T _value; 28 | 29 | [Preserve] 30 | public override unsafe void* ValuePointer => Unsafe.AsPointer(ref _value); 31 | 32 | [Preserve] 33 | public override object Value 34 | { 35 | get => _value; 36 | set => _value = value == null ? default : (T) value; 37 | } 38 | 39 | public override Type ValueType => typeof(T); 40 | 41 | public ArgumentHolder() { } 42 | 43 | public ArgumentHolder(T value) 44 | { 45 | _value = value; 46 | } 47 | } 48 | } -------------------------------------------------------------------------------- /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 ExtEvents.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 | FormatterLocatorType = formatterLocatorType; 32 | Priority = priority; 33 | } 34 | } 35 | } -------------------------------------------------------------------------------- /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 ExtEvents.OdinSerializer; 20 | 21 | [assembly: RegisterFormatterLocator(typeof(TypeFormatterLocator), -70)] 22 | 23 | namespace ExtEvents.OdinSerializer 24 | { 25 | using System; 26 | 27 | internal class TypeFormatterLocator : IFormatterLocator 28 | { 29 | public bool TryGetFormatter(Type type, FormatterLocationStep step, ISerializationPolicy policy, 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/Utilities/Extensions/LinqExtensions.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 ExtEvents.OdinSerializer.Utilities 20 | { 21 | using System; 22 | using System.Collections.Generic; 23 | 24 | /// 25 | /// Various LinQ extensions. 26 | /// 27 | public static class LinqExtensions 28 | { 29 | /// 30 | /// Perform an action on each item. 31 | /// 32 | /// The source. 33 | /// The action to perform. 34 | public static IEnumerable ForEach(this IEnumerable source, Action action) 35 | { 36 | foreach (var item in source) 37 | { 38 | action(item); 39 | } 40 | 41 | return source; 42 | } 43 | } 44 | } -------------------------------------------------------------------------------- /Runtime/Events/ExtEvent.cs: -------------------------------------------------------------------------------- 1 | namespace ExtEvents 2 | { 3 | using System; 4 | using JetBrains.Annotations; 5 | 6 | [Serializable] 7 | public class ExtEvent : BaseExtEvent 8 | { 9 | protected override Type[] EventParamTypes => Type.EmptyTypes; 10 | 11 | /// 12 | /// The dynamic listeners list that you can add your listener to. 13 | /// 14 | [PublicAPI] 15 | public event Action DynamicListeners; 16 | internal override Delegate _dynamicListeners => DynamicListeners; 17 | 18 | /// 19 | /// Invokes all listeners of the event. 20 | /// 21 | [PublicAPI] 22 | public void Invoke() 23 | { 24 | unsafe 25 | { 26 | // ReSharper disable once ForCanBeConvertedToForeach 27 | for (int index = 0; index < _persistentListeners.Length; index++) 28 | { 29 | _persistentListeners[index].Invoke(null); 30 | } 31 | } 32 | 33 | DynamicListeners?.Invoke(); 34 | } 35 | 36 | public static ExtEvent operator +(ExtEvent extEvent, Action listener) 37 | { 38 | if (extEvent == null) 39 | return null; 40 | 41 | extEvent.DynamicListeners += listener; 42 | return extEvent; 43 | } 44 | 45 | public static ExtEvent operator -(ExtEvent extEvent, Action listener) 46 | { 47 | if (extEvent == null) 48 | return null; 49 | 50 | extEvent.DynamicListeners -= listener; 51 | return extEvent; 52 | } 53 | } 54 | } -------------------------------------------------------------------------------- /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 ExtEvents.OdinSerializer; 20 | 21 | [assembly: RegisterFormatterLocator(typeof(DelegateFormatterLocator), -50)] 22 | 23 | namespace ExtEvents.OdinSerializer 24 | { 25 | using System; 26 | 27 | internal class DelegateFormatterLocator : IFormatterLocator 28 | { 29 | public bool TryGetFormatter(Type type, FormatterLocationStep step, ISerializationPolicy policy, out IFormatter formatter) 30 | { 31 | if (!typeof(Delegate).IsAssignableFrom(type)) 32 | { 33 | formatter = null; 34 | return false; 35 | } 36 | 37 | formatter = (IFormatter)Activator.CreateInstance(typeof(DelegateFormatter<>).MakeGenericType(type)); 38 | return true; 39 | } 40 | } 41 | } -------------------------------------------------------------------------------- /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 ExtEvents.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/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 ExtEvents.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/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 ExtEvents.OdinSerializer; 20 | 21 | [assembly: RegisterFormatterLocator(typeof(SelfFormatterLocator), -60)] 22 | 23 | namespace ExtEvents.OdinSerializer 24 | { 25 | using System; 26 | 27 | internal class SelfFormatterLocator : IFormatterLocator 28 | { 29 | public bool TryGetFormatter(Type type, FormatterLocationStep step, ISerializationPolicy policy, out IFormatter formatter) 30 | { 31 | formatter = null; 32 | 33 | if (!typeof(ISelfFormatter).IsAssignableFrom(type)) return false; 34 | 35 | if (step == FormatterLocationStep.AfterRegisteredFormatters) 36 | { 37 | formatter = (IFormatter)Activator.CreateInstance(typeof(SelfFormatterFormatter<>).MakeGenericType(type)); 38 | return true; 39 | } 40 | 41 | return false; 42 | } 43 | } 44 | } -------------------------------------------------------------------------------- /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 ExtEvents.OdinSerializer; 20 | 21 | [assembly: RegisterFormatterLocator(typeof(ISerializableFormatterLocator), -110)] 22 | 23 | namespace ExtEvents.OdinSerializer 24 | { 25 | using System; 26 | using System.Runtime.Serialization; 27 | 28 | internal class ISerializableFormatterLocator : IFormatterLocator 29 | { 30 | public bool TryGetFormatter(Type type, FormatterLocationStep step, ISerializationPolicy policy, out IFormatter formatter) 31 | { 32 | if (step != FormatterLocationStep.AfterRegisteredFormatters || !typeof(ISerializable).IsAssignableFrom(type)) 33 | { 34 | formatter = null; 35 | return false; 36 | } 37 | 38 | formatter = (IFormatter)Activator.CreateInstance(typeof(SerializableFormatter<>).MakeGenericType(type)); 39 | return true; 40 | } 41 | } 42 | } -------------------------------------------------------------------------------- /Editor/Settings/PreferencesDrawer.cs: -------------------------------------------------------------------------------- 1 | namespace ExtEvents.Editor 2 | { 3 | using System.Collections.Generic; 4 | using SolidUtilities.Editor; 5 | using UnityEditor; 6 | 7 | public static class PreferencesDrawer 8 | { 9 | private const string NicifyArgumentNamesLabel = "Nicify arguments names"; 10 | 11 | private const string NicifyArgumentNamesTooltip = "Replace the original argument names (e.g. \"currentPlayer\") with more readable labels - \"Current Player\""; 12 | 13 | [SettingsProvider] 14 | public static SettingsProvider CreateSettingsProvider() 15 | { 16 | return new SettingsProvider("Preferences/Packages/Ext Events", SettingsScope.User) 17 | { 18 | guiHandler = OnGUI, 19 | keywords = GetKeywords() 20 | }; 21 | } 22 | 23 | private static void OnGUI(string searchContext) 24 | { 25 | using (EditorGUIUtilityHelper.LabelWidthBlock(180f)) 26 | { 27 | EditorPackageSettings.NicifyArgumentNames = EditorGUILayout.Toggle(GUIContentHelper.Temp(NicifyArgumentNamesLabel, NicifyArgumentNamesTooltip), EditorPackageSettings.NicifyArgumentNames); 28 | } 29 | } 30 | 31 | private static HashSet GetKeywords() 32 | { 33 | var keywords = new HashSet(); 34 | keywords.AddWords(NicifyArgumentNamesLabel); 35 | keywords.AddWords(NicifyArgumentNamesTooltip); 36 | return keywords; 37 | } 38 | 39 | private static readonly char[] _separators = { ' ' }; 40 | 41 | private static void AddWords(this HashSet set, string phrase) 42 | { 43 | foreach (string word in phrase.Split(_separators)) 44 | { 45 | set.Add(word); 46 | } 47 | } 48 | } 49 | } -------------------------------------------------------------------------------- /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 ExtEvents.OdinSerializer; 20 | 21 | [assembly: RegisterFormatterLocator(typeof(GenericCollectionFormatterLocator), -100)] 22 | 23 | namespace ExtEvents.OdinSerializer 24 | { 25 | using System; 26 | 27 | internal class GenericCollectionFormatterLocator : IFormatterLocator 28 | { 29 | public bool TryGetFormatter(Type type, FormatterLocationStep step, ISerializationPolicy policy, out IFormatter formatter) 30 | { 31 | Type elementType; 32 | if (step != FormatterLocationStep.AfterRegisteredFormatters || !GenericCollectionFormatter.CanFormat(type, out elementType)) 33 | { 34 | formatter = null; 35 | return false; 36 | } 37 | 38 | formatter = (IFormatter)Activator.CreateInstance(typeof(GenericCollectionFormatter<,>).MakeGenericType(type, elementType)); 39 | return true; 40 | } 41 | } 42 | } -------------------------------------------------------------------------------- /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 ExtEvents.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 (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/Core/Formatters/SelfFormatterFormatter.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 ExtEvents.OdinSerializer 20 | { 21 | /// 22 | /// Formatter for types that implement the interface. 23 | /// 24 | /// 25 | /// 26 | public sealed class SelfFormatterFormatter : BaseFormatter where T : ISelfFormatter 27 | { 28 | /// 29 | /// Calls on the value to deserialize. 30 | /// 31 | protected override void DeserializeImplementation(ref T value, IDataReader reader) 32 | { 33 | value.Deserialize(reader); 34 | } 35 | 36 | /// 37 | /// Calls on the value to deserialize. 38 | /// 39 | protected override void SerializeImplementation(ref T value, IDataWriter writer) 40 | { 41 | value.Serialize(writer); 42 | } 43 | } 44 | } -------------------------------------------------------------------------------- /Runtime/Util/ImplicitConversionsCache.cs: -------------------------------------------------------------------------------- 1 | namespace ExtEvents 2 | { 3 | using System; 4 | using System.Collections.Generic; 5 | using System.Linq; 6 | using System.Reflection; 7 | 8 | public static class ImplicitConversionsCache 9 | { 10 | private static readonly Dictionary<(Type from, Type to), bool> _implicitConversions = new Dictionary<(Type from, Type to), bool>(); 11 | private static readonly Dictionary<(Type from, Type to), MethodInfo> _implicitConversionMethods = new Dictionary<(Type from, Type to), MethodInfo>(); 12 | 13 | public static MethodInfo GetImplicitOperatorForTypes(Type fromType, Type toType) 14 | { 15 | return HaveImplicitConversion(fromType, toType) ? _implicitConversionMethods[(fromType, toType)] : null; 16 | } 17 | 18 | public static bool HaveImplicitConversion(Type fromType, Type toType) 19 | { 20 | var types = (fromType, toType); 21 | if (_implicitConversions.TryGetValue(types, out bool exists)) 22 | return exists; 23 | 24 | var method = GetImplicitOperatorForTypesNoCache(fromType, toType); 25 | exists = method != null; 26 | _implicitConversions.Add(types, exists); 27 | 28 | if (exists) 29 | _implicitConversionMethods.Add(types, method); 30 | 31 | return exists; 32 | } 33 | 34 | private static MethodInfo GetImplicitOperatorForTypesNoCache(Type fromType, Type toType) 35 | { 36 | return fromType.GetMethods(BindingFlags.Public | BindingFlags.Static) 37 | .Where(mi => mi.Name == "op_Implicit" && mi.ReturnType == toType) 38 | .FirstOrDefault(mi => 39 | { 40 | ParameterInfo pi = mi.GetParameters().FirstOrDefault(); 41 | return pi != null && pi.ParameterType == fromType; 42 | }); 43 | } 44 | } 45 | } -------------------------------------------------------------------------------- /Runtime/Events/ExtEvent`1.cs: -------------------------------------------------------------------------------- 1 | namespace ExtEvents 2 | { 3 | using System; 4 | using System.Runtime.CompilerServices; 5 | using JetBrains.Annotations; 6 | 7 | [Serializable] 8 | public class ExtEvent : BaseExtEvent 9 | { 10 | private readonly unsafe void*[] _arguments = new void*[1]; 11 | 12 | private Type[] _eventParamTypes; 13 | protected override Type[] EventParamTypes => _eventParamTypes ??= new Type[] { typeof(T) }; 14 | 15 | /// 16 | /// The dynamic listeners list that you can add your listener to. 17 | /// 18 | [PublicAPI] 19 | public event Action DynamicListeners; 20 | 21 | internal override Delegate _dynamicListeners => DynamicListeners; 22 | 23 | /// 24 | /// Invokes all listeners of the event. 25 | /// 26 | [PublicAPI] 27 | public void Invoke(T arg) 28 | { 29 | unsafe 30 | { 31 | _arguments[0] = Unsafe.AsPointer(ref arg); 32 | 33 | // ReSharper disable once ForCanBeConvertedToForeach 34 | for (int index = 0; index < _persistentListeners.Length; index++) 35 | { 36 | _persistentListeners[index].Invoke(_arguments); 37 | } 38 | } 39 | 40 | DynamicListeners?.Invoke(arg); 41 | } 42 | 43 | public static ExtEvent operator +(ExtEvent extEvent, Action listener) 44 | { 45 | if (extEvent == null) 46 | return null; 47 | 48 | extEvent.DynamicListeners += listener; 49 | return extEvent; 50 | } 51 | 52 | public static ExtEvent operator -(ExtEvent extEvent, Action listener) 53 | { 54 | if (extEvent == null) 55 | return null; 56 | 57 | extEvent.DynamicListeners -= listener; 58 | return extEvent; 59 | } 60 | } 61 | } -------------------------------------------------------------------------------- /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 ExtEvents.OdinSerializer; 20 | 21 | [assembly: RegisterFormatter(typeof(UnityEventFormatter<>))] 22 | 23 | namespace ExtEvents.OdinSerializer 24 | { 25 | using UnityEngine.Events; 26 | 27 | /// 28 | /// Custom generic formatter for the , , and types. 29 | /// 30 | /// The type of UnityEvent that this formatter can serialize and deserialize. 31 | /// 32 | public class UnityEventFormatter : ReflectionFormatter where T : UnityEventBase, new() 33 | { 34 | /// 35 | /// Get an uninitialized object of type . 36 | /// 37 | /// 38 | /// An uninitialized object of type . 39 | /// 40 | protected override T GetUninitializedObject() 41 | { 42 | return new T(); 43 | } 44 | } 45 | } -------------------------------------------------------------------------------- /OdinSerializer/Unity Integration/SerializationData.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 ExtEvents.OdinSerializer 19 | { 20 | using System; 21 | using System.Collections.Generic; 22 | using Object = UnityEngine.Object; 23 | 24 | [Serializable] 25 | public struct SerializationData 26 | { 27 | public DataFormat DataFormat; 28 | public List ReferencedUnityObjects; 29 | public List SerializationNodes; 30 | public byte[] Bytes; 31 | 32 | public bool BytesAreFilled => Bytes != null && Bytes.Length > 0; 33 | public bool ReferencedUnityObjectsAreFilled => ReferencedUnityObjects != null && ReferencedUnityObjects.Count > 0; 34 | public bool SerializationNodesAreFilled => SerializationNodes != null && SerializationNodes.Count > 0; 35 | 36 | public void Reset() 37 | { 38 | DataFormat = DataFormat.Binary; 39 | 40 | if (BytesAreFilled) 41 | Bytes = Array.Empty(); 42 | 43 | if (ReferencedUnityObjectsAreFilled) 44 | ReferencedUnityObjects.Clear(); 45 | 46 | if (SerializationNodesAreFilled) 47 | SerializationNodes.Clear(); 48 | } 49 | } 50 | } -------------------------------------------------------------------------------- /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 ExtEvents.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/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 ExtEvents.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 | } -------------------------------------------------------------------------------- /Runtime/Events/ExtEvent`2.cs: -------------------------------------------------------------------------------- 1 | namespace ExtEvents 2 | { 3 | using System; 4 | using System.Runtime.CompilerServices; 5 | using JetBrains.Annotations; 6 | 7 | [Serializable] 8 | public class ExtEvent : BaseExtEvent 9 | { 10 | private readonly unsafe void*[] _arguments = new void*[2]; 11 | 12 | private Type[] _eventParamTypes; 13 | protected override Type[] EventParamTypes => _eventParamTypes ??= new Type[] { typeof(T1), typeof(T2) }; 14 | 15 | /// 16 | /// The dynamic listeners list that you can add your listener to. 17 | /// 18 | [PublicAPI] 19 | public event Action DynamicListeners; 20 | internal override Delegate _dynamicListeners => DynamicListeners; 21 | 22 | /// 23 | /// Invokes all listeners of the event. 24 | /// 25 | [PublicAPI] 26 | public void Invoke(T1 arg1, T2 arg2) 27 | { 28 | unsafe 29 | { 30 | _arguments[0] = Unsafe.AsPointer(ref arg1); 31 | _arguments[1] = Unsafe.AsPointer(ref arg2); 32 | 33 | // ReSharper disable once ForCanBeConvertedToForeach 34 | for (int index = 0; index < _persistentListeners.Length; index++) 35 | { 36 | _persistentListeners[index].Invoke(_arguments); 37 | } 38 | } 39 | 40 | DynamicListeners?.Invoke(arg1, arg2); 41 | } 42 | 43 | public static ExtEvent operator +(ExtEvent extEvent, Action listener) 44 | { 45 | if (extEvent == null) 46 | return null; 47 | 48 | extEvent.DynamicListeners += listener; 49 | return extEvent; 50 | } 51 | 52 | public static ExtEvent operator -(ExtEvent extEvent, Action listener) 53 | { 54 | if (extEvent == null) 55 | return null; 56 | 57 | extEvent.DynamicListeners -= listener; 58 | return extEvent; 59 | } 60 | } 61 | } -------------------------------------------------------------------------------- /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 ExtEvents.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/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 ExtEvents.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 a value indicating whether to allow non serializable types. (Types which are not decorated with .) 30 | /// 31 | /// 32 | /// true if serializable types are allowed; otherwise, false. 33 | /// 34 | bool AllowNonSerializableTypes { get; } 35 | 36 | /// 37 | /// Gets a value indicating whether a given should be serialized or not. 38 | /// 39 | /// The member to check. 40 | /// true if the given member should be serialized, otherwise, false. 41 | bool ShouldSerializeMember(MemberInfo member); 42 | } 43 | } -------------------------------------------------------------------------------- /OdinSerializer/Utilities/Extensions/StringExtensions.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 ExtEvents.OdinSerializer.Utilities 20 | { 21 | using System.Globalization; 22 | using System.Text; 23 | 24 | /// 25 | /// String method extensions. 26 | /// 27 | public static class StringExtensions 28 | { 29 | /// 30 | /// Eg MY_INT_VALUE => MyIntValue 31 | /// 32 | public static string ToTitleCase(this string input) 33 | { 34 | var builder = new StringBuilder(); 35 | for (int i = 0; i < input.Length; i++) 36 | { 37 | var current = input[i]; 38 | if (current == '_' && i + 1 < input.Length) 39 | { 40 | var next = input[i + 1]; 41 | if (char.IsLower(next)) 42 | { 43 | next = char.ToUpper(next, CultureInfo.InvariantCulture); 44 | } 45 | 46 | builder.Append(next); 47 | i++; 48 | } 49 | else 50 | { 51 | builder.Append(current); 52 | } 53 | } 54 | 55 | return builder.ToString(); 56 | } 57 | } 58 | } -------------------------------------------------------------------------------- /.gitattributes: -------------------------------------------------------------------------------- 1 | # 3D models 2 | *.3dm filter=lfs diff=lfs merge=lfs -text 3 | *.3ds filter=lfs diff=lfs merge=lfs -text 4 | *.blend filter=lfs diff=lfs merge=lfs -text 5 | *.c4d filter=lfs diff=lfs merge=lfs -text 6 | *.collada filter=lfs diff=lfs merge=lfs -text 7 | *.dae filter=lfs diff=lfs merge=lfs -text 8 | *.dxf filter=lfs diff=lfs merge=lfs -text 9 | *.fbx filter=lfs diff=lfs merge=lfs -text 10 | *.jas filter=lfs diff=lfs merge=lfs -text 11 | *.lws filter=lfs diff=lfs merge=lfs -text 12 | *.lxo filter=lfs diff=lfs merge=lfs -text 13 | *.ma filter=lfs diff=lfs merge=lfs -text 14 | *.max filter=lfs diff=lfs merge=lfs -text 15 | *.mb filter=lfs diff=lfs merge=lfs -text 16 | *.obj filter=lfs diff=lfs merge=lfs -text 17 | *.ply filter=lfs diff=lfs merge=lfs -text 18 | *.skp filter=lfs diff=lfs merge=lfs -text 19 | *.stl filter=lfs diff=lfs merge=lfs -text 20 | *.ztl filter=lfs diff=lfs merge=lfs -text 21 | # Audio 22 | *.aif filter=lfs diff=lfs merge=lfs -text 23 | *.aiff filter=lfs diff=lfs merge=lfs -text 24 | *.it filter=lfs diff=lfs merge=lfs -text 25 | *.mod filter=lfs diff=lfs merge=lfs -text 26 | *.mp3 filter=lfs diff=lfs merge=lfs -text 27 | *.ogg filter=lfs diff=lfs merge=lfs -text 28 | *.s3m filter=lfs diff=lfs merge=lfs -text 29 | *.wav filter=lfs diff=lfs merge=lfs -text 30 | *.xm filter=lfs diff=lfs merge=lfs -text 31 | # Fonts 32 | *.otf filter=lfs diff=lfs merge=lfs -text 33 | *.ttf filter=lfs diff=lfs merge=lfs -text 34 | # Images 35 | *.bmp filter=lfs diff=lfs merge=lfs -text 36 | *.exr filter=lfs diff=lfs merge=lfs -text 37 | *.gif filter=lfs diff=lfs merge=lfs -text 38 | *.hdr filter=lfs diff=lfs merge=lfs -text 39 | *.iff filter=lfs diff=lfs merge=lfs -text 40 | *.jpeg filter=lfs diff=lfs merge=lfs -text 41 | *.jpg filter=lfs diff=lfs merge=lfs -text 42 | *.pict filter=lfs diff=lfs merge=lfs -text 43 | *.psd filter=lfs diff=lfs merge=lfs -text 44 | *.tga filter=lfs diff=lfs merge=lfs -text 45 | *.tif filter=lfs diff=lfs merge=lfs -text 46 | *.tiff filter=lfs diff=lfs merge=lfs -text 47 | 48 | # Collapse Unity-generated files on GitHub 49 | *.asset linguist-generated 50 | *.mat linguist-generated 51 | *.meta linguist-generated 52 | *.prefab linguist-generated 53 | *.unity linguist-generated -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License modified with Commons Clause Restriction 2 | 3 | Copyright (c) 2021 SolidAlloy 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 | 23 | Commons Clause Restriction 24 | 25 | The Software is provided to you by the Licensor under the License, as defined below, subject to 26 | the following condition. 27 | Without limiting other conditions in the License, the grant of rights under the License will not 28 | include, and the License does not grant to you, the right to Sell the Software. 29 | For purposes of the foregoing, “Sell” means practicing any or all of the rights granted to you 30 | under the License to provide to third parties, for a fee or other consideration (including without 31 | limitation fees for hosting or consulting/ support services related to the Software), a product or 32 | service whose value derives, entirely or substantially, from the functionality of the Software. 33 | Any license notice or attribution required by the License must also include this Commons Cause 34 | License Condition notice. 35 | 36 | For purposes of the clause above, the “Licensor” is SolidAlloy, the “License” is the MIT License and the Software is the ExtEvents software provided with this 37 | notice. -------------------------------------------------------------------------------- /Runtime/Events/ExtEvent`3.cs: -------------------------------------------------------------------------------- 1 | namespace ExtEvents 2 | { 3 | using System; 4 | using System.Runtime.CompilerServices; 5 | using JetBrains.Annotations; 6 | 7 | [Serializable] 8 | public class ExtEvent : BaseExtEvent 9 | { 10 | private readonly unsafe void*[] _arguments = new void*[3]; 11 | 12 | private Type[] _eventParamTypes; 13 | protected override Type[] EventParamTypes => _eventParamTypes ??= new Type[] { typeof(T1), typeof(T2), typeof(T3) }; 14 | 15 | /// 16 | /// The dynamic listeners list that you can add your listener to. 17 | /// 18 | [PublicAPI] 19 | public event Action DynamicListeners; 20 | internal override Delegate _dynamicListeners => DynamicListeners; 21 | 22 | /// 23 | /// Invokes all listeners of the event. 24 | /// 25 | [PublicAPI] 26 | public void Invoke(T1 arg1, T2 arg2, T3 arg3) 27 | { 28 | unsafe 29 | { 30 | _arguments[0] = Unsafe.AsPointer(ref arg1); 31 | _arguments[1] = Unsafe.AsPointer(ref arg2); 32 | _arguments[2] = Unsafe.AsPointer(ref arg3); 33 | 34 | // ReSharper disable once ForCanBeConvertedToForeach 35 | for (int index = 0; index < _persistentListeners.Length; index++) 36 | { 37 | _persistentListeners[index].Invoke(_arguments); 38 | } 39 | } 40 | 41 | DynamicListeners?.Invoke(arg1, arg2, arg3); 42 | } 43 | 44 | public static ExtEvent operator +(ExtEvent extEvent, Action listener) 45 | { 46 | if (extEvent == null) 47 | return null; 48 | 49 | extEvent.DynamicListeners += listener; 50 | return extEvent; 51 | } 52 | 53 | public static ExtEvent operator -(ExtEvent extEvent, Action listener) 54 | { 55 | if (extEvent == null) 56 | return null; 57 | 58 | extEvent.DynamicListeners -= listener; 59 | return extEvent; 60 | } 61 | } 62 | } -------------------------------------------------------------------------------- /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 ExtEvents.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 name that the type has been bound to. 38 | public abstract string BindToName(Type type); 39 | 40 | /// 41 | /// Binds a name to a type. 42 | /// 43 | /// The name of the type to bind. 44 | /// The debug context to log to. 45 | /// The type that the name has been bound to, or null if the type could not be resolved. 46 | public abstract Type BindToType(string typeName, DebugContext debugContext = null); 47 | } 48 | } -------------------------------------------------------------------------------- /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 ExtEvents.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/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 ExtEvents.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 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/Core/FormatterLocators/ArrayFormatterLocator.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 ExtEvents.OdinSerializer; 20 | 21 | [assembly: RegisterFormatterLocator(typeof(ArrayFormatterLocator), -80)] 22 | 23 | namespace ExtEvents.OdinSerializer 24 | { 25 | using System; 26 | 27 | internal class ArrayFormatterLocator : IFormatterLocator 28 | { 29 | public bool TryGetFormatter(Type type, FormatterLocationStep step, ISerializationPolicy policy, out IFormatter formatter) 30 | { 31 | if (!type.IsArray) 32 | { 33 | formatter = null; 34 | return false; 35 | } 36 | 37 | if (type.GetArrayRank() == 1) 38 | { 39 | if (FormatterUtilities.IsPrimitiveArrayType(type.GetElementType())) 40 | { 41 | formatter = (IFormatter)Activator.CreateInstance(typeof(PrimitiveArrayFormatter<>).MakeGenericType(type.GetElementType())); 42 | } 43 | else 44 | { 45 | formatter = (IFormatter)Activator.CreateInstance(typeof(ArrayFormatter<>).MakeGenericType(type.GetElementType())); 46 | } 47 | } 48 | else 49 | { 50 | formatter = (IFormatter)Activator.CreateInstance(typeof(MultiDimensionalArrayFormatter<,>).MakeGenericType(type, type.GetElementType())); 51 | } 52 | 53 | return true; 54 | } 55 | } 56 | } -------------------------------------------------------------------------------- /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 ExtEvents.OdinSerializer; 20 | 21 | [assembly: RegisterFormatter(typeof(LayerMaskFormatter))] 22 | 23 | namespace ExtEvents.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 = 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 | IntSerializer.WriteValue(value.value, writer); 53 | } 54 | } 55 | } -------------------------------------------------------------------------------- /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 ExtEvents.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/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 ExtEvents.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/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 ExtEvents.OdinSerializer; 20 | 21 | [assembly: RegisterFormatter(typeof(TimeSpanFormatter))] 22 | 23 | namespace ExtEvents.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/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 ExtEvents.OdinSerializer; 20 | 21 | [assembly: RegisterFormatter(typeof(DateTimeFormatter))] 22 | 23 | namespace ExtEvents.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/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 ExtEvents.OdinSerializer; 20 | 21 | [assembly: RegisterFormatter(typeof(Vector2Formatter))] 22 | 23 | namespace ExtEvents.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 = FloatSerializer.ReadValue(reader); 43 | value.y = 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 | FloatSerializer.WriteValue(value.x, writer); 54 | FloatSerializer.WriteValue(value.y, writer); 55 | } 56 | } 57 | } -------------------------------------------------------------------------------- /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 ExtEvents.OdinSerializer; 20 | 21 | [assembly: RegisterFormatter(typeof(BoundsFormatter))] 22 | 23 | namespace ExtEvents.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/Utilities/Extensions/FieldInfoExtensions.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 ExtEvents.OdinSerializer.Utilities 20 | { 21 | using System; 22 | using System.Reflection; 23 | 24 | /// 25 | /// FieldInfo method extensions. 26 | /// 27 | public static class FieldInfoExtensions 28 | { 29 | /// 30 | /// Returns the original, backing field of an alias field if the field is an alias. 31 | /// 32 | /// The field to check. 33 | /// /// if set to true an exception will be thrown if the field is not aliased. 34 | /// 35 | /// The field was not aliased; this only occurs if throwOnNotAliased is true. 36 | public static FieldInfo DeAliasField(this FieldInfo fieldInfo, bool throwOnNotAliased = false) 37 | { 38 | MemberAliasFieldInfo aliasFieldInfo = fieldInfo as MemberAliasFieldInfo; 39 | 40 | if (aliasFieldInfo != null) 41 | { 42 | while (aliasFieldInfo.AliasedField is MemberAliasFieldInfo) 43 | { 44 | aliasFieldInfo = aliasFieldInfo.AliasedField as MemberAliasFieldInfo; 45 | } 46 | 47 | return aliasFieldInfo.AliasedField; 48 | } 49 | 50 | if (throwOnNotAliased) 51 | { 52 | throw new ArgumentException("The field " + fieldInfo.GetNiceName() + " was not aliased."); 53 | } 54 | 55 | return fieldInfo; 56 | } 57 | } 58 | } -------------------------------------------------------------------------------- /OdinSerializer/Unity Integration/UnitySerializationInitializer.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 ExtEvents.OdinSerializer 20 | { 21 | using UnityEditor; 22 | using UnityEngine; 23 | 24 | /// 25 | /// Utility class which initializes the Sirenix serialization system to be compatible with Unity. 26 | /// 27 | public static class UnitySerializationInitializer 28 | { 29 | private static readonly object LOCK = new object(); 30 | 31 | public static bool Initialized { get; private set; } 32 | 33 | /// 34 | /// Initializes the Sirenix serialization system to be compatible with Unity. 35 | /// 36 | private static void Initialize() 37 | { 38 | if (Initialized) 39 | return; 40 | 41 | lock (LOCK) 42 | { 43 | if (Initialized) 44 | return; 45 | 46 | try 47 | { 48 | if (!Application.isEditor) 49 | ArchitectureInfo.SetRuntimePlatform(Application.platform); 50 | } 51 | finally 52 | { 53 | Initialized = true; 54 | } 55 | } 56 | } 57 | 58 | [RuntimeInitializeOnLoadMethod(RuntimeInitializeLoadType.BeforeSceneLoad)] 59 | private static void InitializeRuntime() 60 | { 61 | Initialize(); 62 | } 63 | 64 | #if UNITY_EDITOR 65 | [InitializeOnLoadMethod] 66 | private static void InitializeEditor() 67 | { 68 | Initialize(); 69 | } 70 | #endif 71 | } 72 | } -------------------------------------------------------------------------------- /Editor/Settings/EditorPackageSettings.cs: -------------------------------------------------------------------------------- 1 | namespace ExtEvents.Editor 2 | { 3 | using UnityEditor; 4 | using UnityEditor.SettingsManagement; 5 | 6 | public static class EditorPackageSettings 7 | { 8 | public const float LinePadding = 2f; 9 | 10 | private static Settings _instance; 11 | 12 | private static UserSetting _nicifyArgumentNames; 13 | public static bool NicifyArgumentNames 14 | { 15 | get 16 | { 17 | InitializeIfNeeded(); 18 | return _nicifyArgumentNames.value; 19 | } 20 | 21 | set => _nicifyArgumentNames.value = value; 22 | } 23 | 24 | private static UserSetting _includeInternalMethods; 25 | public static bool IncludeInternalMethods 26 | { 27 | get 28 | { 29 | InitializeIfNeeded(); 30 | return _includeInternalMethods.value; 31 | } 32 | 33 | set => _includeInternalMethods.value = value; 34 | } 35 | 36 | private static UserSetting _includePrivateMethods; 37 | public static bool IncludePrivateMethods 38 | { 39 | get 40 | { 41 | InitializeIfNeeded(); 42 | return _includePrivateMethods.value; 43 | } 44 | 45 | set => _includePrivateMethods.value = value; 46 | } 47 | 48 | private static UserSetting _buildCallbackOrder; 49 | public static int BuildCallbackOrder 50 | { 51 | get 52 | { 53 | InitializeIfNeeded(); 54 | return _buildCallbackOrder.value; 55 | } 56 | 57 | set => _buildCallbackOrder.value = value; 58 | } 59 | 60 | private static void InitializeIfNeeded() 61 | { 62 | if (_instance != null) 63 | return; 64 | 65 | _instance = new Settings(PackageSettings.PackageName); 66 | 67 | _nicifyArgumentNames = new UserSetting(_instance, nameof(_nicifyArgumentNames), true, SettingsScope.User); 68 | _includeInternalMethods = new UserSetting(_instance, nameof(_includeInternalMethods), false, SettingsScope.Project); 69 | _includePrivateMethods = new UserSetting(_instance, nameof(_includePrivateMethods), false, SettingsScope.Project); 70 | _buildCallbackOrder = new UserSetting(_instance, nameof(_buildCallbackOrder), 0, SettingsScope.Project); 71 | } 72 | } 73 | } -------------------------------------------------------------------------------- /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 ExtEvents.OdinSerializer; 20 | 21 | [assembly: RegisterFormatter(typeof(GradientAlphaKeyFormatter))] 22 | 23 | namespace ExtEvents.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 = FloatSerializer.ReadValue(reader); 43 | value.time = 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 | FloatSerializer.WriteValue(value.alpha, writer); 54 | FloatSerializer.WriteValue(value.time, writer); 55 | } 56 | } 57 | } -------------------------------------------------------------------------------- /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 ExtEvents.OdinSerializer; 20 | 21 | [assembly: RegisterFormatter(typeof(DateTimeOffsetFormatter))] 22 | 23 | namespace ExtEvents.OdinSerializer 24 | { 25 | using System; 26 | using System.Globalization; 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/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 ExtEvents.OdinSerializer; 20 | 21 | [assembly: RegisterFormatter(typeof(Vector3Formatter))] 22 | 23 | namespace ExtEvents.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 = FloatSerializer.ReadValue(reader); 43 | value.y = FloatSerializer.ReadValue(reader); 44 | value.z = 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 | FloatSerializer.WriteValue(value.x, writer); 55 | FloatSerializer.WriteValue(value.y, writer); 56 | FloatSerializer.WriteValue(value.z, writer); 57 | } 58 | } 59 | } --------------------------------------------------------------------------------