摘要:<object id="UnityObject"classid="clsid:444785F1-DE89-4295-863A-D46C3A781394" width="668"height="401" >;codebase="http://webplayer.unity3d.com/download_webplayer-2.x/UnityWebPlayer.cab#version=2,0,0,0"><param name="src" value=&qu
阅读全文
摘要:这个脚本可以将复杂的材质,比如有法线贴图的材质进行"烘焙",转变为单一的贴图,可用来将Unity的游戏移植到移动平台时候使用.讲脚本放Editor文件夹里,使用时选择一个Material材质,然后在菜单种"Custom/Bake Material"打开并调整照明和其他参数,点击Bake按钮,就会生成一个单一的贴图.脚本:BakeMaterial.jsjs 代码001class BakeMaterialSettings002{003private staticvarkEditorPrefsName ="BakeMaterialSettings&q
阅读全文
摘要:1.首先贴图的wrap mode需要设置为repeat2.将tiling设置为>1的数值,具体的数值根据贴图的大小以及模型的大小进行设置
阅读全文
摘要:Bump mapsare grayscale images that you use as a height map on your objects in order to give an appearance of raised or recessed surfaces. Assuming you have a model that looks like this:The 3D ModelThe TextureWe want to make the light parts of the object appear raised.Draw a grayscale height map of y
阅读全文
摘要:其实网上有很多玻璃效果的shader,我也是在网络上找了找,发现官网的demo“Bootcamp Demo”里面有个玻璃的shader,感觉效果不错还挺简单的,于是修改了下,本来那个Shader需要3张图,这里为了简单起见,改成用一张图,现在分享给大家,用来实现简单的玻璃效果是没有问题的。1.首先创建一个shader,然后直接双击文件,系统会用默认编辑器打开它,将下面的代码直接覆盖即可。Shader "Glass"{Properties{ _MainTex ("Main Texture", 2D) = "white" {}}Subsh
阅读全文
摘要:这是外部工具版块的帖子指引.资源工作流程文档http://unity3d.com/support/documentation/Manual/Working%20with%20Assets.html________________________________________________________________________________图像编辑器________________________________________________________________________________调整图像 (Unity内部或者外部工具)http://forum.unit
阅读全文
摘要:The HTML page that contains Unity Web Player content can communicate with that content and vice versa. Basically there are two communication directions: The web page calls functions inside the Unity web player content. The Unity web player content calls functions in the web page. Each of these commu
阅读全文
摘要:JS版本:1var prefab : GameObject = Resources.LoadAssetAtPath("Assets/Artwork/mymodel.fbx", GameObject);C#版本:1GameObject prefab = (GameObject)Resources.LoadAssetAtPath("Assets/Artwork/mymodel.fbx", typeof...
阅读全文