//
// Copyright (c) 2017 Anthony Marmont. All rights reserved.
// Licensed for use under the Unity Asset Store EULA. See https://unity3d.com/legal/as_terms for full license information.
//
#if UNITY_EDITOR
#pragma warning disable
using AssetIcons.Editors.Internal;
using UnityEditor;
using UnityEngine;
namespace AssetIcons.Editors.Preferences
{
///
/// Represents user preferences in a serializable format.
///
///
public sealed class AssetIconsPreferencesPreset : ScriptableObject
{
[SerializeField]
[Tooltip("Controls whether AssetIcons should be enabled or disabled.")]
private BoolEventField enabled = new BoolEventField(true);
[SerializeField]
[Tooltip("Enables previewing of Unity GUIStyle assets.")]
private BoolEventField drawGUIStyles = new BoolEventField(false);
[SerializeField]
[FromValues(16, 32, 64, 128, 256)]
[Tooltip("Allows for adjusting the resolution AssetIcons will render Prefabs with.")]
private IntEventField prefabResolution = new IntEventField(128);
[SerializeField]
[Tooltip("Controls how strong of a tint is applied to AssetIcons rendered graphics when selected.")]
private ColorTintEventField selectionTint = new ColorTintEventField(new ColorTint(0.4f));
[SerializeField]
[Tooltip("A collection of graphics associated with file extensions that AssetIcons uses to render custom file icons")]
private IconMapping typeIcons = new IconMapping();
[SerializeField]
[Tooltip("Controls whether the review dialog should be shown.")]
private BoolEventField hideReviewDialog = new BoolEventField(false);
///
/// Controls whether AssetIcons should be enabled or disabled.
///
public BoolEventField Enabled
{
get
{
return enabled;
}
}
///
/// Enables previewing of Unity assets.
///
public BoolEventField DrawGUIStyles
{
get
{
return drawGUIStyles;
}
}
///
/// Allows for adjusting the resolution AssetIcons will render Prefabs with.
///
///
/// If you are struggling with performance with a large amount of rendered assets, you could try
/// adjusting this to boost performance.
///
public IntEventField PrefabResolution
{
get
{
return prefabResolution;
}
}
///
/// Controls how strong of a tint is applied to AssetIcons rendered graphics when selected.
///
public ColorTintEventField SelectionTint
{
get
{
return selectionTint;
}
}
///
/// A collection of graphics associated with file extensions that AssetIcons uses to render custom
/// file icons.
///
public IconMapping TypeIcons
{
get
{
return typeIcons;
}
}
///
/// Controls whether the review dialog should be shown.
///
public BoolEventField HideReviewDialog
{
get
{
return hideReviewDialog;
}
set
{
hideReviewDialog = value;
}
}
private void OnValidate()
{
EditorApplication.RepaintProjectWindow();
}
}
}
#pragma warning restore
#endif