在Unity CardBoard插件中始终启用光标鼠标 [英] Making Cursor Mouse Always Enabled In Unity CardBoard Plugin
本文介绍了在Unity CardBoard插件中始终启用光标鼠标的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我认为标题很清楚,我想使在GazeInpuModule中设置的鼠标光标始终处于启用状态,并且在左右两个摄像头的中央,有人可以帮助我吗?
i think the title is clear , i want to make the mouse Cursor which is set in GazeInpuModule to be always enabled and in center of the both Left And Right Cameras , can anyone help me ?!
- ive尝试更改GazeInputModule代码以将光标置于居中,但一无所获!
推荐答案
以下是对我有用的东西:
Here's what worked for me:
-
在Head层次中创建一个游标GameObject
Create a Cursor GameObject in the Head hierarchy
在项目层次结构中添加EventSystem
Add EventSystem in the project hierarchy
在EventSystem凝视输入模块组件中,确保已选择显示光标".
In the EventSystem Gaze Input Module component, ensure "Show Cursor" is selected.
在GazeInputModule.cs的PlaceCursor()中,将SetActive()更改为:
In GazeInputModule.cs, PlaceCursor(), change the SetActive() to:
private void PlaceCursor() {
// ...
cursor.SetActive(showCursor);
// ...
}
这篇关于在Unity CardBoard插件中始终启用光标鼠标的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文