在画布上,我松开了光标 [英] In the canvas I loose the cursor

查看:67
本文介绍了在画布上,我松开了光标的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我从HoloLens和unity3d工作了两个月.我目前正在使用菜单(由画布和面板组成)的应用程序上工作.但是,当我想在菜单中选择某项时,光标(Holotoolkit中的默认光标)会自动消失.我知道有一些选项,例如在我选择按钮的地方更改按钮的颜色,但我个人认为更好的光标.我应该怎么做才能始终看到光标独立于表面.

I'm working since 2 months with HoloLens and unity3d. I'm currently working on an application where I'm using a menu (composed of a canvas & a panel). However, when I want to select something in the menu, the cursor (default cursor from Holotoolkit) dissapears automatically. I know that there are options like change the button's color where I'm selecting it but personally I find better the cursor. What I should do in order to see always the cursor independent of the surface.

推荐答案

还要仔细检查画布和面板位于哪一层.有时它们会放入IgnoreRayCast层中.您可以将其更改为UI层,它将正常工作.

Also double check what layer your canvas and panel are in. Sometimes they get put into the IgnoreRayCast Layer. You can change this to the UI layer and it will work fine.

尝试使用与HoloToolKit不同的游标,其中一些在处理UI时往往会出现一些小问题.在运行时,请尝试并复制该错误,然后进入场景视图,查看是否可以找到光标或查看光标是否未呈现.

Try using a different cursor from the HoloToolKit a few of them tend to be a little buggy when dealing with UI. During runtime try and replicate the bug and then go into your scene view and see if you can find the cursor or see if it is just not rendering.

也不确定这是否有帮助,但是请确保在EventSystem中添加组件HoloLens输入模块,大多数人都不知道这样做.

Also not sure if this will help or not but make sure in your EventSystem add the component HoloLens Input Module, most people don't know to do this.

这是Unity的一些有关使用UI和HoloLens的准则

Here are some guidelines from Unity on using UI and the HoloLens

https://forum.unity.com/线程/un-ui-on-the-hololens.394629/

这篇关于在画布上,我松开了光标的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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