哈尔滨建设工程信息网官方网站,外包做网站多少钱,网址升级访问,电话卡分销平台在uwa搜寻到的一些overDraw优化方法
透明图片避免绘制来减少overDraw
像一些alpha0的图片#xff0c;根本没有必要参与绘制。所以留一些可以参与Raycast#xff0c;但是不绘制
using UnityEngine;
using System.Collections;namespace UnityEngine.UI
{public class Empty…在uwa搜寻到的一些overDraw优化方法
透明图片避免绘制来减少overDraw
像一些alpha0的图片根本没有必要参与绘制。所以留一些可以参与Raycast但是不绘制
using UnityEngine;
using System.Collections;namespace UnityEngine.UI
{public class Empty4Raycast : MaskableGraphic{protected Empty4Raycast(){useLegacyMeshGeneration false;}protected override void OnPopulateMesh(VertexHelper toFill){toFill.Clear();}}
}多边形切割
一个图片如果有很多空白不可见的边缘也会造成空绘制这个时候可以使用多边形切割Poloygen Sprite但是这种情况会造成顶点数过多无疑是用顶点来换填充率https://community.uwa4d.com/blog/detail?id1542444341565734914entrance0