Borodar.RainbowFolders.Editor.Settings.RainbowFolder.HasAtLeastOneIcon C# (CSharp) Method

HasAtLeastOneIcon() public method

public HasAtLeastOneIcon ( ) : bool
return bool
        public bool HasAtLeastOneIcon()
        {
            return SmallIcon != null || LargeIcon != null;
        }

Usage Example

        /// <summary>
        /// Searches for a folder config that has the same type and key, and updates
        /// its other fields with provided value, if found; creates new folder config otherwise.
        /// </summary>
        public void UpdateFolder(RainbowFolder match, RainbowFolder value)
        {
            Undo.RecordObject(this, "Modify Rainbow Folder Settings");

            var existingFolder = GetFolder(match);

            if (existingFolder != null)
            {
                if (value.HasAtLeastOneIcon())
                {
                    existingFolder.CopyFrom(value);
                }
                else
                {
                    RemoveAll(match);
                }
            }
            else
            {
                if (value.HasAtLeastOneIcon())
                {
                    AddFolder(value);
                }
            }

            EditorUtility.SetDirty(this);
        }
All Usage Examples Of Borodar.RainbowFolders.Editor.Settings.RainbowFolder::HasAtLeastOneIcon