You've already forked ParticleEffectForUGUI
mirror of
https://github.com/mob-sakai/ParticleEffectForUGUI.git
synced 2026-06-26 08:23:45 +00:00
@@ -263,6 +263,13 @@ namespace Coffee.UIExtensions
|
||||
set => m_CustomViewSize = Mathf.Max(0.1f, value);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// View size for Baking.
|
||||
/// </summary>
|
||||
public float viewSizeForBaking => useCustomView
|
||||
? m_CustomViewSize
|
||||
: UIParticleProjectSettings.defaultViewSizeForBaking;
|
||||
|
||||
/// <summary>
|
||||
/// Time scale multiplier.
|
||||
/// </summary>
|
||||
@@ -718,7 +725,7 @@ namespace Coffee.UIExtensions
|
||||
|
||||
if (_bakeCamera != null)
|
||||
{
|
||||
_bakeCamera.orthographicSize = useCustomView ? customViewSize : 10;
|
||||
_bakeCamera.orthographicSize = viewSizeForBaking;
|
||||
return _bakeCamera;
|
||||
}
|
||||
|
||||
@@ -745,7 +752,7 @@ namespace Coffee.UIExtensions
|
||||
|
||||
// Setup baking camera.
|
||||
_bakeCamera.enabled = false;
|
||||
_bakeCamera.orthographicSize = useCustomView ? customViewSize : 10;
|
||||
_bakeCamera.orthographicSize = viewSizeForBaking;
|
||||
_bakeCamera.transform.SetPositionAndRotation(new Vector3(0, 0, -1000), Quaternion.identity);
|
||||
_bakeCamera.orthographic = true;
|
||||
_bakeCamera.farClipPlane = 2000f;
|
||||
|
||||
@@ -20,6 +20,15 @@ namespace Coffee.UIExtensions
|
||||
set => instance.m_AutoColorCorrection = value;
|
||||
}
|
||||
|
||||
[SerializeField]
|
||||
[Tooltip("Default view size for baking particle systems.")]
|
||||
private float m_DefaultViewSizeForBaking = 10;
|
||||
|
||||
public static float defaultViewSizeForBaking
|
||||
{
|
||||
get => instance.m_DefaultViewSizeForBaking;
|
||||
set => instance.m_DefaultViewSizeForBaking = value;
|
||||
}
|
||||
|
||||
[Header("Editor")]
|
||||
[Tooltip("Hide the automatically generated objects.\n" +
|
||||
@@ -44,6 +53,16 @@ namespace Coffee.UIExtensions
|
||||
{
|
||||
return new PreloadedProjectSettingsProvider("Project/UI/UI Particle");
|
||||
}
|
||||
|
||||
[CustomEditor(typeof(UIParticleProjectSettings))]
|
||||
private class UIParticleProjectSettingsEditor : Editor
|
||||
{
|
||||
public override void OnInspectorGUI()
|
||||
{
|
||||
EditorGUIUtility.labelWidth = 180;
|
||||
base.OnInspectorGUI();
|
||||
}
|
||||
}
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user