unity 您所在的位置:网站首页 东光清酒口感 unity

unity

#unity| 来源: 网络整理| 查看: 265

OnGUI is deprecated. And it has been for a long time. Make sure your Unity is updated at least to a fairly recent version.

Use the Unity Canvas.

On the Unity Main Screen, go to GameObject in the menu bar at the top, scroll down to UI, and select image. It will automatically create a new Canvas for you (assuming you don't have one). It will also create a new image. Click on the Canvas, and set it's "Render Mode" to "Screen Space - Camera". Then set the Camera to your Main Camera/The Camera for your game.

By default, the anchor points of the image you created should be set to center, so simply set the x, and y transform to 0. Your image will be centered. If the anchor points are not automatically set to Center, simply click on the transform of the image, and at the top should be it's anchor point. Set it to center and follow the same steps listed in this paragraph.

Make the created image your crosshair circle/hit marker by selecting the sprite and setting it to whatever you need.



【本文地址】

公司简介

联系我们

今日新闻

    推荐新闻

      专题文章
        CopyRight 2018-2019 实验室设备网 版权所有