示例#1
0
文件: Root.cs 项目: coolape/mibao
        public override void Deserialize(Hashtable map)
        {
                        #if UNITY_EDITOR
            base.Deserialize(map);
            begainIndex = MapEx.getInt(map, "begainIndex");
            maxIndex    = MapEx.getInt(map, "maxIndex");

            string actionClass = MapEx.getString(map, "actionClass");
            if (string.IsNullOrEmpty(actionClass))
            {
                monoScript = null;
            }
            else
            {
                monoScript = AssetDatabase.LoadAssetAtPath(actionClass, typeof(MonoScript)) as MonoScript;
                if (monoScript != null)
                {
                    Type tp = monoScript.GetClass();
                    attr = Activator.CreateInstance(tp) as ActionBase;
                    if (attr != null)
                    {
                        attr.Deserialize(MapEx.getMap(map, "attr"));
                    }
                }
            }
                        #endif
        }