using System.Collections; using System.Collections.Generic; using UnityEngine; using UnityEngine.EventSystems; public class AutoWalk : MonoBehaviour,IPointerClickHandler { public Camera mainCamera; private AutoMoveCamera autoMoveCamera; // Start is called before the first frame update void Start() { autoMoveCamera = mainCamera.gameObject.GetComponent(); } public void OnPointerClick(PointerEventData eventData) { autoMoveCamera.enabled = !autoMoveCamera.enabled; } // 生成本地时间 }