You've already forked ParticleEffectForUGUI
mirror of
https://github.com/mob-sakai/ParticleEffectForUGUI.git
synced 2026-05-14 12:10:08 +00:00
fix #34; With 'Screen Space - Camera' render mode, sorting is incorrect
This commit is contained in:
@@ -264,6 +264,16 @@ namespace Coffee.UIExtensions
|
||||
|
||||
if (m_ParticleSystem && canvas)
|
||||
{
|
||||
if (canvas.renderMode != RenderMode.ScreenSpaceOverlay)
|
||||
{
|
||||
Vector3 pos = rectTransform.localPosition;
|
||||
if (Mathf.Abs (pos.z) < 0.01f)
|
||||
{
|
||||
pos.z = 0.01f;
|
||||
rectTransform.localPosition = pos;
|
||||
}
|
||||
}
|
||||
|
||||
var rootCanvas = canvas.rootCanvas;
|
||||
Profiler.BeginSample ("Disable ParticleSystemRenderer");
|
||||
if (Application.isPlaying)
|
||||
|
||||
Reference in New Issue
Block a user