【问题标题】:Unity: handle case when camera is restrictedunity:相机受限时处理案例
【发布时间】:2017-04-06 03:44:51
【问题描述】:

我正在使用 WebCamTexture 将 Android 相机输出显示为背景。代码如下所示:

image = GetComponent<RawImage> ();
cam = new WebCamTexture (Screen.width, Screen.height);
image.texture = cam;

它可以工作,但是当我删除相机的权限时,它显示黑屏。我该如何处理这种情况并显示我的照片?

【问题讨论】:

    标签: android unity3d android-camera unity5 android-permissions


    【解决方案1】:

    我建议您检查您是否获得许可(空检查)并以不同方式处理它们。

    查看更多here

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2011-08-03
      • 1970-01-01
      • 2023-03-11
      • 1970-01-01
      相关资源
      最近更新 更多