unity, access standard shared emission by script
unity 5.1.1f1 personal
用下面方法在脚本中设置standard shader的emssion:
gameObject.GetComponent<MeshRenderer> ().material.SetColor("_EmissionColor",color);
一个很奇怪的现象是:如果material的inspector中此standard shader的emission值为(0,0,0),则上面语句不起作用。
所以为了使上面语句能生效,需要把inspector中emission的值设置为非(0,0,0)。
参考:http://hutonggames.com/playmakerforum/index.php?topic=9833.0
unity, access standard shared emission by script相关推荐
- Unity Shader Graph 制作Emission发光效果
效果图: Graph中用到了一个重要的节点,Fresnel Effect菲涅尔效果,在画面渲染中菲涅尔效果是一种很实用的技术手段,在Unity中则经常用它来实现边缘照明. 模型用到的依然是Asset ...
- [Unity教程]Standard Assets Example Project说明
在Unity 的安装中,勾选 如下图所示的2个 选项,进行安装. 安装完毕后,打开Unity ,就会有如下所示的 项目Standard Assets Example Project 有2个 Sampl ...
- unity标准材质,emission的设置
一般shader的feature都是,通过Material.EnableKeyword(DisableKeyword关闭), 或者使用的SetKeyword使用设置.所以一般要设置关键字"_ ...
- unity中Standard Assets导入错误的解决方法
点击错误,由VS打开SimpleActivatorMenu.cs 把里面的GUIText改为UnityEngine.UI.Text,然后保存就可以了
- Unity 自定义自发光材质 shader (对比Standard Eimission)
自定义自发光shader的时候会遇到 同样的HDR 颜色,但是standard表现正常而自己写的shader不正常的情况. 原因是因为Bloom效果是基于 standard的泛光材质调的,而自己写的E ...
- 50+ Best Unity Assets: Shader, Editor Extensions, Level Editors, Models, Terrain
Unity's Asset Store is big. It is hard to find the top solution for each of your problem. I gather a ...
- 给Unity开发者的C#内存管理(第一部分) C# Memory Management for Unity Developers (part 1 of 3)
原文地址:http://www.gamasutra.com/blogs/WendelinReich/20131109/203841/C_Memory_Management_for_Unity_Deve ...
- Unity Manual阅读记录——Animation(version 2019.4)
Animation简介 Unity提供的动画系统的主要功能: retargetable animations:重定向动画 full control of animation weights at ru ...
- [Unity官方文档翻译]Downloading and Installing Unity下载和安装unity教程
1.Downloading and Installing Unity 下载和安装unity You can download and install the Unity Editor from the ...
最新文章
- 神秘AI换脸软件入侵全球社交网络!马斯克秒变文艺复兴贵族
- 网站栏目页要如何进行优化呢?
- 文档中快速输入日期时间的方法
- redis 4.0.9 centos7 双机集群安装
- 开发者实测 M1 芯片报告:除了大型应用程序启动慢点,整体性能优秀!
- 计算机图形学大几学的,计算机图形学大作业-WenhaoYu.PDF
- hashchange
- .animate css,animate-css
- linux系统与linux内核,[科普] Linux 的内核与 Linux 系统之间的关系
- 【BZOJ 4516】生成魔咒
- Python画图显示中文
- 掺钇光纤激光器,自动解算输出波长 RP Fiber Power
- error: invalid operands to binary == (have ‘uid_t’ {aka ‘unsigned int’} and ‘kuid_t’
- docker(12):Dockerfile
- 可爱精灵宝贝 动态规划讲解
- 玩家交互体验—剑网3师徒系统
- PiaPik网盘 2023.2
- 光流传感器进行累积测试
- 电路-电源模块汇总(充电器)
- Dubbo服务端服务发布(一)Invoker创建