fix: Support for skipping "reload domain"

close #406
This commit is contained in:
mob-sakai
2026-06-24 18:57:55 +09:00
parent f0b036de65
commit 733901436d
7 changed files with 62 additions and 30 deletions

View File

@@ -98,7 +98,7 @@ namespace Coffee.UIParticleInternal
Profiler.BeginSample("(COF)[CanvasExt] GetViewProjectionMatrix");
var rootCanvas = canvas.rootCanvas;
var cam = rootCanvas.worldCamera;
if (rootCanvas && rootCanvas.renderMode != RenderMode.ScreenSpaceOverlay && cam)
if (rootCanvas != null && rootCanvas.renderMode != RenderMode.ScreenSpaceOverlay && cam != null)
{
if (eye == Camera.MonoOrStereoscopicEye.Mono)
{

View File

@@ -99,7 +99,7 @@ namespace Coffee.UIParticleInternal
{
T component = null;
var transform = self.transform;
while (transform)
while (transform != null)
{
if (transform.TryGetComponent<T>(out var c))
{
@@ -120,7 +120,7 @@ namespace Coffee.UIParticleInternal
where T : Component
{
var tr = includeSelf ? self.transform : self.transform.parent;
while (tr)
while (tr != null)
{
if (tr.TryGetComponent<T>(out var c) && valid(c)) return c;
if (tr == stopAfter) return null;
@@ -197,7 +197,7 @@ namespace Coffee.UIParticleInternal
if (!includeInactive) return self.GetComponentInParent<T>();
var current = self.transform;
while (current)
while (current != null)
{
if (current.TryGetComponent<T>(out var c)) return c;
current = current.parent;