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的更多相关文章
- Effective Java 66 Synchronize access to shared mutable data
synchronized - Only a single thread can execute a method or block at one time. Not only does synchro ...
- OAuth:Access to shared resources via web applications
A web application which wants to gain access to shared resources should redirect the user to a page ...
- unity, setting standard shader by script
http://forum.unity3d.com/threads/change-standard-shader-render-mode-in-runtime.318815/
- Access Java API in Groovy Script
$ cat Hello.java package test; public class Hello { public int myadd(int x, int y) { return 10 * x + ...
- unity, access material
MeshRenderer meshRenderer=gameObject.GetComponent<MeshRenderer>(); if(meshRende ...
- unity里standard pbr(一)
关注forwardbase下的 standard.shader #pragma vertex vertBase #pragma fragment fragBase #include "Uni ...
- Unity用代码实现Remove Missing Script
[MenuItem("Edit/Cleanup Missing Scripts")] static void CleanupMissingScripts () { ; i < ...
- unity, access scene ambient
lighting面板里设置的ambient color,在shader里访问是通过UNITY_LIGHTMODEL_AMBIENT这个变量. 它定义在UnityShaderVariables.cgin ...
- unity, access sprite of UGUI Image
首先需要using UnityEngine.UI; 然后调用下面语句就不报错了: Image.GetComponent<Image>().sprite 参考:http://answers. ...
随机推荐
- RSA加密破解
1Linux 下安装gmpy2 https://www.cnblogs.com/ESHLkangi/p/8576113.html 2.yafu安装使用方法 https://www.cnblogs.co ...
- mysql远程表/视图-应用
Date :20140213Auth: Jin参考http://blog.sina.com.cn/s/blog_757b0e130101erl5.htmlhttp://dev.mysql.com/do ...
- Linux中KVM虚拟机是什么
概念: Kernel-based Virtual Machine的简称,是一个开源的系统虚拟化模块,自Linux 2.6.20之后集成在Linux的各个主要发行版本中.它使用Linux自身的调度器进行 ...
- 关于push动画中尺寸问题
由于是在sb中写的VC, 所以在跳转动画时, 就会有一些问题. 这是sb中的约束: 当在push动画时, 在中间界面添加imageView时, 如图: imageView的尺寸是如上图所示, 并不是屏 ...
- Shell合并两个文件成一个文件的两列paste,awk
Shell合并两个文件成一个文件的两列 发布时间:2014-07-20 编辑:www.jquerycn.cn Shell合并两个文件成一个文件的两列,提供了两种方法,普通shell脚本,awk脚本 ...
- LaTeX 相对于 Word 有什么优势?
sjhstone ,本科EE在读 vczh等 276 人赞同 [Word公式进阶请往下翻]有人还写过论文,参见PLOS ONE: An Efficiency Comparison of Documen ...
- c# 冒号:C#中两个冒号(::)的作用
global::System.Console.WriteLine(number); 冒号在什么地方用. 点是空间下类,表示下一层的意思? 这里面::前面是GAC的标示符global,用法比较特殊,和. ...
- 绕过WAF继续SQL注入
Web Hacker总是生存在与WAF的不断抗争之中的,厂商不断过滤,Hacker不断绕过.WAF bypass是一个永恒的话题,不少基友也总结了很多奇技怪招.那今天我在这里做个小小的扫盲吧.先来说说 ...
- Mysql数据库配置文件my.cnf详解
basedir = path 使用给定目录作为根目录(安装目录). character-sets-dir = path 给出存放着字符集的目录. datadir = path 从给定目录读取数据库文件 ...
- 【架构】使用OpenStack、AliYun、AWS、Docker打造融合的IAAS、PAAS平台
GalaxyManager,即平台门户,旨在整合数据中心异构虚拟化资源为统一的资源池,并在资源池上为用户提供各类IAAS.PAAS服务. GitHub:https://github.com/junne ...