在开发计算机上玩测试GearVR游戏 [英] Play test GearVR game on dev computer

查看:155
本文介绍了在开发计算机上玩测试GearVR游戏的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何在不构建并在手机上运行的情况下在开发计算机上玩我的GearVR游戏?

How can I play test my GearVR game on my development computer without building and running on my phone?

我正在寻找使用虚幻引擎或Unity3D构建的游戏的答案.

I'm looking for either an answer for a game built with either Unreal Engine or a Unity3D.

推荐答案

不要在没有耳机的情况下进行游戏测试

PC上的"Playtesting"完全没有按照常规含义进行Playtesting的意义.

"Playtesting" on a PC completely misses the point of playtesting in it's regular meaning.

Playtesting VR应用程序很重要,必须使用头戴式耳机执行.设计VR游戏的最大挑战之一就是要确保舒适的体验(而不是令人作呕的体验)以及精确,直观的输入/控件.如果您在装有WSAD/mouse duo的PC上运行应用程序,那么您的游戏测试将毫无价值.

Playtesting VR apps is important, and has to be performed with a headset. One of the biggest challenges of designing VR games is ensuring a comfortable (not nauseating) experience and percise, intuitive input/controls. If you run your app on a PC with the WSAD/mouse duo, your playtest will be pretty much worthless.

便宜的替代方案

如果您拥有不错的智能手机,那么Google硬纸板是最便宜的选择.体验将不如使用Gear VR时的体验好,但与使用PC相比,真实体验会更加接近.它将让您按预期测试实际的游戏玩法.

Google cardboard is the cheapest option, if you have a decent smartphone. The experience wont be as good as when using Gear VR, but it will be a lot closer the real thing than using a PC. It will let you test actual gameplay as intended.

如果您真的需要鼠标外观

我发现,如果我从工作流中删除了向某些设备的部署,则测试某些功能(不是游戏本身!)要快得多,所以我实际上实现了您的要求.

I found that testing some features (not gameplay itself!) is a lot faster if I cut out deploying to a device from the workflow, so I actually implemented what you ask for.

我现在没有Unity,但是这很容易做到.在初始化脚本中,您可以检查是否在Gear VR或PC上运行,并启用适当的控制脚本.看起来可能像这样:

I dont have Unity at hand right now, but it is quite easy to do. In a initialization script you can check if you are running on Gear VR or a PC, and enable the appropriate control script. it could look like this:

void Start() {
    #if UNITY_ANDROID && !UNITY_EDITOR
    setAndroidCameraRig();
    #endif
    #if UNITY_EDITOR
    setEditorCameraRig ();
    #endif
}

您的SetEditorCameraRig可能看起来像这样:

Your SetEditorCameraRig could look something like this:

    pcRotateHead pcHead = gameObject.GetComponentInChildren<pcRotateHead> ();
    pcHead.enabled = true;

其中pcRotateHead是一个脚本,可根据鼠标移动来更新每个帧的对象方向:

Where pcRotateHead is a script that updates it's object orientation each frame based on mouse movement:

public class pcRotateHead : MonoBehaviour {
  public float XSensitivity = 5f;
  public float YSensitivity = 5f;

  public void Update()
  {
    float yRot = Input.GetAxis("Mouse X") * XSensitivity;
    float xRot = Input.GetAxis("Mouse Y") * YSensitivity;
    Vector3 baseRotation = transform.rotation.eulerAngles;
    Vector3 newRotation = new Vector3(-xRot + baseRotation.x, yRot + baseRotation.y, baseRotation.z);
    Quaternion newQuatRotation = Quaternion.Euler (newRotation);
    transform.rotation = newQuatRotation;
  }
}

查看Unity手册: http://docs.unity3d.com/Manual/PlatformDependentCompilation. html

Check out the Unity manual: http://docs.unity3d.com/Manual/PlatformDependentCompilation.html

这篇关于在开发计算机上玩测试GearVR游戏的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