查看: 1219|回复: 12

[平台开发] 【Samsung Gear VR Global Menu Blueprint Setup | Unreal Engine】

[复制链接]

1

主题

342

帖子

7万

积分

管理员

Rank: 9Rank: 9Rank: 9

积分
75866
发表于 2016-6-29 00:39:05 | 显示全部楼层 |阅读模式



Previous Step




Next StepQuick Start Home


With the GearVR_GlobalMenu HUD now assigned as the game HUD, we can now start to build the Blueprint logic that will call the menu based on the requirements from Oculus.

Open up the GearVR_GlobalMenu Blueprint by Double - Clicking on it inside of the Content Browser.

Once the GearVR_GlobalMenu Blueprint is open, go the Event Graph and then delete everything that is there leaving a blank graph to work with.

【虚幻4翻译文档-Samsung Gear VR Global Menu Blueprint Setup | Unreal Engine】[虚幻4中文文档]



In the Variables section create the following variables types with the following names.

【虚幻4翻译文档-Samsung Gear VR Global Menu Blueprint Setup | Unreal Engine】[虚幻4中文文档]





Variable Type     
Name   
Default Value

BooleanInvokedFalseFloatIncrementGlobalMenuPressTimer0.0FloatGlobalMenuPressTimer0.0
In order for the HUD to know that the back button is being pressed on the Gear VR Head Mounted Display (HMD) we have to enable the HUD to receive input signals by using the Enable Input node. Inside of your HUD Blueprint add and connect the nodes like in the following image.

【虚幻4翻译文档-Samsung Gear VR Global Menu Blueprint Setup | Unreal Engine】[虚幻4中文文档]



If you are having issues finding Enable Input try turning off Context Sensitive and searching for it again.

【虚幻4翻译文档-Samsung Gear VR Global Menu Blueprint Setup | Unreal Engine】[虚幻4中文文档]



Now that the HUD can receive button inputs, add and setup the following nodes so that when the Android Back button is pressed we can enable the Global Menu. Then, when it's released, we can reset everything for the next time it is pressed.

【虚幻4翻译文档-Samsung Gear VR Global Menu Blueprint Setup | Unreal Engine】[虚幻4中文文档]



To quickly test to see if your button logic is working, add a keyboard input key as an additional input to the back button. While this will not active the Global Menu while testing on PC, it will be able to help you see everything up till the menu is supposed to be called helping you see if everything is connected correctly.

【虚幻4翻译文档-Samsung Gear VR Global Menu Blueprint Setup | Unreal Engine】[虚幻4中文文档]



With the back button able to send and receive events we now need setup some logic to call the Global Menu after the back button has been held down for more than 0.75 seconds to meet the requirements set by Oculus. Setup up your HUD Blueprint to match the image below:

【虚幻4翻译文档-Samsung Gear VR Global Menu Blueprint Setup | Unreal Engine】[虚幻4中文文档]



Input 0.75 in the B input of the >= Node then input OVRGLOBALMENU into the Command section of the Execute Console Command node.

【虚幻4翻译文档-Samsung Gear VR Global Menu Blueprint Setup | Unreal Engine】[虚幻4中文文档]



Finally as per the instructions from Oculus, we need to display something that will grow over time to notify the user the Global Menu is being activated. Add and setup the nodes in your Blueprint to match the image below:

【虚幻4翻译文档-Samsung Gear VR Global Menu Blueprint Setup | Unreal Engine】[虚幻4中文文档]



When everything has been completed your Blueprint graph should look like this:

【虚幻4翻译文档-Samsung Gear VR Global Menu Blueprint Setup | Unreal Engine】[虚幻4中文文档]



Now you can package your project up and deploy it to your Smartphone to use with the Gear VR HMD. To see the menu in action, launch your project and then hold down the back button that is on the side of Gear VR HMD.As you do you will see a line being drawn across the screen and then when it finishes the Global Menu will be displayed.



   
Previous Step




Next StepQuick Start Home
回复

使用道具 举报

0

主题

899

帖子

3006

积分

vip会员

Rank: 1

积分
3006
发表于 2016-7-2 20:52:59 来自手机 | 显示全部楼层
看看, 顶起. 谢谢楼主
回复 支持 反对

使用道具 举报

0

主题

831

帖子

2717

积分

vip会员

Rank: 1

积分
2717
发表于 2016-7-4 03:37:38 | 显示全部楼层
这个多少金币啊。
回复 支持 反对

使用道具 举报

0

主题

882

帖子

2913

积分

vip会员

Rank: 1

积分
2913
发表于 2016-7-4 05:45:04 来自手机 | 显示全部楼层
好东西这么多....
回复 支持 反对

使用道具 举报

0

主题

843

帖子

2762

积分

vip会员

Rank: 1

积分
2762
发表于 2016-7-4 13:59:24 来自手机 | 显示全部楼层
这个支持了呀,不错,顶顶帖拿拿钱
回复 支持 反对

使用道具 举报

0

主题

845

帖子

2811

积分

vip会员

Rank: 1

积分
2811
发表于 2016-7-4 18:01:30 来自手机 | 显示全部楼层
看一下,谢谢楼主分享
回复 支持 反对

使用道具 举报

0

主题

872

帖子

2891

积分

vip会员

Rank: 1

积分
2891
发表于 2016-7-7 14:17:42 来自手机 | 显示全部楼层
全就行啊,,支持 一下
回复 支持 反对

使用道具 举报

0

主题

856

帖子

2859

积分

vip会员

Rank: 1

积分
2859
发表于 2016-7-11 02:53:51 | 显示全部楼层
我是来看看东西的!!!
回复 支持 反对

使用道具 举报

0

主题

851

帖子

2834

积分

vip会员

Rank: 1

积分
2834
发表于 2016-7-17 03:21:07 来自手机 | 显示全部楼层
这个需要的j8也不少吧
回复 支持 反对

使用道具 举报

0

主题

860

帖子

2871

积分

vip会员

Rank: 1

积分
2871
发表于 2016-7-17 14:47:41 来自手机 | 显示全部楼层
楼主辛苦
回复 支持 反对

使用道具 举报

*滑块验证:
您需要登录后才可以回帖 登录 | enginedx注册

本版积分规则

 
 



邮件留言:


 
返回顶部