unity, 不要change Default sharedMaterial
假设在场景中加一个sprite,其材质使用默认的Sprites-Default。
若调用:
Color color=sprite.GetComponent<SpriteRenderer>().sharedMaterial.color;
color.a = 0;
sprite.GetComponent<SpriteRenderer>().sharedMaterial.color=color;
则将导致场景中所有使用默认Sprites-Default材质的sprite都透明掉。
所以如果只是想使若干个sprite同时透明且保持这些sprite在同一个draw call渲染,则应新建一个材质,让这些sprite使用此新建材质。
unity, 不要change Default sharedMaterial的更多相关文章
- JDK Environment Variable And Change default JDK
Environment Variable : change(import) /etc/bashrc export JAVA_HOME=/software/jdk1.8.0 export PATH=$J ...
- How to Change Default Web ADI Upload Parameters for FlexField Import / Validation
How to Change Default Web ADI Upload Parameters for FlexField Import / Validation (文档 ID 553345.1) 转 ...
- Change default network name (ens33) to old “eth0” on Ubuntu 18.04 / Ubuntu 16.04
Change default network name (ens33) to old “eth0” on Ubuntu 18.04 / Ubuntu 16.04 By Raj Last updated ...
- [转]how can I change default errormessage for invalid price
本文转自:http://forums.asp.net/t/1598262.aspx?how+can+I+change+default+errormessage+for+invalid+price I ...
- windows 10 change default program bug
windows 10 change default program bug https://www.isumsoft.com/windows-10/how-to-change-or-set-defau ...
- CHANGE DEFAULT FTP PORT FOR VSFTP
http://twincreations.co.uk/change-default-ftp-port-for-vsftp/ http://www.cnblogs.com/kuliuheng/p/320 ...
- [WebStrom] Change default cmd to Cygwin
GO to setting, search Terminal: Change shell path : C:\cygwin\bin\bash.exe --login -i (to the loc ...
- How to change default root@ email address linux / postfix / centos?
Change root@hostname to different email address By default, any email sent by system is sent to root ...
- 改变Prompt默认路径,Change Default Visual Studio Command Prompt Location
在项目中经常需要使用 Visual Studio Command Prompt编译项目,每次启动时都是默认进入 C:\windows\system32> 目录, 需要cd切换路径,如果把Visu ...
随机推荐
- Delegates and Events
People often find it difficult to see the difference between events and delegates. C# doesn't help m ...
- VS2010程序打包操作(超详细的)转
1. 在vs2010 选择“新建项目”----“其他项目类型”----“Visual Studio Installerà“安装项目”: 命名为:Setup1 . 这是在VS2010中将有三个文件夹, ...
- 在 Linux 系统中安装Load Generator ,并在windows 调用
原文地址:http://www.blogjava.net/qileilove/archive/2012/03/14/371861.html 由于公司需要测试系统的最大用户承受能力,所以需要学习使用lo ...
- linux automake 交叉编译
. ├── aclocal.m4 ├── autoscan.log ├── config.log ├── config.status ├── configure ├── configure.in ├─ ...
- jquery的功能函数
1.$.boxModel <!DOCTYPE html> <html> <head> <script src="/jquery/jquery-1.1 ...
- highchart demo
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Default.aspx.c ...
- WEB渗透之对于开了3389远程连接不上的总结
对于开了3389,连接不上,有几个方面的原因,我来总结下,哇咔咔,这几天提好几台服务器都TM这样,分析下, 原因1.远程桌面端口被更改.2.对方服务器处于内网. 3.防火墙拦截.4.TCP/IP安全限 ...
- java学习笔记11--集合总结
java学习笔记系列: java学习笔记10--泛型总结 java学习笔记9--内部类总结 java学习笔记8--接口总结 java学习笔记7--抽象类与抽象方法 java学习笔记6--类的继承.Ob ...
- leetcode笔记:First Bad Version
一. 题目描写叙述 You are a product manager and currently leading a team to develop a new product. Unfortuna ...
- Cognos权限认证CJP方式之用户密码加密
在项目开发过程中,用户往往对系统的安全都有明确的要求,下面针对cognos门户认证用户密码如何加密来提供一个简单的wf 1Cognos权限认证方式:CJP 2Cognos用户数据库类型:Oracle ...