cancel
Showing results for 
Search instead for 
Did you mean: 

[solved] DebugUI on Quest

kingarrilla
Explorer
I've added a CanvasWithDebug to my scene - I can get it to work with the panels as they come in the prefab, but I have a number of problems if I try to change anything

  1. moving the panels e.g. let's move ContentLeft over to the right. When I run this in the unity Editor it is where I moved it to. On the Quest, it has not moved! (so, is something overriding the position I set? or is the position not getting to the Quest app?)
  2. renaming the content holders e.g. let's rename ContentLeft to ContentLeft01. It doesn't respond, see code example below
  3. adding new content panels e.g let's add ContentBelow - adding a replica RectTransform to CanvasDebug and then specifying this in the DebugUIScript/Target Content Panels changing the size to 4 and making element 3 ContentBelow.  I'm targeting it with `DebugUIBuilder.instance.AddLabel("ContentBelow", 3);` This 3rd panel shows in the Editor but never displays in the Quest.

```
void Start()
{
var ui = DebugUIBuilder.instance.AddLabel("My Test"); //getting the RectTransform transform ui here so i can target it

DebugUIBuilder.instance.AddDivider();

DebugUIBuilder.instance.AddRadio("ContentRight", "group", delegate (Toggle t) { RadioPressed("ContentRight", "group", t, ui); }); //include the ui
DebugUIBuilder.instance.AddRadio("ContentLeft1", "group", delegate (Toggle t) { RadioPressed("ContentLeft01", "group", t, ui); });

DebugUIBuilder.instance.AddLabel("ContentRight Panel", 1);
DebugUIBuilder.instance.AddLabel("ContentLeft01 panel", 2);
}   

public void RadioPressed(string radioLabel, string group, Toggle t, RectTransform ui)// add ui parameter
{
ui.parent.parent.Find(radioLabel).gameObject.SetActive(t.isOn);//this works only on panels that have not had a name change

Can anybody help here?
1 REPLY 1

kingarrilla
Explorer
This was some corruption in the build process but not sure how it happened, but it was persisting over several builds. 

I switched scenes, made this work in the sample scene (as above, worked as expected) and verified in a fresh build. Then I switched back to my scene, and after another rebuild, it worked also. 

Freaky.