Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CompositionLayerPassthroughAPI.CreatePlanarPassthrough stops unity editor play mode #6

Open
yurec097 opened this issue Jul 3, 2024 · 0 comments

Comments

@yurec097
Copy link

yurec097 commented Jul 3, 2024

Platform standalone. When I try to create planar pass through then unity editor stops playing. When I do the same in standalone build? it stops.

Code example:

using UnityEngine;
using VIVE.OpenXR.CompositionLayer.Passthrough;
using VIVE.OpenXR.CompositionLayer;
using System.Collections;
public class PlanarPath : MonoBehaviour
{
    int ID;
    void Start()
    {
        StartCoroutine(SC_Create());

        IEnumerator SC_Create()
        {
            yield return new WaitForSeconds(10);
            ID = CompositionLayerPassthroughAPI.CreatePlanarPassthrough(LayerType.Overlay);
            StartCoroutine(SC_Underlay());
        }

        IEnumerator SC_Overlay()
        {
            yield return new WaitForSeconds(10);
            CompositionLayerPassthroughAPI.SetPassthroughLayerType(ID, LayerType.Overlay);
        }

        IEnumerator SC_Underlay()
        {
            yield return new WaitForSeconds(10);
            CompositionLayerPassthroughAPI.SetPassthroughLayerType(ID, LayerType.Underlay);
            StartCoroutine(SC_Overlay());
        }
    }
}

OpenXR Settings:
image

Console:
image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant