background fixes
This commit is contained in:
@@ -48,6 +48,7 @@ namespace Darkmatter.Services.Capture
|
|||||||
|
|
||||||
disabledCanvases = DisableOtherRootCanvases(paperCanvas);
|
disabledCanvases = DisableOtherRootCanvases(paperCanvas);
|
||||||
disabledGraphics = HideNonPaperGraphics(paperRT);
|
disabledGraphics = HideNonPaperGraphics(paperRT);
|
||||||
|
HidePaperOwnGraphics(paperRT, disabledGraphics);
|
||||||
|
|
||||||
cam.clearFlags = CameraClearFlags.SolidColor;
|
cam.clearFlags = CameraClearFlags.SolidColor;
|
||||||
cam.backgroundColor = new Color(0f, 0f, 0f, 0f);
|
cam.backgroundColor = new Color(0f, 0f, 0f, 0f);
|
||||||
@@ -157,6 +158,18 @@ namespace Darkmatter.Services.Capture
|
|||||||
return disabled;
|
return disabled;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private static void HidePaperOwnGraphics(Transform paper, List<UnityEngine.UI.Graphic> disabled)
|
||||||
|
{
|
||||||
|
if (paper == null) return;
|
||||||
|
var graphics = paper.GetComponents<UnityEngine.UI.Graphic>();
|
||||||
|
foreach (var g in graphics)
|
||||||
|
{
|
||||||
|
if (g == null || !g.enabled) continue;
|
||||||
|
g.enabled = false;
|
||||||
|
disabled.Add(g);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
private static Rect ComputeCropRect(GameObject target, int screenW, int screenH)
|
private static Rect ComputeCropRect(GameObject target, int screenW, int screenH)
|
||||||
{
|
{
|
||||||
if (target == null || target.transform is not RectTransform rt)
|
if (target == null || target.transform is not RectTransform rt)
|
||||||
|
|||||||
BIN
Assets/Darkmatter/Content/Colorbook UI/.DS_Store
vendored
BIN
Assets/Darkmatter/Content/Colorbook UI/.DS_Store
vendored
Binary file not shown.
Reference in New Issue
Block a user