using System.Collections; using System.Collections.Generic; using UnityEngine; public class FlowDirectionControl : MonoBehaviour { public Material mat; public Vector2 direction = new Vector2(1, 1); // 斜向右上 public float speed = 1f; void Update() { mat.SetVector("_FlowDir", direction.normalized); mat.SetFloat("_FlowSpeed", speed); } }