Neodroid  0.2.0
Machine Learning Environment Prototyping Tool
SerializableDictionaryDrawerImplementations.cs
Go to the documentation of this file.
1 using UnityEditor;
2 #if UNITY_EDITOR
3 using UnityEngine;
4 
5 namespace droid.Runtime.Utilities.ScriptableObjects.SerialisableDictionary {
6  [CustomPropertyDrawer(typeof(StringIntDictionary))]
7  public class StringIntDictionaryDrawer : SerializableDictionaryDrawer<string, int> {
8  protected override SerializableKeyValueTemplate<string, int> GetTemplate() {
9  return this.GetGenericTemplate<SerializableStringIntTemplate>();
10  }
11  }
12 
13  class SerializableStringIntTemplate : SerializableKeyValueTemplate<string, int> { }
14 
15  [CustomPropertyDrawer(typeof(GameObjectFloatDictionary))]
16  public class GameObjectFloatDictionaryDrawer : SerializableDictionaryDrawer<GameObject, float> {
17  protected override SerializableKeyValueTemplate<GameObject, float> GetTemplate() {
18  return this.GetGenericTemplate<SerializableGameObjectFloatTemplate>();
19  }
20  }
21 
22  class SerializableGameObjectFloatTemplate : SerializableKeyValueTemplate<GameObject, float> { }
23 
24  [CustomPropertyDrawer(typeof(StringGameObjectDictionary))]
25  public class StringGameObjectDictionaryDrawer : SerializableDictionaryDrawer<string, GameObject> {
26  protected override SerializableKeyValueTemplate<string, GameObject> GetTemplate() {
27  return this.GetGenericTemplate<SerializableStringGameObjectTemplate>();
28  }
29  }
30 
31  class SerializableStringGameObjectTemplate : SerializableKeyValueTemplate<string, GameObject> { }
32 }
33 #endif