本文共 1861 字,大约阅读时间需要 6 分钟。
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 | using UnityEngine; using System.Collections; public class test : MonoBehaviour { public MegaPointCacheAnimator anim; void OnGUI() { if (GUI.Button( new Rect(Screen.width - 50, 0, 50, 50), "缩放")) { if (anim == null) { anim = GetComponent<MegaPointCacheAnimator>(); } anim.PlayClip( "Scale"); } } } |