Unity RTS Resources Control Tutorial Part 2: Script

Publicado el: 09 julio 2021
en el 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


En esta página del sitio puede ver el video en línea Unity RTS Resources Control Tutorial Part 2: Script de Duración hora minuto segunda en buena calidad , que subió el usuario Crysix 09 julio 2021, comparta el enlace con amigos y conocidos, en youtube este video ya ha sido visto 169 veces y le gustó 3 a los espectadores. Disfruta viendo!