Unity RTS Resources Control Tutorial Part 2: Script

Publicado em: 09 Julho 2021
no canal de: 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


Nesta página do site você pode assistir ao vídeo on-line Unity RTS Resources Control Tutorial Part 2: Script duração hora minuto segundo em boa qualidade , que foi baixado pelo usuário Crysix 09 Julho 2021, compartilhe o link com seus amigos e conhecidos, no youtube este vídeo já foi visto 169 vezes e gostou 3 espectadores. Boa visualização!