2024-09-30 01:10:58 +09:00
|
|
|
#pragma warning disable CS0414
|
|
|
|
|
using Coffee.UIParticleInternal;
|
|
|
|
|
using UnityEditor;
|
|
|
|
|
using UnityEngine;
|
2026-06-24 12:16:46 +09:00
|
|
|
using UnityEngine.Serialization;
|
2024-09-30 01:10:58 +09:00
|
|
|
|
|
|
|
|
namespace Coffee.UIExtensions
|
|
|
|
|
{
|
|
|
|
|
public class UIParticleProjectSettings : PreloadedProjectSettings<UIParticleProjectSettings>
|
|
|
|
|
{
|
|
|
|
|
[Header("Setting")]
|
|
|
|
|
[SerializeField]
|
2026-06-24 12:16:46 +09:00
|
|
|
[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
|
|
|
|
2026-06-24 12:16:46 +09:00
|
|
|
public static bool autoColorCorrection
|
2024-09-30 01:10:58 +09:00
|
|
|
{
|
2026-06-24 12:16:46 +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;
|
|
|
|
|
|
2026-06-23 19:03:37 +09:00
|
|
|
[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;
|
|
|
|
|
|
2026-06-23 19:03:37 +09:00
|
|
|
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
|
|
|
|
|
}
|
|
|
|
|
}
|