纹理扩散适合与做游戏的背景(卷轴效果),原理就是让材质贴图动起来(循环运动),代码很简单希望对大家有用 1 2 3 4 5 6 7 8 9 10 11 12 13 // Scroll main texture based on time var scrollSpeed = -0.5; // This must be set to override a bug where Render Order // of the tunnel objects is lost when SetTextureOf
给模型偏移纹理 using UnityEngine; using System.Collections; [RequireComponent(typeof(Renderer))] public class ModelTextureAnimation : MonoBehaviour { //材质索引 public int MaterialIndex; //材质主纹理名字 public string TextureName = "_MainTex"; //行数 public int Col