31
NGUI 3 Support / Animation on button click.
« on: April 11, 2013, 12:11:15 PM »
Hi. I'm trying to make a game menu. I have buttons, panels, and almost all things I need. Only thing I don't have are scripts. I really suck at scripting (If I was good at it I wouldn't be asking for help). I have made animation with 2 clips (which moves whole panels), and put it onto Anchor. Now I'm trying to make the animation play on a button press. This is what I got so far:
Here is error what I get:
Any help is appreciated.
- using UnityEngine;
- public class ClickEventReceiver : MonoBehaviour
- {
- void OnLoadClicked ()
- {
- UIButtonPlayAnimation(Anchor.Menu1); //I don't really know what to put there. Menu1 is name of the animation clip.
- }
- }
Here is error what I get:
Quote
Assets/NewGameM.cs(7,17): error CS0119: Expression denotes a `type', where a `variable', `value' or `method group' was expected
Any help is appreciated.