Closed Tachoron closed 6 years ago
Edit: In the Example it seems to work correctly, but if i copy the Toolbar in another Scene(or use the Prefab) then this effect occur.
Same effect on HoloLens and Emulator.
This is unfortunately due to a common font glitch in Unity which we've attempted to mitigate (with limited success). Some causes are fairly deterministic but others are mysterious.
Oh, thanks for your response. Didn't know that :)
I'll repost what I've said on the PR in the MRToolkit here: For me, this corruption occurs when enabling/disabling buttons multiple times and I've managed to get it fixed today. Here's a little clip of the behavior: https://puu.sh/xIL06/0c20ded28c.webm
This ended up solving it for me but it's more of a workaround than an actual fix:
private void OnEnable()
{
if (Application.isPlaying)
{
ClearInstancedAssets();
}
StartCoroutine(RefreshIcon());
}
private IEnumerator RefreshIcon()
{
SetIconName(iconName);
yield return new WaitForEndOfFrame();
SetIconName(iconName); // UVRect of the icon atlas will be broken without this, but why??
}
Also a tip for debugging it: You can trigger the fix by selecting the button object in the hierarchy because that triggers setting the icon again from the property drawer.
Thanks for the workaround. I agree, it would be nice to know the cause of the glitch so we can deliberately avoid it, rather than 'fix' it with methods like this. But it's good to have in the meantime.
Hey MRDesignLabs-Team,
Really cool HoloLens-Utility you build there thumbsup :-)
But in my case the Toolbar-Glyphs are corrupted:
This also occurs the first time if i use the Unity Preview function. After that the Preview-Function works with the correct icons, but the HoloLens have the corrupted one (also after install/uninstall).
I also found the Issue No. 3: https://github.com/Microsoft/MRDesignLabs_Unity/issues/3. But also after reselect it will not work properly.
Best Regards Tachoron