Grid Building System  - City Builders, RTS | Unity Tutorial

Grid Building System - City Builders, RTS | Unity Tutorial

Tamara Makes Games

3 года назад

100,375 Просмотров

Ссылки и html тэги не поддерживаются


Комментарии:

산골골맨
산골골맨 - 22.10.2021 08:40

Thank you for awesome tutorial!
And I saw some guys saying like this
"When I click/place the house it doesn't seem to paint the tiles green "

For this guys, I think you can solve it by making Resources folder in your Assets Folder.
In this video,
string tilepath = "@Tiles/ " and
Resources.Load<TileBase>(tilePath + "white")
this means they call Tile(named "white") in "Tiles" Folder in "Resources" Folder.
sry for my poor expression :m
I mean... Assets/Resources/Tiles/"tile name you want to call"... this!
I hope it helps you.

Ответить
Orion S.T.O
Orion S.T.O - 27.10.2023 00:54

Can you make a tutorial on a map like Mount & Blade that has a menu to enter cities and markets? I think it's a bit difficult, some say

Ответить
Clément LEGOUEST
Clément LEGOUEST - 13.09.2023 00:43

Hello,

Thank you for all the videos, that must be a lot of hard work.

I am following this one and I get a weird error within the FillTiles function saying that "TileBase[] does not contain a definition for 'length'"

Can anybody give me a hint for that ?

Thanks.

Ответить
Driver 2900
Driver 2900 - 16.07.2023 21:08

NGL, this tutorial just single handedly showed my how to make my code read-able. I had no idea you could create sections in the editor for methods. Thanks for the help!

Ответить
bagins13
bagins13 - 09.06.2023 23:49

Hey!
I was wondering how to make that building could only be moved by gragging, I mean that if you just click somewhere building wouldn't teleport there.

Ответить
GD TEAM / GAMEDEV TEAM
GD TEAM / GAMEDEV TEAM - 29.05.2023 10:14

How us this for 3D?

Ответить
Mikey Pettengill
Mikey Pettengill - 24.05.2023 21:00

Can you please elaborate on "make it a prefab"? I do not see how you did this step. With both objects selected, I right click and my only "Prefab" options are "Select Root" and "Unpack".

Ответить
1852_VeonAlmeida
1852_VeonAlmeida - 20.04.2023 17:54

moving object on mouse click not working !!...is it 'cause i made a 3d project??

Ответить
Zac Coonan
Zac Coonan - 17.04.2023 09:16

Thanks for the awesome video
I have one question though, I am making my game for mobile and instead of the space bar placing a building, how do I make it so my "place button", does that instead?

Ответить
Spaceflight Guy
Spaceflight Guy - 10.03.2023 01:06

Sorry to ask this but:
How would one go about only having white tiles around green/red tiles? I want a system that requires you to "connect" all of your buildings, so I need to check if the nearbvy Space is red/green before beeing able to place something on the white tile there.

Ответить
신용민
신용민 - 02.03.2023 10:09

I love you so much~ :) Marry me plz

Ответить
Pedro David Velasquez Tirado
Pedro David Velasquez Tirado - 22.02.2023 07:25

awesome tutorial!, Do you have one on how to create isometric water with reflections and everything?

Ответить
God Tier Slayer
God Tier Slayer - 09.01.2023 20:40

Awesome Video Tamara keep em comin! For everyone else here is a heads up!

IMPORTANT: The tile system is case-sensitive

This means that...


If you type "Green" on the tile asset in the project folder
and then type Resources.Load<TileBase>(tilePath + "green")); " in the start code then it won't work!

If you type "green" on the tile asset in the project folder
and then type Resources.Load<TileBase>(tilePath + "green")); " in the start code then it will work!


Hopes this helps someone!

Ответить
namki kim
namki kim - 09.01.2023 11:53

Thank you for the tutorial!!
One suggestion: Could you make your mouse pointer visible? It's kinda difficult to catch up where you're clicking

Ответить
SinTeL
SinTeL - 07.12.2022 01:41

How do you save your changes to tilemap?

Ответить
Talisman Skulls
Talisman Skulls - 23.11.2022 08:41

A few issues with your video and its mainly your skipping over parts, sharing only your pre-made assets and rushing through everything which is hard on people with such as audio and visual impairment. 1) You are not showing HOW you made the "ART" or how to measure the Asset sizes. You do that with the Grids, you need to do that with the ART meant to align to the grids.

2) If your going to show scripting as part of the tutorial you need to take it step by step without rushing through it. This also means if you are granting usage of the code and implying its in the project, it needs to be in the github, not used as a lure to get someone to have to join your page to have access. That is very misleading to people and you should consider stating in this on this page 'SCRIPTS NOT INCLUDED WITH PROJECT ASSETS.' Good luck.

Ответить
Max
Max - 28.10.2022 17:42

Very intresting build out system, I learned a lot from it. Just a question how would you go about sorting the gameobjects that you have instanitated? At the end of the video you clearly have a system when you are moving the trees. Thanks in advance!

Ответить
Fearofthemonster
Fearofthemonster - 26.09.2022 08:32

Creating an empty object and adding it the sprite caused the prefab and the sprite to be instantiated at different positions for some reason. I just skipped using the empty object and used the sprite as the building object

Ответить
Fearofthemonster
Fearofthemonster - 25.09.2022 22:29

I couldn't find the code in the github.

Ответить
Kong
Kong - 19.08.2022 06:44

could you make a 2D platformer in unity series

Ответить
Quijanys
Quijanys - 22.07.2022 02:34

