Example #1
0
        //TODO Maybe we can store type infos in BuildInfoTreeView instead of on each individual element, might be performance heavy

        //Store serializable string so we can retrieve type after serialization
        public void OnBeforeSerialize()
        {
            if (assetType != null)
            {
                assetTypeSerialized = Heureka_Serializer.SerializeType(assetType);
            }
        }
Example #2
0
 //Set type from serialized property
 public void OnAfterDeserialize()
 {
     if (!string.IsNullOrEmpty(AssetTypeSerialized))
     {
         this.assetType = Heureka_Serializer.DeSerializeType(AssetTypeSerialized);
         //assetTypeSerialized = "";
     }
 }
Example #3
0
        internal static List <string> GetStoredIconTypes()
        {
            List <string> iconTypesSerialized = new List <string>();

            foreach (var item in iconDictionary)
            {
                iconTypesSerialized.Add(Heureka_Serializer.SerializeType(item.Key));
            }
            return(iconTypesSerialized);
        }
Example #4
0
 internal static void UpdateIconDictAfterSerialization(List <string> serializationHelperListIconTypes, List <Texture> serializationHelperListIconTextures)
 {
     iconDictionary = new Dictionary <Type, Texture>();
     for (int i = 0; i < serializationHelperListIconTypes.Count; i++)
     {
         Type deserializedType = Heureka_Serializer.DeSerializeType(serializationHelperListIconTypes[i]);
         if (deserializedType != null)
         {
             iconDictionary.Add(Heureka_Serializer.DeSerializeType(serializationHelperListIconTypes[i]), serializationHelperListIconTextures[i]);
         }
     }
 }
Example #5
0
 private string getIdentifier(string path, out Type assetType)
 {
     assetType = AssetDatabase.GetMainAssetTypeAtPath(path);
     if (assetType != null)
     {
         return(Heureka_Serializer.SerializeType(assetType));
     }
     else
     {
         return("");
     }
 }
Example #6
0
        //Return the type tostring instead of the fully qualified type identifier
        protected override string getLabelContent(string item)
        {
            Type deserializedType = Heureka_Serializer.DeSerializeType(base.getLabelContent(item));

            if (deserializedType != null)
            {
                return(deserializedType.ToString());
            }
            //The Ignored type does no longer exist in project
            else
            {
                return("Unrecognized type : " + item);
            }
        }
Example #7
0
 public IgnoreListEventArgs(Type item)
 {
     this.Item = Heureka_Serializer.SerializeType(item);
 }
Example #8
0
 //Call base constructor but convert the types into serializable values
 public AH_ExclusionTypeList(AH_IIgnoreListActions exclusionAction, List <Type> Ignored, string playerPrefsKey) : base(exclusionAction, Ignored.ConvertAll <string>(val => Heureka_Serializer.SerializeType(val)), playerPrefsKey)
 {
 }