https://github.com/unityfreegames/pickerwheel-unity2d-games
https://github.com/unityfreegames/pickerwheel-unity2d-games
game game-development unity
Last synced: about 2 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/unityfreegames/pickerwheel-unity2d-games
- Owner: UnityFreeGames
- Created: 2023-01-19T09:16:49.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2023-03-08T06:54:38.000Z (about 3 years ago)
- Last Synced: 2025-01-11T22:46:51.488Z (over 1 year ago)
- Topics: game, game-development, unity
- Language: C#
- Homepage:
- Size: 1.16 MB
- Stars: 0
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Easy Fortune Spin Wheel UI
A powerful,Customizable, and esay-to-use Spin Wheel UI for Unity
Video tutorial :https://youtu.be/Yd8jYG9yx_E
Group :https://t.me/Unity_Tutorial_Games
🎨Game Artist : https://instagram.com/mariaartpro
Google Play: https://play.google.com/store/apps/dev?id=7696656736256201466
❤️ Donate

■ How to use? :
1. Add DoTween package: http://dotween.demigiant.com/download.php
2. Add EasyUI_PickerWheel package.
3. Create a Canvas and addPickerWheel prefab to it.
Assets/PickerWheel/Prefabs/PickerWheel.prefab
4. Create a Demo.cs script.
5. Add EasyUI.PickerWheelUI namespace.
6. Demo.cs :
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 ();
}
}
■ Wheel Events : OnSpinStart and OnSpinEnd :
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 ();
}
}