)Sort, true
74 | });
75 | }
76 |
77 | return item;
78 | }
79 |
80 | private int Sort(AdvancedDropdownItem a, AdvancedDropdownItem b)
81 | {
82 | // For aesthetic reasons. Always puts the None first
83 | if (a is NoneDropdownItem)
84 | return -1;
85 | if (b is NoneDropdownItem)
86 | return 1;
87 |
88 | int childrenA = a.children.Count();
89 | int childrenB = b.children.Count();
90 |
91 | if (childrenA > 0 && childrenB > 0)
92 | return a.CompareTo(b);
93 | if (childrenA == 0 && childrenB == 0)
94 | return a.CompareTo(b);
95 | if (childrenA > 0 && childrenB == 0)
96 | return -1;
97 | return 1;
98 | }
99 |
100 | ///
101 | protected override void ItemSelected(AdvancedDropdownItem item)
102 | {
103 | if (item is IDropdownItem dropdownItem)
104 | {
105 | ItemSelectedEvent?.Invoke(property, dropdownItem.Mode, dropdownItem.GetValue());
106 | }
107 | }
108 | }
109 | }
110 |
--------------------------------------------------------------------------------
/Editor/Utilities/SerializableInterfaceAdvancedDropdown.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 440229d607e04089916ebda621c36108
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {instanceID: 0}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/Editor/Utilities/SerializedPropertyExtensions.cs:
--------------------------------------------------------------------------------
1 | using UnityEditor;
2 |
3 | namespace TNRD.Utilities
4 | {
5 | internal static class SerializedPropertyExtensions
6 | {
7 | public static SerializedProperty ReferenceModeProperty(this SerializedProperty property)
8 | {
9 | return property.FindPropertyRelative("mode");
10 | }
11 |
12 | public static SerializedProperty RawReferenceProperty(this SerializedProperty property)
13 | {
14 | return property.FindPropertyRelative("rawReference");
15 | }
16 |
17 | public static SerializedProperty UnityReferenceProperty(this SerializedProperty property)
18 | {
19 | return property.FindPropertyRelative("unityReference");
20 | }
21 | }
22 | }
23 |
--------------------------------------------------------------------------------
/Editor/Utilities/SerializedPropertyExtensions.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 8bfd876a31f9470b802c64d4f1a8dd37
3 | timeCreated: 1658567318
--------------------------------------------------------------------------------
/Editor/Utilities/SerializedPropertyUtilities.cs:
--------------------------------------------------------------------------------
1 | // Sourced from: https://github.com/dbrizov/NaughtyAttributes
2 |
3 | // MIT License
4 | //
5 | // Copyright (c) 2017 Denis Rizov
6 | //
7 | // Permission is hereby granted, free of charge, to any person obtaining a copy
8 | // of this software and associated documentation files (the "Software"), to deal
9 | // in the Software without restriction, including without limitation the rights
10 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
11 | // copies of the Software, and to permit persons to whom the Software is
12 | // furnished to do so, subject to the following conditions:
13 | //
14 | // The above copyright notice and this permission notice shall be included in all
15 | // copies or substantial portions of the Software.
16 | //
17 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
18 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
19 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
20 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
21 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
22 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
23 | // SOFTWARE.
24 |
25 | using System;
26 | using System.Collections;
27 | using System.Reflection;
28 | using UnityEditor;
29 |
30 | namespace TNRD.Utilities
31 | {
32 | public static class SerializedPropertyUtilities
33 | {
34 | ///
35 | /// Gets the value of a serialized property
36 | ///
37 | /// The property to get the value from
38 | public static object GetValue(SerializedProperty property)
39 | {
40 | string path = property.propertyPath.Replace(".Array.data[", "[");
41 | object targetObject = property.serializedObject.targetObject;
42 | string[] elements = path.Split('.');
43 |
44 | for (int i = 0; i < elements.Length; i++)
45 | {
46 | string element = elements[i];
47 | if (element.Contains("["))
48 | {
49 | string elementName = element.Substring(0, element.IndexOf("[", StringComparison.OrdinalIgnoreCase));
50 | int index = Convert.ToInt32(element
51 | .Substring(element.IndexOf("[", StringComparison.OrdinalIgnoreCase))
52 | .Replace("[", string.Empty)
53 | .Replace("]", string.Empty));
54 | targetObject = GetValue(targetObject, elementName, index);
55 | }
56 | else
57 | {
58 | targetObject = GetValue(targetObject, element);
59 | }
60 | }
61 |
62 | return targetObject;
63 | }
64 |
65 | private static object GetValue(object source, string name, int index)
66 | {
67 | IEnumerable enumerable = GetValue(source, name) as IEnumerable;
68 | if (enumerable == null)
69 | return null;
70 |
71 | IEnumerator enumerator = enumerable.GetEnumerator();
72 | for (int i = 0; i <= index; i++)
73 | {
74 | if (!enumerator.MoveNext())
75 | return null;
76 | }
77 |
78 | return enumerator.Current;
79 | }
80 |
81 | private static object GetValue(object source, string name)
82 | {
83 | if (source == null)
84 | return null;
85 |
86 | const BindingFlags fieldFlags = BindingFlags.NonPublic | BindingFlags.Public | BindingFlags.Instance;
87 | const BindingFlags propertyFlags = fieldFlags | BindingFlags.IgnoreCase;
88 |
89 | Type type = source.GetType();
90 |
91 | while (type != null)
92 | {
93 | FieldInfo field = type.GetField(name, fieldFlags);
94 | if (field != null)
95 | return field.GetValue(source);
96 |
97 | PropertyInfo property = type.GetProperty(name, propertyFlags);
98 | if (property != null)
99 | return property.GetValue(source, null);
100 |
101 | type = type.BaseType;
102 | }
103 |
104 | return null;
105 | }
106 | }
107 | }
108 |
--------------------------------------------------------------------------------
/Editor/Utilities/SerializedPropertyUtilities.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: f7fcc0e7c5504e3bb618048c0dad4572
3 | timeCreated: 1662755656
--------------------------------------------------------------------------------
/LICENSE.md:
--------------------------------------------------------------------------------
1 | MIT License
2 |
3 | Copyright (c) 2022 Christiaan Bloemendaal
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 |
--------------------------------------------------------------------------------
/LICENSE.md.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 75e1809be1e1aa44798912be71555951
3 | TextScriptImporter:
4 | externalObjects: {}
5 | userData:
6 | assetBundleName:
7 | assetBundleVariant:
8 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # Serializable Interface
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 | A wrapper that allows you to serialize interfaces. Both UnityEngine.Object and regular object implementers work!
18 |
19 | ## Installation
20 | 1. The package is available on the [openupm registry](https://openupm.com). You can install it via [openupm-cli](https://github.com/openupm/openupm-cli).
21 | ```
22 | openupm add net.tnrd.serializableinterface
23 | ```
24 |
25 | 2. Installing through a [Unity Package](http://package-installer.glitch.me/v1/installer/package.openupm.com/net.tnrd.serializableinterface?registry=https://package.openupm.com) created by the [Package Installer Creator](https://package-installer.glitch.me) from [Needle](https://needle.tools)
26 |
27 | [
](http://package-installer.glitch.me/v1/installer/package.openupm.com/net.tnrd.serializableinterface?registry=https://package.openupm.com)
28 |
29 | ## Usage
30 |
31 | Usage is pretty easy and straightforward. Assuming you have the following interface
32 | ```c#
33 | public interface IMyInterface
34 | {
35 | void Greet();
36 | }
37 | ```
38 |
39 | You can add it to a behaviour like so
40 | ```c#
41 | using TNRD;
42 | using UnityEngine;
43 |
44 | public class MyBehaviour : MonoBehaviour
45 | {
46 | [SerializeField] private SerializableInterface mySerializableInterface;
47 |
48 | private void Awake()
49 | {
50 | mySerializableInterface.Value.Greet();
51 | }
52 | }
53 | ```
54 |
55 | Back in the Unity inspector it will look like this
56 |
57 | 
58 |
59 | And when you click on the object selector button you will be shown a dropdown window with all possible options like this
60 |
61 | 
62 |
63 | As you can see you can select items from multiple locations:
64 | - Assets (Scriptable Objects and Prefabs that implement said interface)
65 | - Classes (custom classes that implement said interface)
66 | - Scene (objects in the scene that implement said interface)
67 |
68 | For the sake of example for the image above I have created some simple implementations
69 |
70 | ```c#
71 | using UnityEngine;
72 |
73 | public class MyComponent : MonoBehaviour, IMyInterface
74 | {
75 | ///
76 | public void Greet()
77 | {
78 | Debug.Log("Hello, World! I'm MyComponent");
79 | }
80 | }
81 | ```
82 |
83 | ```c#
84 | using UnityEngine;
85 |
86 | public class MyPoco : IMyInterface
87 | {
88 | ///
89 | public void Greet()
90 | {
91 | Debug.Log("Hello, World! I'm MyPoco");
92 | }
93 | }
94 | ```
95 |
96 | ```c#
97 | using UnityEngine;
98 |
99 | [CreateAssetMenu(menuName = "MyScriptable")]
100 | public class MyScriptable : ScriptableObject, IMyInterface
101 | {
102 | ///
103 | public void Greet()
104 | {
105 | Debug.Log("Hello, World! I'm MyScriptable");
106 | }
107 | }
108 | ```
109 |
110 |
111 | ## Support
112 | **Serializable Interface** is a small and open-source utility that I hope helps other people. It is by no means necessary but if you feel generous you can support me by donating.
113 |
114 | [](https://ko-fi.com/J3J11GEYY)
115 |
116 | ## Contributions
117 | Pull requests are welcomed. Please feel free to fix any issues you find, or add new features.
118 |
119 |
--------------------------------------------------------------------------------
/README.md.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: ac9e779fcbb3c1e4f81f7c57ffad0237
3 | TextScriptImporter:
4 | externalObjects: {}
5 | userData:
6 | assetBundleName:
7 | assetBundleVariant:
8 |
--------------------------------------------------------------------------------
/Runtime.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 76d3bf49cef9d564c99d96e38ba3c801
3 | folderAsset: yes
4 | DefaultImporter:
5 | externalObjects: {}
6 | userData:
7 | assetBundleName:
8 | assetBundleVariant:
9 |
--------------------------------------------------------------------------------
/Runtime/AssemblyInfo.cs:
--------------------------------------------------------------------------------
1 | using System.Runtime.CompilerServices;
2 |
3 | [assembly: InternalsVisibleTo("TNRD.SerializableInterface.Editor")]
4 |
--------------------------------------------------------------------------------
/Runtime/AssemblyInfo.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: bba409c4670e4b438882fb02c9cd6911
3 | timeCreated: 1650800163
--------------------------------------------------------------------------------
/Runtime/Extensions.cs:
--------------------------------------------------------------------------------
1 | using System.Collections.Generic;
2 | using System.Linq;
3 | using UnityEngine;
4 |
5 | namespace TNRD
6 | {
7 | public static class Extensions
8 | {
9 | ///
10 | /// Checks to see if the containing value is valid and returns it through the out parameter if so
11 | ///
12 | ///
13 | /// The containing value, if valid
14 | /// True if the containing value is valid, false if not
15 | public static bool IsDefined(
16 | this SerializableInterface serializableInterface,
17 | out TInterface value
18 | )
19 | where TInterface : class
20 | {
21 | if (serializableInterface == null)
22 | {
23 | value = default;
24 | return false;
25 | }
26 |
27 | if (EqualityComparer.Default.Equals(serializableInterface.Value, default))
28 | {
29 | value = default;
30 | return false;
31 | }
32 |
33 | value = serializableInterface.Value;
34 | return true;
35 | }
36 |
37 | ///
38 | public static bool TryGetValue(
39 | this SerializableInterface serializableInterface,
40 | out TInterface value
41 | )
42 | where TInterface : class
43 | {
44 | return IsDefined(serializableInterface, out value);
45 | }
46 |
47 | ///
48 | /// Convert a IEnumerable of Interfaces to a List of SerializableInterfaces
49 | ///
50 | public static List> ToSerializableInterfaceList(this IEnumerable list) where T : class
51 | {
52 | return list.Select(e => new SerializableInterface(e)).ToList();
53 | }
54 |
55 | ///
56 | /// Convert a IEnumerable of Interfaces to an Array of SerializableInterfaces
57 | ///
58 | public static SerializableInterface[] ToSerializableInterfaceArray(this IEnumerable list) where T : class
59 | {
60 | return list.Select(e => new SerializableInterface(e)).ToArray();
61 | }
62 |
63 | public static TInterface Instantiate(this SerializableInterface serializableInterface) where TInterface : class
64 | {
65 | if (!serializableInterface.TryGetObject(out Object unityObject))
66 | {
67 | throw new System.Exception($"Cannot instantiate {serializableInterface} because it's has no reference of type UnityEngine.Object");
68 | }
69 |
70 | Object instantiatedObject = Object.Instantiate(unityObject);
71 |
72 | return GetInterfaceReference(instantiatedObject);
73 | }
74 |
75 | public static TInterface Instantiate(this SerializableInterface serializableInterface, Transform parent) where TInterface : class
76 | {
77 | if (!serializableInterface.TryGetObject(out Object unityObject))
78 | {
79 | throw new System.Exception($"Cannot instantiate {serializableInterface} because it's has no reference of type UnityEngine.Object");
80 | }
81 |
82 | Object instantiatedObject = Object.Instantiate(unityObject, parent);
83 |
84 | return GetInterfaceReference(instantiatedObject);
85 | }
86 |
87 | public static TInterface Instantiate(this SerializableInterface serializableInterface, Vector3 position, Quaternion rotation) where TInterface : class
88 | {
89 | if (!serializableInterface.TryGetObject(out Object unityObject))
90 | {
91 | throw new System.Exception($"Cannot instantiate {serializableInterface} because it's has no reference of type UnityEngine.Object");
92 | }
93 |
94 | Object instantiatedObject = Object.Instantiate(unityObject, position, rotation);
95 |
96 | return GetInterfaceReference(instantiatedObject);
97 | }
98 |
99 | public static TInterface Instantiate(this SerializableInterface serializableInterface, Vector3 position, Quaternion rotation, Transform parent) where TInterface : class
100 | {
101 | if (!serializableInterface.TryGetObject(out Object unityObject))
102 | {
103 | throw new System.Exception($"Cannot instantiate {serializableInterface} because it's has no reference of type UnityEngine.Object");
104 | }
105 |
106 | Object instantiatedObject = Object.Instantiate(unityObject, position, rotation, parent);
107 |
108 | return GetInterfaceReference(instantiatedObject);
109 | }
110 |
111 | private static TInterface GetInterfaceReference(Object instantiatedObject) where TInterface : class
112 | {
113 | if (instantiatedObject is GameObject gameObject)
114 | return gameObject.TryGetComponent(out TInterface component) ? component : null;
115 |
116 | return instantiatedObject as TInterface;
117 | }
118 | }
119 | }
120 |
--------------------------------------------------------------------------------
/Runtime/Extensions.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 77acf133582b451fa1cea3bb60b48dc6
3 | timeCreated: 1659443598
--------------------------------------------------------------------------------
/Runtime/ISerializableInterface.cs:
--------------------------------------------------------------------------------
1 | namespace TNRD
2 | {
3 | internal interface ISerializableInterface
4 | {
5 | internal object GetRawReference();
6 | }
7 | }
8 |
--------------------------------------------------------------------------------
/Runtime/ISerializableInterface.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 1e25825de5b944799b7209f3d1f061e4
3 | timeCreated: 1650975186
--------------------------------------------------------------------------------
/Runtime/ReferenceMode.cs:
--------------------------------------------------------------------------------
1 | namespace TNRD
2 | {
3 | internal enum ReferenceMode
4 | {
5 | Unity,
6 | Raw
7 | }
8 | }
9 |
--------------------------------------------------------------------------------
/Runtime/ReferenceMode.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 3f83fb44261d4082b2a93b1b064d7a8e
3 | timeCreated: 1650737480
--------------------------------------------------------------------------------
/Runtime/SerializableInterface.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using JetBrains.Annotations;
3 | using UnityEngine;
4 |
5 | namespace TNRD
6 | {
7 | ///
8 | /// A wrapper around an interface that supports serialization for both UnityEngine.Object and regular object types
9 | ///
10 | /// The type of the interface you want to serialize
11 | [Serializable]
12 | public class SerializableInterface : ISerializableInterface where TInterface : class
13 | {
14 | [HideInInspector, SerializeField] private ReferenceMode mode = ReferenceMode.Unity;
15 | [HideInInspector, SerializeField] private UnityEngine.Object unityReference;
16 | [SerializeReference, UsedImplicitly] private object rawReference;
17 |
18 | public SerializableInterface()
19 | {
20 | }
21 |
22 | public SerializableInterface(TInterface value)
23 | {
24 | Value = value;
25 | }
26 |
27 | public TInterface Value
28 | {
29 | get
30 | {
31 | return mode switch
32 | {
33 | ReferenceMode.Raw => rawReference as TInterface,
34 | ReferenceMode.Unity => (object)unityReference as TInterface,
35 | _ => throw new ArgumentOutOfRangeException()
36 | };
37 | }
38 | set
39 | {
40 | if (value is UnityEngine.Object unityObject)
41 | {
42 | rawReference = null;
43 | unityReference = unityObject;
44 | mode = ReferenceMode.Unity;
45 | }
46 | else
47 | {
48 | unityReference = null;
49 | rawReference = value;
50 | mode = ReferenceMode.Raw;
51 | }
52 | }
53 | }
54 |
55 | ///
56 | object ISerializableInterface.GetRawReference()
57 | {
58 | return rawReference;
59 | }
60 |
61 | public bool TryGetObject(out UnityEngine.Object unityObject)
62 | {
63 | unityObject = null;
64 | if (mode != ReferenceMode.Unity) return false;
65 |
66 | unityObject = unityReference;
67 | return true;
68 | }
69 | }
70 | }
71 |
--------------------------------------------------------------------------------
/Runtime/SerializableInterface.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 2f2ee52b6de249dfa199b767a2a777ac
3 | timeCreated: 1650737442
--------------------------------------------------------------------------------
/Runtime/TNRD.SerializableInterface.asmdef:
--------------------------------------------------------------------------------
1 | {
2 | "name": "TNRD.SerializableInterface",
3 | "rootNamespace": "TNRD",
4 | "references": [],
5 | "includePlatforms": [],
6 | "excludePlatforms": [],
7 | "allowUnsafeCode": false,
8 | "overrideReferences": false,
9 | "precompiledReferences": [],
10 | "autoReferenced": true,
11 | "defineConstraints": [],
12 | "versionDefines": [],
13 | "noEngineReferences": false
14 | }
--------------------------------------------------------------------------------
/Runtime/TNRD.SerializableInterface.asmdef.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 23eed6c2401dca1419d1ebd180e58c5a
3 | AssemblyDefinitionImporter:
4 | externalObjects: {}
5 | userData:
6 | assetBundleName:
7 | assetBundleVariant:
8 |
--------------------------------------------------------------------------------
/Samples~/SourceGeneration/SerializableInterfaceSourceGeneration.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Thundernerd/Unity3D-SerializableInterface/71df240ccbb4f8fce73155336cf7c249d1c3bb44/Samples~/SourceGeneration/SerializableInterfaceSourceGeneration.dll
--------------------------------------------------------------------------------
/Samples~/SourceGeneration/SerializableInterfaceSourceGeneration.dll.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 4ac13508a171e574ca523db3ef4cde8c
3 | labels:
4 | - RoslynAnalyzer
5 | - RunOnlyOnAssembliesWithReference
6 | - SourceGenerator
7 | PluginImporter:
8 | externalObjects: {}
9 | serializedVersion: 2
10 | iconMap: {}
11 | executionOrder: {}
12 | defineConstraints: []
13 | isPreloaded: 0
14 | isOverridable: 0
15 | isExplicitlyReferenced: 0
16 | validateReferences: 1
17 | platformData:
18 | - first:
19 | : Any
20 | second:
21 | enabled: 0
22 | settings:
23 | Exclude Editor: 1
24 | Exclude Linux64: 1
25 | Exclude OSXUniversal: 1
26 | Exclude Win: 1
27 | Exclude Win64: 1
28 | - first:
29 | Any:
30 | second:
31 | enabled: 0
32 | settings: {}
33 | - first:
34 | Editor: Editor
35 | second:
36 | enabled: 0
37 | settings:
38 | CPU: AnyCPU
39 | DefaultValueInitialized: true
40 | OS: AnyOS
41 | - first:
42 | Standalone: Linux64
43 | second:
44 | enabled: 0
45 | settings:
46 | CPU: None
47 | - first:
48 | Standalone: OSXUniversal
49 | second:
50 | enabled: 0
51 | settings:
52 | CPU: None
53 | - first:
54 | Standalone: Win
55 | second:
56 | enabled: 0
57 | settings:
58 | CPU: None
59 | - first:
60 | Standalone: Win64
61 | second:
62 | enabled: 0
63 | settings:
64 | CPU: None
65 | - first:
66 | Windows Store Apps: WindowsStoreApps
67 | second:
68 | enabled: 0
69 | settings:
70 | CPU: AnyCPU
71 | userData:
72 | assetBundleName:
73 | assetBundleVariant:
74 |
--------------------------------------------------------------------------------
/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "net.tnrd.serializableinterface",
3 | "version": "2.2.1",
4 | "displayName": "Serializable Interface",
5 | "unity": "2021.1",
6 | "description": "A wrapper that allows serialization of interfaces that supports both UnityEngine.Object and regular object types",
7 | "keywords": [
8 | "serialize",
9 | "interface",
10 | "poco",
11 | "serialization"
12 | ],
13 | "author": {
14 | "name": "TNRD",
15 | "url": "https://www.tnrd.net"
16 | },
17 | "samples": [
18 | {
19 | "displayName": "Source Generation",
20 | "description": "Contains a dll that will allow you to use source generation",
21 | "path": "Samples~/SourceGeneration"
22 | }
23 | ]
24 | }
25 |
--------------------------------------------------------------------------------
/package.json.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: d5a8f3cf891464444b01862d463b5cde
3 | PackageManifestImporter:
4 | externalObjects: {}
5 | userData:
6 | assetBundleName:
7 | assetBundleVariant:
8 |
--------------------------------------------------------------------------------