(文档)Shader.Find (在编译时,只包含那些使用中的shader或位置在"Resources"文件夹中shader)...

本文介绍了Unity中Shader.Find函数的使用方法,可用于动态加载指定名称的着色器,无需事先保存着色器引用。文中还解释了编译时着色器包含的条件。

Shader.Find 查找

 

static function Find (name : string) : Shader

Description描述

Finds a shader with the given name.

查找名为name的着色器。

Shader.Find can be used to switch to another shader without having to keep a reference to the shader. name is the name you can see in the shader popup of any material. Common names are: "Diffuse", "Bumped Diffuse", "VertexLit", "Transparent/Diffuse" etc.

Shader.Find能够用来切换到另一个着色器,而不必保持一个到该着色的引用。name是你可以在任意材质的shader弹出窗口看到。通常的名称是:"Diffuse", "Bumped Diffuse", "VertexLit", "Transparent/Diffuse"等等。

When building a player, a shader will only be included if it is assigned to a material that is used in any scene or if the shader is placed in a "Resources" folder.

在编译时,只包含那些使用中的shader或位置在"Resources"文件夹中shader。

转载于:https://www.cnblogs.com/wonderKK/p/4287203.html

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值