Unity RTS Resources Control Tutorial Part 2: Script

Veröffentlicht am: 09 Juli 2021
auf dem Kanal: Crysix
169
3

Few points:
-If you dont have the resrouces UI watch part 1 and make it so you can work on it with this script.(   • Unity RTS Resources Control Tutorial Part ...  )

-Create empty GameObject, i named it ResourceUIManager, in him create and add new script called ResourceControl, and here we start to type the script that will help manage the resources.

-The "AddResoucesTestGo" function can be used from any other script outside the ResourceControl script, i just used the other script i have but can be used in any other script.

-I had button already so just create a new button and on him in the Inspector add OnClick(), drag the object that have the other script that have the AddResoucesTestGo function in it and set it on the OnClick(), so each time you press that button the function will be called, i only gave example with a button this can be called from anywhere else.

-This one i learned from Unity City Builder | Prototype Series.

Link to the Script Source:
https://pastebin.com/9gS3uW76


Auf dieser Seite können Sie das Online-Video Unity RTS Resources Control Tutorial Part 2: Script mit der Dauer stunde minuten sekunde in guter Qualität ansehen, das der Benutzer Crysix 09 Juli 2021 hochgeladen hat, den Link mit Freunden und Bekannten teilen, dieses Video wurde auf Youtube bereits 169 Mal angesehen und es wurde von 3 den Zuschauern gefallen. Viel Spaß beim Betrachtenden Zuschauern gefallen!