使图像出现在前面 [英] Make an image appear in front

查看:44
本文介绍了使图像出现在前面的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在与多个玩家一起开展一个项目.我正在尝试制作出现在字符正上方的名称标签.(我可以做到.)而且我希望图像出现在所有物体的正前方,这样您就可以通过墙壁看到它们的位置.看了说明书,看到了depth only的功能,没看懂.我很困.另外,附带问题:图像是否必须被子化到画布才能渲染,或者我应该怎么做.任何人都可以帮助我如何做到这一点?

I am working on a project with multiple players. I am trying to make name tags that appear right above the characters. (I can do that.) And I want the images to appear right in front of all of the objects, so you can see where they are through walls. I looked at the manual, and I saw the depth only function, but I don’t understand it. I am pretty stuck. Also, side question: do images have to be childed to the canvas to render, or what should I do with that. Can anyone help me with how to do this?

推荐答案

如果我理解你的意思,那么我认为解决方案是将画布渲染模式更改为屏幕空间叠加",这应该可以渲染在上面.此外,对于您的另一个问题:是的,UI 组件必须子代到要呈现的画布

If I get what you mean correctly, then I think the solution would be changing the canvas render mode to "Screen Space-Overlay", which should make it render on top. Additionally, for your other question: yes, UI components have to be childed to a canvas to be rendered

这篇关于使图像出现在前面的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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