zoukankan      html  css  js  c++  java
  • [UGUI]渲染顺序

    参考链接:

    http://blog.csdn.net/meegomeego/article/details/42060389

    Unity中的渲染顺序优先级:

    Camera->RenderQueue->深度->sortingLayer->sortingOrder

    1.Camera

    可以通过设置Camera的depth属性来调整渲染顺序,depth越低越先被渲染,depth高的camera会覆盖depth低的camera

    一般来说会有一个UICamera,其depth高于主Camera,因此会先渲染场景再渲染UI

    2.RenderQueue

    值越小越先被渲染,先渲染不透明的再渲染透明的

    3.深度

    要通过深度测试的像素才会被渲染,可以通过调整深度使模型处于UI之间

    4..sortingLayer

    可以通过设置Renderer的sortingLayer属性来调整渲染顺序,sortingLayer越前越先被渲染,sortingLayer后的会覆盖sortingLayer前的

    5.sortingOrder

    可以通过设置Renderer的sortingOrder属性来调整渲染顺序,与sortingLayer同理

    可以通过给UI添加Canvas组件来修改sortingLayer和sortingOrder

  • 相关阅读:
    implicit request ?
    Scala curly braces & parenthesis
    play framework Reads[A] and, andThen, reduce
    play framework 中耍 JSON 基礎
    asynchronous
    第一次接觸sbt會遇到的
    SBT, activator, play之間的糾葛
    leetcode67
    leetcode26
    leetcode341
  • 原文地址:https://www.cnblogs.com/lyh916/p/8462267.html
Copyright © 2011-2022 走看看