A powerful,Customizable, and esay-to-use Spin Wheel UI for Unity
Video tutorial : https://youtu.be/jZ_cuxTPPsA
1. Add DoTween
package: http://dotween.demigiant.com/download.php
Assets/PickerWheel/Prefabs/PickerWheel.prefab
using UnityEngine;
using EasyUI.PickerWheelUI; //required
public class Demo : MonoBehaviour {
// Reference to the PickerWheel GameObject (step 3):
[SerializeField] private PickerWheel pickerWheel;
private void Start () {
// Start spinning:
pickerWheel.Spin ();
}
}
using UnityEngine;
using EasyUI.PickerWheelUI;
public class Demo : MonoBehaviour {
[SerializeField] private PickerWheel pickerWheel;
private void Start () {
pickerWheel.OnSpinStart (() => {
Debug.Log ("Spin start..."));
});
pickerWheel.OnSpinEnd (wheelPiece => {
Debug.Log ("Spin end :") ;
Debug.Log ("Index : "+wheelPiece.Index);
Debug.Log ("Chance : "+wheelPiece.Chance);
Debug.Log ("Label : "+wheelPiece.Label);
Debug.Log ("Amount : "+wheelPiece.Amount);
});
pickerWheel.Spin ();
}
}