UnityPointCloudViewer icon indicating copy to clipboard operation
UnityPointCloudViewer copied to clipboard

cloud disappears after Alt-Tab to unity

Open unitycoder opened this issue 5 years ago • 0 comments

probably related to https://forum.unity.com/threads/is-this-a-bug-in-unity.710510/#post-4749092

doesnt happen on my pc though.. but here is workaround, add this code to viewer:

void OnApplicationFocus(bool focused)
{
    if (focused)
    {
        cloudMaterial.SetBuffer("buf_Points", bufferPoints);
        cloudMaterial.SetBuffer("buf_Colors", bufferColors);
    }
}

unitycoder avatar May 18 '20 23:05 unitycoder