// // 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. // #pragma warning disable using UnityEngine; namespace AssetIcons { /// /// An enum that represents how the aspect ratio of a graphic should be used. /// /// /// The accepts an for styling. /// Below is an example of the being force graphics to fit into the icon area. /// /// using AssetIcons; /// using UnityEngine; /// /// [CreateAssetMenu(menuName = "Item")] /// public class Item : ScriptableObject /// { /// [AssetIcon(aspect: IconAspect.Fit)] /// public Sprite ItemIcon { get; } /// } /// /// /// /// public enum IconAspect { /// /// The rendered graphic should fit inside the without any stretching. /// /// /// The accepts an for styling. /// Below is an example of the being force graphics to fit into the icon area. /// /// using AssetIcons; /// using UnityEngine; /// /// [CreateAssetMenu(menuName = "Item")] /// public class Item : ScriptableObject /// { /// [AssetIcon(aspect: IconAspect.Fit)] /// public Sprite ItemIcon { get; } /// } /// /// /// /// This is the default value for the . /// /// /// Fit, /// /// The rendered graphic should envelop the without any stretching. /// /// /// The accepts an for styling. /// Below is an example of the being used to force graphics to envelop the icon area. /// /// using AssetIcons; /// using UnityEngine; /// /// [CreateAssetMenu(menuName = "Item")] /// public class Item : ScriptableObject /// { /// [AssetIcon(aspect: IconAspect.Envelop)] /// public Sprite ItemIcon { get; } /// } /// /// /// /// Envelop, /// /// The rendered graphic will stretch to the dimensions. /// /// /// The accepts an for styling. /// Below is an example of the being to force graphics to stretch across the icon area. /// /// using AssetIcons; /// using UnityEngine; /// /// [CreateAssetMenu(menuName = "Item")] /// public class Item : ScriptableObject /// { /// [AssetIcon(aspect: IconAspect.Stretch)] /// public Sprite ItemIcon { get; } /// } /// /// /// /// Stretch } } #pragma warning restore