I have particle system, i want to creat a button which will play the particle system, this is my simple code for the button
using UnityEngine;
using System.Collections;
public class PlayAnimasi : MonoBehaviour {
public Texture gambar1;
public Texture gambarpanduan;
public GUIStyle style1;
void OnGUI(){
GUI.DrawTexture(new Rect(0,0,Screen.width,Screen.height), gambarpanduan);
if(GUI.Button(new Rect(Screen.width - Screen.width/30 - Screen.width/5 ,Screen.height - Screen.height/5 - Screen.height/7,Screen.width/5,Screen.height/7),gambar1,style1)){
XXXX
}
}
}