Skip to content

coin label completely uı toolkit based, it has coin effect when add and subtract coins 🤑

License

Notifications You must be signed in to change notification settings

enessayaci/unity-ui-toolkit-coin-label

Repository files navigation

unity-ui-toolkit-coin-label

A coin label component completely uı toolkit based, it has animation when add and subtract coins 🤑

Usage

  1. Open the scene, create a new UI Document object by Right Click > UI Toolkit > UI Document
  2. Select Panel Settings and Source Asset (uxml file) of UIDocument component on the inspector (Demo Panel Settings and Demo.uxml for my case)
  3. Attach CoinLabelController.cs to the UI Document object. This script will create 10(default of mine) coin sprite and place in VisualElement#CoinArea(a visual element named as CoinLabel in Demo.uxml in my case).
  4. Open Demo.uss, copy all its content and paste somewhere of your uss file.
  5. Open DemoGameManager.cs and copy the methods(AddCoin,SubtractCoin), copy the variables and events. In brief, copy all its content, paste them to your own GameManager script(or equivalent script of yours).
  6. Call DemoGameManager.AddCoin(5) where you want to gain 5 coins. DemoGameManager.SubtractCoin(5) to remove 5 coins

About

coin label completely uı toolkit based, it has coin effect when add and subtract coins 🤑

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages