Unity RTS Resources Control Tutorial Part 2: Script

Pubblicato il: 09 luglio 2021
sul canale di: 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


In questa pagina del sito puoi guardare il video online Unity RTS Resources Control Tutorial Part 2: Script della durata di ore minuti seconda in buona qualità , che l'utente ha caricato Crysix 09 luglio 2021, condividi il link con amici e conoscenti, su youtube questo video è già stato visto 169 volte e gli è piaciuto 3 spettatori. Buona visione!