z-c-s

【Unity】UI界面展示3D模型

方法一:

使用RenderTexture。RawImage作为UI元素可随意调节显示层级(即UI子物体先后顺序),适合将3D物体投影到局部UI界面。

1. Project中创建RenderTexture;

2. UI新建RawImage,设置Texture为RenderTexture;

3. 3D物体Cube标记Layer为"Cube";

4. 新建相机,设置ClearFlags、CullingMask,设置TargetTexture为RenderTexture。

方法二:

直接使用第二个相机渲染3D物体层级。适合将3D场景作为UI界面背景或前景使用。

1. 3D物体标记Layer;

2. 新建相机,设置CullingMask。

发表于 2020-09-10 22:46  萧然CS  阅读(24)  评论(0编辑  收藏  举报
 

分类:

技术点:

相关文章:

  • 2021-08-05
  • 2021-10-27
  • 2021-08-22
  • 2021-06-18
  • 2022-01-09
  • 2021-12-26
  • 2021-06-10
猜你喜欢
  • 2021-11-06
  • 2021-05-02
  • 2021-11-26
  • 2021-05-21
  • 2021-12-06
  • 2021-08-05
  • 2022-01-04
相关资源
相似解决方案