void OnEnable()
 {
     titleContent.text = Title;
     _fileName         = ProjectPrefs.GetString(TargetFileKey, DefaultFileName);
     _nsName           = ProjectPrefs.GetString(NamespaceKey, DefaultNamespace);
     _options          = (Options)ProjectPrefs.GetInt(OptionsKey, (int)DefaultOptions);
 }
 void Load()
 {
     try {
         _items = _serializer.Deserialize <List <RecordInfo> > (ProjectPrefs.GetString(ProjectPrefsKey, "{}"));
         if (_items == null)
         {
             throw new Exception();
         }
     } catch {
         _items = new List <RecordInfo> ();
     }
 }
Exemple #3
0
 void OnEnable()
 {
     titleContent.text = Title;
     _settings         = null;
     try {
         _settings = _serializer.Deserialize <GenerationSettings> (ProjectPrefs.GetString(SettingsKey));
     } catch { }
     if (_settings == null)
     {
         _settings = new GenerationSettings();
     }
 }
 static void LoadInfo()
 {
     try {
         _allDescs = Singleton.Get <JsonSerialization> ()
                     .Deserialize <Dictionary <string, FolderIconDesc> > (
             ProjectPrefs.GetString(StorageKey, "{}"));
         if (_allDescs == null)
         {
             throw new Exception();
         }
     } catch {
         _allDescs = new Dictionary <string, FolderIconDesc> ();
     }
 }
Exemple #5
0
 void Load()
 {
     try {
         _paths = Singleton.Get <JsonSerialization> ()
                  .Deserialize <Dictionary <string, string> > (
             ProjectPrefs.GetString(ProjectPrefsKey, string.Empty));
         if (_paths == null)
         {
             throw new Exception();
         }
     } catch {
         _paths = new Dictionary <string, string> ();
     }
 }
Exemple #6
0
        protected override void Load()
        {
            var pinned = ProjectPrefs.GetString(PinnedPrefsKey);

            if (string.IsNullOrEmpty(pinned))
            {
                return;
            }

            pinnedObject = pinned
                           .Split(',')
                           .Select(x => AssetDatabase.GUIDToAssetPath(x))
                           .Select(x => AssetDatabase.LoadAssetAtPath <Object>(x))
                           .Where(x => x != null)
                           .ToList();
        }
Exemple #7
0
        protected override void Load()
        {
            currentScene = SceneManager.GetActiveScene();

            var pinned = ProjectPrefs.GetString(PinnedPrefsKey);

            if (string.IsNullOrEmpty(pinned))
            {
                return;
            }

            // Hierarchy上のGameObjectを検索して取得.
            var hierarchyObjects = UnityEditorUtility.FindAllObjectsInHierarchy();

            pinnedObject = pinned
                           .Split(',')
                           .Select(x => hierarchyObjects.FirstOrDefault(y => LocalIdentifierInFile.Get(y).ToString() == x) as Object)
                           .Where(x => x != null)
                           .ToList();

            UpdatePinnedObjectIds();
        }
 void OnEnable()
 {
     titleContent.text = Title;
     _settings         = null;
     try {
         _settings = Service <JsonSerialization> .Get().Deserialize <BuildSettings> (ProjectPrefs.GetString(SettingsKey));
     } catch { }
     if (_settings == null)
     {
         _settings = new BuildSettings();
     }
 }