Hi, great tutorial! It worked great. I wanted to leave a comment because I am still a bit new on the Tilemap system and I made a novice error. I mistakenly placed the tile SPRITES on the resources/tiles folder, and not the tile object that generates from the tile palette. Hope this helps someone else!

Ответить
youtuber youtuber
youtuber youtuber - 28.06.2022 05:16

So this whole thing will work no matter what our grid size is?

Ответить
존삼의실전투자연구소
존삼의실전투자연구소 - 24.06.2022 13:59

Thank you! This tutorial was very helpful for me! :D

Ответить
Uio Sun
Uio Sun - 15.06.2022 19:08

I love your style: quick action and normal speed say, the time is very compaction!

Ответить
mlgkhush
mlgkhush - 08.06.2022 09:06

Hey! Awesome tutorial, but I have a small question. This works for the objects I want to build, but if I want to generate objects on the grid (for example trees or rocks) how can I make them part of it? (Also dunno how to instantiate prefabs in random positions connected to the grid XD).

Ответить
P K
P K - 03.06.2022 23:33

thankyou soo much :)

Ответить
Play Plus
Play Plus - 25.05.2022 23:39

does anybody know what should i need to learn before watching this tutorial again ?

Ответить
OntheQuestionof
OntheQuestionof - 10.05.2022 00:41

Awesome video and Thank You for doing it. I'm completely new to coding in unity and would like to take this specific project and make it with mobile touch controls instead. How would i go about doing that? I tried following your hayday videos but the code is too different and so much more than what i needed to understand how to do this. I'm such a noob. Thank you again.

Ответить
WEN TEE
WEN TEE - 04.05.2022 17:36

How do building move with the mouse?

Ответить
Mark Le Deuxième
Mark Le Deuxième - 27.04.2022 02:10

Hi o/
This Video really helped
Thank you for making this tutorial !

Ответить
AlexDev
AlexDev - 14.04.2022 19:17

It was nice to realize you have now 5.5k subs and in the video it's only 152, congrats!

Ответить
ilham
ilham - 14.04.2022 10:44

Awesome.. How do you remember those code?... I think is hard to learn Game Dev instead Web dev...

Ответить
Bube
Bube - 01.04.2022 12:39

i really like your tutorials, but pleaaasee, get into some details, like how you create those sprites called tiles.

Ответить
jahyuk shin
jahyuk shin - 28.02.2022 08:02

Hi I'm glad to see your Video. your video is Awesome!
I'm sorry it's too late to ask, but I have a little problem in this tutorial.
when I press Escape key after building placed, the building is destroyed but the area is remain.

so I can't place another building in this area.
I hope you can answer my question.

Ответить
Aaron Skinner
Aaron Skinner - 23.02.2022 04:10

They way you say everyone almost sounds like my name which was disconcerting.

Ответить
Robot Robsen
Robot Robsen - 09.02.2022 10:49

Hi!

First, thanks for the video.
It is really informative. I tried to port the tutorial to a 3D space and discovered a weird behavior. When clicking to move the building around, it only moves upwards (along the y-axis), no movement at all in the plane space (neither in x- nor in y-direction). I already tried to play around with different Vector2 and Vector3 assignments, unfortunately without any luck til now.
May someone kindly give me a hint what to do to stick the building to the ground and move it along the x-/z-axis?

Ответить
Brandon Jackson
Brandon Jackson - 10.01.2022 05:02

Thank you! Awesome tutorial ;)

Ответить
Yomerrallo L
Yomerrallo L - 08.01.2022 16:03

I'm halfway through the tutorial but stuck with the 'EventSystem.current.IsPointerOverGameObject' check. It always returns false. I've tried by adding a collider to the sprite and changing the sorting layers and order but nothing is working. It instantiates the sprite but doesn't recognize it with the pointer... Does anyone know what I might be missing?

Ответить
Atthiyya Ath
Atthiyya Ath - 06.01.2022 13:42

Hi! May i ask, where you put the "FillTiles" and GetTilesBlock" ??

Ответить
fanti
fanti - 05.01.2022 17:39

sorry for asking, maybe I'm late but I followed the tutorial one full day straight and it's still not working... i don't know why... should u please help me?

Ответить
fanti
fanti - 05.01.2022 16:29

how can I add touch camera movement and zooming? also how can I make it for mobile instead of computer (i know I have to switch platform from windows to android/iOS but I don't know how to change inputs)? btw thanks for the awesome tutorial. maybe I'm asking for too much but I hope u can help me

Ответить
Scheny
Scheny - 03.01.2022 16:25

Hi! You really helped me a lot! But I didnt understand how to replace a building after it was placed. From what I`ve tried, I replace all the buildings that I placed so far instead of the single building. Can you explain please how you did it or can you make a video about it? Thanks a lot!!

Ответить
Muhammed Mustafa Savar
Muhammed Mustafa Savar - 24.12.2021 19:55

Can i use this code for my 2d project with 2d flat tilemap. where should I change in this tutorial?

Ответить
VagrantZero
VagrantZero - 15.12.2021 06:49

If I wanted to paint the building prefabs onto a tilemap instead of instantiating them as game objects, how would I do that? Thank you for the tutorial!

Ответить
W.A.I
W.A.I - 15.11.2021 12:21

Where can I download this hole project file?

Ответить
W.A.I
W.A.I - 14.11.2021 17:57

Where to copy the coding part?

Ответить
Richard Guilliams
Richard Guilliams - 08.11.2021 12:46

I must be missing a step. in the update function

if(EventSystem.current.IsPointerOverGameObject(0)){
return;
}

console says that the name EventSystem does not exist in current context. am i missing a using directive or do I need to declare a new eventsystem?

Ответить