Files
ParticleEffectForUGUI/Runtime/UIParticleProjectSettings.cs

50 lines
1.6 KiB
C#
Raw Normal View History

2024-09-30 01:10:58 +09:00
#pragma warning disable CS0414
using Coffee.UIParticleInternal;
using UnityEditor;
using UnityEngine;
using UnityEngine.Serialization;
2024-09-30 01:10:58 +09:00
namespace Coffee.UIExtensions
{
public class UIParticleProjectSettings : PreloadedProjectSettings<UIParticleProjectSettings>
{
[Header("Setting")]
[SerializeField]
[Tooltip("Automatically correct the color space of the mesh.")]
[FormerlySerializedAs("m_EnableLinearToGamma")]
private bool m_AutoColorCorrection = true;
2024-09-30 01:10:58 +09:00
public static bool autoColorCorrection
2024-09-30 01:10:58 +09:00
{
get => instance.m_AutoColorCorrection;
set => instance.m_AutoColorCorrection = value;
2024-09-30 01:10:58 +09:00
}
[Header("Editor")]
[Tooltip("Hide the automatically generated objects.\n" +
" - UIParticleRenderer\n" +
" - UIParticle BakingCamera")]
[SerializeField]
private bool m_HideGeneratedObjects = true;
[Tooltip("When selecting UIParticle, a temporary ParticleSystem is generated for preview.")]
[SerializeField]
private bool m_PreviewOnSelect = true;
internal static HideFlags globalHideFlags => instance.m_HideGeneratedObjects
2024-09-30 01:10:58 +09:00
? HideFlags.DontSave | HideFlags.NotEditable | HideFlags.HideInHierarchy | HideFlags.HideInInspector
: HideFlags.DontSave | HideFlags.NotEditable;
internal static bool previewOnSelect => instance.m_PreviewOnSelect;
2024-09-30 01:10:58 +09:00
#if UNITY_EDITOR
[SettingsProvider]
private static SettingsProvider CreateSettingsProvider()
{
return new PreloadedProjectSettingsProvider("Project/UI/UI Particle");
}
#endif
}
}