123456789101112131415161718 |
- using System.Collections;
- using System.Collections.Generic;
- using UnityEngine;
- public class SkinMapOffsetMove : MonoBehaviour {
- public Vector2 speed = new Vector2(0.02f, 0.02f);
- private SkinnedMeshRenderer mSkinRender = null;
- void Start () {
- mSkinRender = GetComponent<SkinnedMeshRenderer>();
- // mRender.material.SetTextureScale("_MainTex", new Vector2(1, 1));
- }
-
- void Update () {
- mSkinRender.material.SetTextureOffset("_MainTex", new Vector2(1 + Time.time * speed.x, 1 + Time.time * speed.y));
- }
- }
|