Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion samples/birp-multipass/Packages/manifest.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"dependencies": {
"com.displayxr.unity": "https://github.com/DisplayXR/displayxr-unity.git#upm/v2.12.0",
"com.displayxr.unity": "https://github.com/DisplayXR/displayxr-unity.git#upm/v2.12.1",
"com.unity.multiplayer.center": "1.0.1",
"com.unity.ugui": "2.0.0",
"com.unity.xr.management": "4.5.2",
Expand Down
9 changes: 0 additions & 9 deletions samples/birp-multipass/Packages/packages-lock.json
Original file line number Diff line number Diff line change
@@ -1,14 +1,5 @@
{
"dependencies": {
"com.displayxr.unity": {
"version": "https://github.com/DisplayXR/displayxr-unity.git#upm/v2.12.0",
"depth": 0,
"source": "git",
"dependencies": {
"com.unity.xr.management": "4.4.0"
},
"hash": "d1f0250527d6bc7da17c952a77dcdf4351ac02a5"
},
"com.unity.inputsystem": {
"version": "1.19.0",
"depth": 1,
Expand Down
19 changes: 19 additions & 0 deletions samples/desktop-avatar/Assets/TigerSpeechBubble.cs
Original file line number Diff line number Diff line change
Expand Up @@ -256,6 +256,7 @@ private void SetLayoutMode(bool on)
PlayerPrefs.SetFloat(kBandPrefKey, bubbleBandFraction);
PlayerPrefs.Save();
}
MarkBubbleDirty(); // both branches rewrite the bubble's title/body text
Debug.Log($"[TigerSpeechBubble] Layout mode {(on ? "ON — drag to set the 2D/3D split" : "OFF")} " +
$"(split={bubbleBandFraction:P0}; restart for crisp rendering at the new split)");
}
Expand Down Expand Up @@ -299,9 +300,18 @@ void BuildUI()
m_BubbleL2D = l2dGO.AddComponent<DisplayXRLocal2D>();
m_BubbleL2D.resolution = new Vector2Int(1024, 640);
m_BubbleL2D.useExplicitRect = true; // we supply the exact panel-px rect
// Cap the overlay refresh (displayxr-unity#244). The bubble is a static
// panel of text — nothing animates in it — so the enabled offscreen camera
// and the provider's full-RT bridge copy are pure per-frame waste. 4 Hz caps
// the worst case for a content change we failed to announce at 250 ms while
// dropping ~93% of those renders at 60 fps. Content changes go through
// MarkBubbleDirty(); the component itself force-refreshes when the pixel rect
// moves, which covers the split drag and window resizes.
m_BubbleL2D.maxRefreshHz = 4f;
BuildBubble(l2dGO.transform);
m_BubbleL2DGO = l2dGO;
l2dGO.SetActive(true);
MarkBubbleDirty();

Debug.Log($"[TigerSpeechBubble] BUILD v11 (simple-window): client={m_PanelW}x{m_PanelH}; " +
$"bubbleBand={bubbleBandFraction:P0} (top); press B to toggle window decoration.");
Expand Down Expand Up @@ -384,6 +394,15 @@ void ApplyLayout()
}
}

// The Local2D refresh is capped (see BuildUI), so every change to what the
// bubble canvas draws has to announce itself here — otherwise the new content
// sits invisible until the next permitted slot. The component consumes the flag
// in its LateUpdate, so a call from our Update lands on this same frame's render.
private void MarkBubbleDirty()
{
if (m_BubbleL2D != null) m_BubbleL2D.SetDirty();
}

// ------------------------------------------------------------ canvas rect ---

private void PushCanvasRect(int x, int y, int w, int h)
Expand Down
2 changes: 1 addition & 1 deletion samples/desktop-avatar/Packages/manifest.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"dependencies": {
"com.displayxr.unity": "https://github.com/DisplayXR/displayxr-unity.git#upm/v2.12.0",
"com.displayxr.unity": "https://github.com/DisplayXR/displayxr-unity.git#upm/v2.12.1",
"com.unity.multiplayer.center": "1.0.1",
"com.unity.render-pipelines.universal": "17.0.4",
"com.unity.ugui": "2.0.0",
Expand Down
9 changes: 0 additions & 9 deletions samples/desktop-avatar/Packages/packages-lock.json
Original file line number Diff line number Diff line change
@@ -1,14 +1,5 @@
{
"dependencies": {
"com.displayxr.unity": {
"version": "https://github.com/DisplayXR/displayxr-unity.git#upm/v2.12.0",
"depth": 0,
"source": "git",
"dependencies": {
"com.unity.xr.management": "4.4.0"
},
"hash": "d1f0250527d6bc7da17c952a77dcdf4351ac02a5"
},
"com.unity.burst": {
"version": "1.8.28",
"depth": 2,
Expand Down
2 changes: 1 addition & 1 deletion samples/hdrp-singlepass-ui/Packages/manifest.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"dependencies": {
"com.displayxr.unity": "https://github.com/DisplayXR/displayxr-unity.git#upm/v2.12.0",
"com.displayxr.unity": "https://github.com/DisplayXR/displayxr-unity.git#upm/v2.12.1",
"com.unity.multiplayer.center": "1.0.1",
"com.unity.render-pipelines.high-definition": "17.0.4",
"com.unity.ugui": "2.0.0",
Expand Down
9 changes: 0 additions & 9 deletions samples/hdrp-singlepass-ui/Packages/packages-lock.json
Original file line number Diff line number Diff line change
@@ -1,14 +1,5 @@
{
"dependencies": {
"com.displayxr.unity": {
"version": "https://github.com/DisplayXR/displayxr-unity.git#upm/v2.12.0",
"depth": 0,
"source": "git",
"dependencies": {
"com.unity.xr.management": "4.4.0"
},
"hash": "d1f0250527d6bc7da17c952a77dcdf4351ac02a5"
},
"com.unity.burst": {
"version": "1.8.28",
"depth": 2,
Expand Down
2 changes: 1 addition & 1 deletion samples/urp-singlepass-ui/Packages/manifest.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"dependencies": {
"com.displayxr.unity": "https://github.com/DisplayXR/displayxr-unity.git#upm/v2.12.0",
"com.displayxr.unity": "https://github.com/DisplayXR/displayxr-unity.git#upm/v2.12.1",
"com.unity.multiplayer.center": "1.0.1",
"com.unity.render-pipelines.universal": "17.0.4",
"com.unity.ugui": "2.0.0",
Expand Down
9 changes: 0 additions & 9 deletions samples/urp-singlepass-ui/Packages/packages-lock.json
Original file line number Diff line number Diff line change
@@ -1,14 +1,5 @@
{
"dependencies": {
"com.displayxr.unity": {
"version": "https://github.com/DisplayXR/displayxr-unity.git#upm/v2.12.0",
"depth": 0,
"source": "git",
"dependencies": {
"com.unity.xr.management": "4.4.0"
},
"hash": "d1f0250527d6bc7da17c952a77dcdf4351ac02a5"
},
"com.unity.burst": {
"version": "1.8.28",
"depth": 2,
Expand Down