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
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
相关文章推荐
- Unity5中Inspector界面上的AssetBundle值设定问题
- Unity3D在Android平台使用嵌入式数据库Sqlite,解决无法找到数据库文件的问题
- Unity3D中帧同步的实现
- Unity3d镜头范围内移动。
- StrangeIoc框架的详细介绍
- 【Unity】常用代码
- unity中实现A*算法的一些问题
- Unity 读取、写入自定义路径文件,调用System.Windows.Forms
- 【unity插件】unity spriteRender图层管理工具(支持Spine)
- unity 在移动平台中,文件操作路径详解
- Unity中的Path对应各平台中的Path
- Unity3d中的资源打包和加载
- 一个在unity3d中使用Excel做配置的解决方案
- Unity3d资源写入Android内置存储卡
- Unity3D研究院之两种方式播放游戏视频
- Unity NGUI UILabel文字变色 及相关问题
- 【转】Unity3D研究院之Android加密DLL与破解DLL .SO
- 【转】Unity3D研究院之MAC打包Windows包自动压缩成一个Zip文件
- Unity中的各种寻找GameObject方法
- Unity中的各种寻找GameObject方法