Unity物体材质属性Offset动态偏移

Unity物体材质属性Offset动态偏移

cpp 复制代码
  MeshRenderer mr;
    float offset;
    public float scrollSpeed = 0.5F;
    private void Start()
    {
        mr = GetComponent<MeshRenderer>();
    }
    void Update()
    {
        offset = -Time.time * scrollSpeed;
        mr.material.mainTextureOffset = new Vector2(0, -offset);
    }
相关推荐
tianxuanjg5 小时前
0.005mm 高精度 CNC 加工:机器人薄壁复杂零件变形控制与全维度品控方案
经验分享·机器人·无人机·制造·材质
tianxuanjg12 小时前
机器人精密零件:为何样品合格,批量却频频超差?
人工智能·经验分享·机器人·无人机·制造·材质
zhangphil17 小时前
Unity3D(Unity)跨平台游戏引擎简介
unity
Madokaly18 小时前
DOTween动画:TweenManager深度解析
unity
_ZHOURUI_H_2 天前
Unity TCP底层极限拆解:粘包、半包、CRC、序列号、双缓冲到底怎么一起工作的?
网络·网络协议·tcp/ip·游戏·unity·游戏引擎·游戏开发
KindSuper_liu2 天前
Unity 游戏网络基础:从 TCP、UDP 到 HTTP、TLS 与 Best HTTP
网络·游戏·unity
tanglinS2 天前
工业陶瓷在半导体设备里都用哪里?氮化铝基板与氮化硅结构件的静电无尘角色
大数据·运维·人工智能·自动化·材质
qq_170264752 天前
unity里GameObject和Texture的内存归属
java·unity·游戏引擎
weixin_404679312 天前
godot + vscode ai开发
ide·vscode·编辑器·游戏引擎·godot
还是大剑师兰特3 天前
Unity3D(Unity)完整详细介绍
unity·游戏引擎