您的位置:首页 > 移动开发 > Unity3D

T4M在Unity5中运行出错修改

2015-08-27 20:27 1466 查看
​-
Import the T4m package and accept the automatic script updating.

- Find "T4M 4 Textures.shader" (T4M/Shaders/ShaderModel2/Diffuse)

- Edit shader above adding at the end of line 17 "nolightmap" ( #pragma surface surf Lambert nolightmap)...save.
- Edit T4MSC.cs and replace line 309 with : " static public PaintHandle PaintPrev = PaintHandle.Follow_Normal_Circle;

-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------

This
fixes the error in the T4M World Projection Shader.shader

After this line:

Code (CSharp):

void vert (inout appdata_full v, out Input o) {

Insert this extra line:

Code (CSharp):

 UNITY_INITIALIZE_OUTPUT(Input,o);

----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

To
best edit the brush preview shader and remove the two console warnings you can :
- create the two shaders locally (es PlantPreview and BrushPreview) instead by code (currently) : line 240 (T4MExtendsSC.cs) and line about
1400 (T4MSC.cs).

es replace the line :

Material NewPmat = new material ("shader....
with

Code (CSharp):

Shader myShader = Shader.Find("Hidden/PlantPreview
");

Material NewPMat
 = new Material (myShader);

in T4MExtendsSC.cs

and with

Code (CSharp):

Shader myShader = Shader.Find("Hidden/BrushPreview");

Material NewPMat
 = new Material (myShader);

in T4MSC.cs
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: