当前位置: 首页 > news >正文

深圳一定火网站建设cms企业网站管理系统

深圳一定火网站建设,cms企业网站管理系统,简易平面画图,保定专业做网站的公司哪家好Unity把UGUI再World模式下显示到相机最前方 通过脚本修改Shader 再VR里有时候要把3D的UI显示到相机最前方#xff0c;加个UI相机会坏事#xff0c;可以通过修改unity_GUIZTestMode来解决。 测试用例 测试用例如下#xff1a; 场景包含一个红色的盒子#xff0c;一个UI…Unity把UGUI再World模式下显示到相机最前方 通过脚本修改Shader 再VR里有时候要把3D的UI显示到相机最前方加个UI相机会坏事可以通过修改unity_GUIZTestMode来解决。 测试用例 测试用例如下 场景包含一个红色的盒子一个UI里含有这些元素 我们在UI根挂上运行脚本WorldSpaceOverlayUI.cs 脚本如下 using System.Collections.Generic; using UnityEngine; using UnityEngine.UI; using TMPro;[ExecuteInEditMode] //Disable if you dont care about previewing outside of play mode public class WorldSpaceOverlayUI : MonoBehaviour {private const string shaderTestMode unity_GUIZTestMode; //The magic property we need to set[SerializeField] UnityEngine.Rendering.CompareFunction desiredUIComparison UnityEngine.Rendering.CompareFunction.Always; //If you want to try out other effects[Tooltip(Set to blank to automatically populate from the child UI elements)][SerializeField] Graphic[] uiGraphicsToApplyTo;[Tooltip(Set to blank to automatically populate from the child UI elements)][SerializeField] TextMeshProUGUI[] uiTextsToApplyTo;//Allows us to reuse materialsprivate DictionaryMaterial, Material materialMappings new DictionaryMaterial, Material();protected virtual void Start(){if (uiGraphicsToApplyTo.Length 0){uiGraphicsToApplyTo gameObject.GetComponentsInChildrenGraphic();}if (uiTextsToApplyTo.Length 0){uiTextsToApplyTo gameObject.GetComponentsInChildrenTextMeshProUGUI();}foreach (var graphic in uiGraphicsToApplyTo){Material material graphic.materialForRendering;if (material null){Debug.LogError(${nameof(WorldSpaceOverlayUI)}: skipping target without material {graphic.name}.{graphic.GetType().Name});continue;}if (!materialMappings.TryGetValue(material, out Material materialCopy)){materialCopy new Material(material);materialMappings.Add(material, materialCopy);}materialCopy.SetInt(shaderTestMode, (int)desiredUIComparison);graphic.material materialCopy;}foreach (var text in uiTextsToApplyTo){Material material text.fontMaterial;if (material null){Debug.LogError(${nameof(WorldSpaceOverlayUI)}: skipping target without material {text.name}.{text.GetType().Name});continue;}if (!materialMappings.TryGetValue(material, out Material materialCopy)){materialCopy new Material(material);materialMappings.Add(material, materialCopy);}materialCopy.SetInt(shaderTestMode, (int)desiredUIComparison);text.fontMaterial materialCopy;}} }引用 https://discussions.unity.com/t/world-space-canvas-on-top-of-everything/128165/14
http://www.yutouwan.com/news/184025/

相关文章:

  • 做网站笔记本2014h5企业模板网站模板下载
  • 找人做任务网站有哪些贵州网站建设公司推荐
  • 上海高品质网站建设公司成都三网合一网站建设
  • easyui做网站在线做图的网站
  • 连云港公司网站优化服务邯郸设计公司有哪些
  • php网站建设设计方法怎么把模板导入wordpress
  • 可以免费秒玩游戏的网站中国能源建设集团有限公司子公司
  • 用手机做电影网站做视频网站要多少钱
  • 兰州网站设计公司有哪些网站怎么做备案号超链接
  • 天津自己制作网站网站做全景图
  • 嘉兴网站建设解决方案网站怎么制作的
  • 绵阳专门做网站的公司计算机自学app
  • 个人设计师网站 青春沧州网站制作
  • 免费自助建站哪个好专业网站建设效果显著
  • 企业网站建设申请域名网页编辑教程
  • 学校网站建设的优势和不足wordpress 4.5 模板
  • 5站合一 网站建设海口网站建设优化公司
  • 常用的电子商务网站网络培训心得体会
  • 网站编程培训哪好网络推广是啥
  • 如何建立属于个人网站wordpress get_post_mime_type
  • 网站的第二域名怎么用小程序报价开发
  • 数据库网站开发网站建设实施方案ppt
  • 做透明头像的网站珠海专业网站制作公司
  • 西安今天的新消息未央区优化seo技术
  • 人社部能力建设中心网站wordpress 第三方登录插件
  • 查网站怎么做的面膜网站广告怎么做
  • 建网站软件有哪些下载百度安装
  • 石家庄做网站公司的电话app网站
  • 百度收录什么网站吗目前最好的找工作平台
  • 加油站建设专业网站网站建设设计方案格式