android - 谷歌纸板适应其他屏幕

标签 android unity-game-engine galaxy google-cardboard

我使用 google cardboard for unity SDK,它允许你使用不同的手机,但我使用的 galaxy S2 不在列表中。

代码中的定义如下所示:

 /// Parameters for a Nexus 6 device.
  public static readonly Screen Nexus6 = new Screen {
    width = 0.133f,
    height = 0.074f,
    border = 0.004f
  };

  /// Parameters for a Galaxy S6 device.
  public static readonly Screen GalaxyS6 = new Screen {
    width = 0.114f,
    height = 0.0635f,
    border = 0.0035f
  };

有谁知道这些参数是什么以及单位是什么?

最佳答案

/// Information about the screen.  All distances are in meters, measured as the phone is expected
  /// to be placed in the Cardboard, i.e. landscape orientation.
  [System.Serializable]
  public struct Screen {
    public float width;   // The long edge of the phone.
    public float height;  // The short edge of the phone.
    public float border;  // Distance from bottom of the cardboard to the bottom edge of screen.
  }

这就是答案:)

关于android - 谷歌纸板适应其他屏幕,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/33646051/

相关文章:

android - 使用camera2 API获取单张图片并用ImageView显示

android - 纹理坐标不一致

android - SMSManager 不适用于三星 Galaxy S3 LTE

android - YouTubePlayerView被com.google.android.youtube.player.YouTubePlayerView遮盖了

java - onCreateOptionsMenu Inflater 在 Android Java 类中不起作用

kinect - 从 kinect 保存的图像是黑色的

c# - 如何通过脚本更改 Material 的发射?

google-play - Galaxy S3 谷歌播放不工作

android - 银河 S7 牛轧糖完整图标

java - 使用 DefaultHttpClient 发送整数值