Link Text With Variable
Zengy
$0.0
Date |
Price |
---|---|
日時 |
価格($) |
03/19(2018) |
0.0 |
11/26(2024) |
0.0 |
Jump AssetStore
This asset allows you to link a public field or property of any type of Component with a UnityEngine.Text component. Make sure the field/property you want to reference is public!
Example:
You would like to have a label which should display the money a player currently has. You no longer need to write a UI-Player interface because that is exactly what this asset does for you.
All you have to do is (once you imported the package):
-Add the ShowProperty script to the gameobject containing the text
-Setup the reference
-Hit play
In case the field/property does not exist, the script will tell you by throwing an error.
Make sure you have the custom inspector script imported and placed in an /Editor subfolder. I had to do a little workaround to make it easier for you to select a component ;)
You can find the documentation on my website:
http://zengy-studios.jimdo.com/linktextwithvariable/