Example #1
0
        /// <summary>
        /// Returns the Preferences scriptable object (.asset file).
        /// </summary>
        /// <returns></returns>
        public static RecycleBinPreferences GetRecycleBinPreferences()
        {
            List <RecycleBinPreferences> prefs = ScriptableObjectUtility.FindAssetsByType <RecycleBinPreferences>();

            //Multiple instances?
            if (prefs.Count >= 1)
            {
                return(prefs[0]);
            }
            else
            {
                string unusedReturnsPath;
                return(RecycleBinPreferences.Create(out unusedReturnsPath));
            }
        }