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"); } } } |
原文地址:http://blog.csdn.net/akof1314/article/details/41077099