fix: support world canvas without UI events

close #356, close #357
This commit is contained in:
mob-sakai
2025-06-23 18:15:58 +09:00
parent a0c3e4997a
commit cadbb8d68d
+5 -1
View File
@@ -623,7 +623,11 @@ namespace Coffee.UIEffects
* Matrix4x4.TRS(mirrorOffset, Quaternion.identity, mirrorScale) * w2LMat);
}
if (canvas.renderMode == RenderMode.ScreenSpaceOverlay || !canvas.worldCamera)
if (canvas.renderMode == RenderMode.WorldSpace)
{
material.SetMatrix(s_CanvasToWorldMatrix, Matrix4x4.identity);
}
else if (canvas.renderMode == RenderMode.ScreenSpaceOverlay || !canvas.worldCamera)
{
material.SetMatrix(s_CanvasToWorldMatrix, canvas.transform.localToWorldMatrix);
}