Exemple #1
0
        static void LoadFavourites()
        {
            if (_favouritesContainer == null)
            {
                _favouritesContainer = CreateInstance <FavouritesContainer>();
            }

            _favouritesContainer.assets       = EditorPrefsUtils.GetAssetList("FavouriteAssets", new List <Object>());
            _favouritesContainer.folders      = EditorPrefsUtils.GetAssetList("FavouriteFolders", new List <Object>()).Cast <DefaultAsset>().ToList();
            _favouritesContainer.sceneObjects = EditorPrefsUtils.GetAssetList("FavouriteObjects", new List <Object>()).Cast <MonoScript>().ToList();
        }
Exemple #2
0
 static void SaveFavourites()
 {
     EditorPrefsUtils.SetAssetList("FavouriteAssets", _favouritesContainer.assets);
     EditorPrefsUtils.SetAssetList("FavouriteFolders", _favouritesContainer.folders.Cast <Object>().ToList());
     EditorPrefsUtils.SetAssetList("FavouriteObjects", _favouritesContainer.sceneObjects.Cast <Object>().ToList());
 }