🌍 Get the Game Courses Bundle 3x1! game.courses/code-monkey-bundle/ (Includes Steam Keys for my games as a FREE bonus!) 📝 POLYGON Fantasy Pack assetstore.unity.com/packages/3d/environments/fantasy/polygon-fantasy-kingdom-low-poly-3d-art-by-synty-164532?aid=1101l96nj&pubref=housebuildsystem ✅ Get the Project files and Utilities at unitycodemonkey.com/video.php?v=Cdcn6uK9gPo
Hi Code Monkey, Me and a friend of mine are about to release a game in Steam. I just wanted to say thank you for this channel. If there's a way to DM, I just wanted you to know there's a free key waiting for you. You and many others like Brackeys, Gabriel, Jason or Matt are part of this. I dont want this to be an advertisement without your consent so no link by now.
Hi! I downloaded the project files but it looks like there is a ton of stuff there from different videos. Is there a project with just this system to check out? Is there a scene file with it all to see how it's working together?
hats off to Code Monkey for promoting or mentioning other fellow youtuber that he used ideas or they had done similar things like him. that's a good sportsman right there.
Can you please make a course or a video series that goes into everything you are doing step by step including animations? And details for a beginner like myself?
This video is absolutely great I have looked everywhere for a building system tutorial but this is by far the best I have come to your teaching style is absolutely fantastic
actually not, his videos are summaries at 20x speed, and his live coding sessions show, that he is fast for 5 years of practice and typing with 10 fingers. navmesh-baking, or implementing a path-finder without navmesh-reqirement, actually takes a lot of time.
It's all about experience! After writing code for 20 years you start to remember that you already solved similar problems previously so the solution comes more easily!
Dear Code Monkey I really appreciate what you do for us, I am learnt alot and still learning from your videos, You really dont know how thankful I am to have you.
Thanks for the vid! I was looking for an approach to make the grid system work along the Y axis, at first I thought of making a Grid class with all 3 vector coordinates but this looks simpler and less of a mess 😅
Great Video, have you done any videos on adding the ability to drag select multiple tiles to build the floor and walls all at once instead of one by one?
Love this -- I've been building something similar for a game I'm making, just for fun... I basically have a World Manager that splits everything into chunks, and these chunks are essentially based off your Grid System. I then load these chunks following the POV so I can have very large worlds at decent run speeds -- I had to do this because I use a grid layer for the terrain tiles, so on a 256x256 grid it quickly gets heavy on the GPU. It's somewhat inspired & mixed with the whole "Minecraft voxel chunks" concept but it really isn't the same thing since it's not really cubic. For multiple stacked objects, I just converted the List index to Vector3Int instead of Vector2Int, and keep track of the Y-layer with a hard limit of 8 layers. The only real change I have versus this is that I've added an extra grid layer for triggers, and created an RTS/FPS camera switch, so when a character enters a door, I switch to a first-person view inside the building. It's not quite the way I want it to be yet but that's the idea. 😅 In any case, thank you for your videos, they helped me get started and opened my eyes to the bigger picture. It's fascinating how once you get the hang of things, adding to just becomes fun. Gonna go grab that Patreon link now, you deserve it.
nice. i would also like to see you try at 07:35 and use that rendering effect to your rooftop instead of your player character. and make it able to go completely transparent (diablo Arpg style) or as you have it now but reverse for the rooftop.
@@CodeMonkeyUnity This can be done very simply with a shader that visualy "cuts holes" into objects by making part of the object transparent. This shader can also be used to cut windows or door way into any solid wall. Of course you'll then need to cut an appropriate hole into the collision models.
Loving the tutorials, I'm trying to do something just like this for a game I'm working on. Some quick questions: Do you know how you would go about showing the grid in play-mode? Is there a way to allow the grid to have negative grid points? I'd like to be able to change the grid size to without having to adjust the origin point, as that would also change the positions objects are loaded back into. Would it be better to have all the house building objects on one layer and use a RaycastAll to check for the building type of the object? or would this be overkill. Just to save a few layers for the future if needed.
You can show the grid with a custom tilemap like I built here unitycodemonkey.com/video.php?v=gD5EQyt7VPk And I used it for exactly that purpose in the Factory game unitycodemonkey.com/video.php?v=88cIVR4KI_Q Technically you could have negative grid points as long as you have space and some offset in the underlying array, but that sounds like really confusing logic. Instead I would just make multiple grids and stitch them together. Yup you can indeed do RaycastAll and test if the object has some script to identify it.
Could you add a feature where, after saving an object, you can choose to paste it on grid or as a loose object so that you can rotate houses after building them?
Hmm interesting, yeah that could be done, just need to make LooseObjectTypes that mimic the Floor and EdgeObjects. Alternatively it would also be possible to use some math and some logic to rotate a ground 90º
Awesome video. I'm very thankful that you showed me how a grid system is so powerful (I'm following all yours videos of grid system 2D and 3D). I just didn't liked the doors behavior. As you cited Brackeys, I recommend a video from SpeedTutor about doors kit system it is a very nice system available for free in the Unity assets store
I k ow this is an old video but would this also work to place objects on walls and also objects on objects? Obviously with some modification to the code, thankyou for the video
Hmm sure, for each WallEdgeObject you could have it store a field for what object is placed on it, like a Picture frame. Then you could place one on-wall object on each wall. Placing objects on objects, that would requiring modifying the objects themselves to support that. So the grid system only stores an object, and then the object itself has logic to be able to store something on it So yeah requires quite a bit of refactoring but it's possible
You could cycle through all the walls, calculate the Dot product towards the camera and decide to show/hide the MeshRenderer I use a calculation sort of like that in the backstab mechanic video ruclips.net/video/78J493qWfDI/видео.html
I would really like to use this kind of powerful code as a world builder tool in editor mode. Could you show or tell us how bout's we would I get the new code added here & the code from the previous city building tutorial working and tracking mouse movements in editor mode? To be able to quickly move and track the mouse whilst placing objects in editor would be a massive boon to quickly building modular worlds quickly.
It would take a bit of work but yup you can make it functional in the editor I believe the method for raycasts is different, and spawning prefabs is also slightly different. Maybe a better approach would be to build it in run-time, then save it as JSON and in the editor load that JSON, might be easier
Is there a way to handle the NPC not run into objects? Like using nav mesh? Do you convert all the objects to static and recalculate bake the nev mesh? Seems expensive any ideas?
do dual contouring with qef() solver. only makes sense as compute-shader, else it would be way too slow. the search function of the pouet-forum is a great start.
Not sure what you mean, this video is a tutorial although it is based upon things that were built in other video tutorials, there's a Grid System playlist in the description unitycodemonkey.com/search.php?q=grid
I mean, it’s a demo of what was built. Would love to see when you code it like in all your other videos. For example the video where you make the grid building system with houses. It was excellent! It helps to see you talk about / write the actual code than just downloading it and trying to figure it out. There are a lot or differences from the grid building video right? Thank you so much for doing these videos!
Your videos are great, but can you go into more detail on the grid system. tried following your videos but there's edits between each video that makes it hard to follow along and learn instead of just downloading your code.
This system has been built piece by piece over 2 years so yea it requires a bit of work to understand how it all connects. Maybe one day I'll make a step-by-step course on making it all from scratch.
I thought this was a paid asset wow. I'll definitely give this a try. Just out of interest is there a way to make this building system conform to uneven ground. Like suppose I wanted to place a house on a hill. Would there be a way for the hill to flatten to the shape of the house?
Flattening the hill would depend on what terrain system you're using. I've never tried modifying the Unity terrain system at runtime so not sure exactly how that would be done Another alternative is making the floor fit the terrain, you can use the terrain normal to rotate the floor object, kind of like I used to rotate the Scout probe launcher unitycodemonkey.com/video.php?v=67WObFrWpRg
How would you go about creating some type of runtime LevelBuilder using this system? Turn them all into ScriptableObjects? Or do you have a different approach?
@@CodeMonkeyUnity I know, that is the issue because once you stop "playing" the game in Unity, you lose all data/progress. I want to save this data, so the created objects stay even after quitting "the game".
One way would be with a cutout shader so you look through the objects Or another way is just write some logic to identify objects above the player, maybe with a BoxCast, and hide/fade those objects.
If you follow the rest of the Grid System playlist you should be able to understand it. Most of the videos on that playlist are step-by-step tutorials.
@@CodeMonkeyUnity yes but I want to see the lines in the actual game when the player enters building mode.Also thanks so much for responding that was fast you really care a lot about your viewers.
@@fodk7021 Oh for that you need some code that cycles through the grid and creates a mesh or some sprites for the visual. I did that in the Factory Sim game which also uses the game Grid System ruclips.net/video/88cIVR4KI_Q/видео.html And I also covered how the overlay works in the Heatmap video ruclips.net/video/mZzZXfySeFQ/видео.html
I didn't do it in a specific video, first time I used XZ was in the Grid Building System ruclips.net/video/dulosHPl82A/видео.html It's just a handful of changes so if you compare the projects files from that video with the 2D one you'll be able to see the difference.
@@CodeMonkeyUnity Ah that'd explain why I couldn't find it :) I saw the change in that mentioned video and was like "What did I miss?" haha. The underlying concept really should be the same regardless of what plane it uses anyway as long as it is still a 2d grid.
Hello, I'm a newbie so I don't quite understand everything you said here. I follow through with every single video you have on this list, it is so painful but feels rewarded in the end. anyway, do you have a cause that explains this system step by step? I mean sometimes your code in the video is not the same as in your provided project. in order to solve that sometimes I write my own code in it and most of the time it conflicts with yours so... I'm telling you that I'm happy to pay for it at any cost just to learn this building system.
Sorry I don't have a step by step course on this topic. This Grid System started as something pretty basic and over the years I added more and more things to it, I never planned right from the start to build all these systems on top so yeah there are a bunch of things that were done off screen although if you watch all the videos you should be able to understand the core logic behind it and understand the rest by browsing the project files.
Hello, great tutorial but I tried to load the package on Unity 2020.3.10 and I get an error Shader error in 'TextMeshPro/Mobile/Distance Field': Couldn't open include file 'TMPro_Properties.cginc'. at line 92. Any idea?
Also got this error. In case anyone else has the same issue here's one fix.. In GameScene > Hierarchy tab: Click GameHandler > UI > Canvas > GridLevelUI > Text Under Text > Inspector tab: Find Shader > Set to TextMeshPro/DistanceField
Usually its good practice to separate the visuals from the main object, so your visuals are a child of the object that contains the logic. Then just go into that prefab and swap out the visual for something else. If you place everything in the same parent object then yes it becomes much more difficult
@@CodeMonkeyUnity gotcha, makes sense to me. Right now I have one grid that maintains all of the "set pieces " I might have to go through and see about separating that into a grid of grids that each maintain all the set pieces.
Looking trough your excellent code I got it almost working. Problem is that when adding walls they do not "stick" / cannot find the edges :( Been struggling with this a week now. So so close. Do you know what the issue can be? Is it possible that you can provide a zip file with only the bare minimum? It is so hard with so much code, expecially since this video does not actual go step by step how to modify your previous code.
It's been a while since I made this video but if I remember the side walls are snapped to a collider on the edges, so just go through the code where it's doing a raycast to find the edges. I don't remember if I used a Layermask or not, perhaps you need the side edges on a different layer.
Complete video? You mean the rest of the Grid System? It was covered in multiple videos, all on this playlist ruclips.net/p/PLzDRvYVwl53uhO8yhqxcyjDImRjO9W722
This tutorial series is great and I've been following along, but I can't seem to figure out how to delete floorEdgeObjects or looseObjects at runtime. I may have just missed this somewhere but does anyone have an idea on how to implement this?
It's been a while since I made this system so I don't remember how I set it up exactly but for loose objects you can just do a Raycast, just like the mouse is doing, see if it hits a loose object and just delete it and remove it from the list. Same thing for a floor edge object, just need to update the parent to tell it the edge was deleted.
Hello i tried to open in this 2022 Universal RP and it doesn't seem to work, all i see in a capsule. Ill try to get the low poly assets by Synty, what are the controls?
When I try connecting my phone to unity remote 5 In editor project settings Computer doesnt find my phone. Everything is well connected and i installed unity remote 5.
@@CodeMonkeyUnity Using the latest version of Unity, starting a new project, importing the package (downloaded from your site) and then building triggers this and a mess of other errors. I tried to compile with your utility package added to no avail. Should I be including any other packages?
@@CodeMonkeyUnity My mistake. I forgot to read the prerequisite. I added your utility class to this package and the only issue I see is that on line 43 of WeaponTracer you're using UtilsClass.GetAngleFromVectorFloat3D(shootDir) instead of UtilsClass.GetAngleFromVectorFloatXZ(shootDir)
Thanks as always , if you remember you use "O" keycode for saving map in update event , So I have a question , why saving system just working in update event ? i try to make button for saving , but the saving is not working , the json file included as below (when i want to save map with button ) but if i press [ O ] button everything is fine : {"placedObjectSaveObjectArrayArray":[{"placedObjectSaveObjectArray":[]},{"placedObjectSaveObjectArray":[]},{"placedObjectSaveObjectArray":[]},{"placedObjectSaveObjectArray":[]}],"looseSaveObjectArray":[]}
Looks like you're not saving any object, add some Debug.Log during the save cycle to see which objects it's cycling through. Did you make your own custom SaveObject class? IF so make sure you add the attribute [System.Serializable]
@@CodeMonkeyUnity Thanks for reply , No i didn't make any save class , check below , thats your code , in update just [ O ] key for saving , am i right ? i am just making public void class and just put Save(); inside that for saving and link that to one button , when i press that button nothing happen just in debug show me i press button and in saving class everything is fine (look like) but nothing saving , but when i press [ O ] button saving system working, private void Update() { HandleGridSelect(); HandleTypeSelect(); HandleNormalObjectPlacement(); HandleEdgeObjectPlacement(); HandleLooseObjectPlacement(); HandleDirRotation(); HandleDemolish(); if (Input.GetMouseButtonDown(1)) { DeselectObjectType(); } if (Input.GetKeyDown(KeyCode.O)) { Debug.Log("data save"); Save(); } if (Input.GetKeyDown(KeyCode.P)) { Debug.Log("data load"); Load(); } } public void systemsavingTest(){ Debug.Log("Saving button Ok!"); Save(); }
And where is code it isn't in video and i don't know where to put it from project files be cause i have problems with materials and URP and lot of errors
For added realism, could you have sloping land blocks? Add these to the base grid, to emulate a real world slope. Walls need to be custom height, to ensure floors are level. For anyone who wants to recreate Frank Wright's Falling Water house, or the Edinburgh Writer's Museum (Lady Stair's Close)
Sure you could make some foundation objects that get placed "inside" the terrain, then normal floors and walls and then just add more levels total and possibly some extra logic to limit how high you can build based on the height different to the terrain right underneath.
🌍 Get the Game Courses Bundle 3x1! game.courses/code-monkey-bundle/ (Includes Steam Keys for my games as a FREE bonus!)
📝 POLYGON Fantasy Pack assetstore.unity.com/packages/3d/environments/fantasy/polygon-fantasy-kingdom-low-poly-3d-art-by-synty-164532?aid=1101l96nj&pubref=housebuildsystem
✅ Get the Project files and Utilities at unitycodemonkey.com/video.php?v=Cdcn6uK9gPo
Hi Code Monkey,
Me and a friend of mine are about to release a game in Steam.
I just wanted to say thank you for this channel.
If there's a way to DM, I just wanted you to know there's a free key waiting for you.
You and many others like Brackeys, Gabriel, Jason or Matt are part of this.
I dont want this to be an advertisement without your consent so no link by now.
I''m making android game and I dont know how to make start menu. I only need start button which when I click game starts. Make tutorial please.
It would be great if there is no scene changing or panels. Just tap to start button which whennyou click game starts.
Hi! I downloaded the project files but it looks like there is a ton of stuff there from different videos. Is there a project with just this system to check out? Is there a scene file with it all to see how it's working together?
@@ttrudeau83 did you get the separate project file?
I got a code monkey ad in a code monkey video. Amazing.
Really? Which one?
hats off to Code Monkey for promoting or mentioning other fellow youtuber that he used ideas or they had done similar things like him. that's a good sportsman right there.
Yup I learn things just like everyone else, by watching videos, reading documentation and tons and tons of experimentation!
Jason Weismann course are awesome you will learn many advance stuff which you wont find from many course actually he use to work at AAA game Industry
Can you please make a course or a video series that goes into everything you are doing step by step including animations? And details for a beginner like myself?
Ur existing on game Dev make us excited to work more, thank you a lot 🙏
Requested this video couple of weeks ago and here it is! Thank you code monkey for the video🥰
It took a while to make so I hope people find the video helpful!
@@CodeMonkeyUnity I'm sure they will.
Two of my favorite Unity people in one video. Love it!
This video is absolutely great
I have looked everywhere for a building system tutorial
but this is by far the best I have come to
your teaching style is absolutely fantastic
That's looking really nice and slick. It's truly inspiring seeing how quickly you manage to put things together.
Thanks!
You make programming look so easy :)
actually not, his videos are summaries at 20x speed, and his live coding sessions show, that he is fast for 5 years of practice and typing with 10 fingers.
navmesh-baking, or implementing a path-finder without navmesh-reqirement, actually takes a lot of time.
It's all about experience! After writing code for 20 years you start to remember that you already solved similar problems previously so the solution comes more easily!
Dear Code Monkey I really appreciate what you do for us, I am learnt alot and still learning from your videos, You really dont know how thankful I am to have you.
Thanks! I'm glad the videos helped you!
@@CodeMonkeyUnity thank you so much again
Thank you for the constant content. Always inspires me to perfect my craft
Yes I'm loking forward for the next video!
It's exactly what I need!
This grid system is incredible. Making good clean code definitely feels like having coding super-powers to me
Waiting for the course ;)
i would love to see how to build the "cutaway wall view" system like that in sim 3 games.
Exactly what i need for my game! Thank you!
Thanks for the vid! I was looking for an approach to make the grid system work along the Y axis, at first I thought of making a Grid class with all 3 vector coordinates but this looks simpler and less of a mess 😅
CodeMonkey is the GOAT! 🐐 🙌
I like your voice, though, you sound very funny. 😂
I haven't watched this yet but I already wanna make a game about building an airship lol
That would be a great use case! The "house" definitely doesn't have to be an object on solid ground.
Awesome work! I really enjoy your work. I have learned a lot from you, and the tutorials are very easy to follow. THANK YOU!
Great Video, have you done any videos on adding the ability to drag select multiple tiles to build the floor and walls all at once instead of one by one?
This is awesome and super useful, thank you.
Thanks for the great tutorial! Can't believe that is FREE.
I'm glad you liked it!
Love this -- I've been building something similar for a game I'm making, just for fun... I basically have a World Manager that splits everything into chunks, and these chunks are essentially based off your Grid System. I then load these chunks following the POV so I can have very large worlds at decent run speeds -- I had to do this because I use a grid layer for the terrain tiles, so on a 256x256 grid it quickly gets heavy on the GPU. It's somewhat inspired & mixed with the whole "Minecraft voxel chunks" concept but it really isn't the same thing since it's not really cubic. For multiple stacked objects, I just converted the List index to Vector3Int instead of Vector2Int, and keep track of the Y-layer with a hard limit of 8 layers. The only real change I have versus this is that I've added an extra grid layer for triggers, and created an RTS/FPS camera switch, so when a character enters a door, I switch to a first-person view inside the building. It's not quite the way I want it to be yet but that's the idea. 😅 In any case, thank you for your videos, they helped me get started and opened my eyes to the bigger picture. It's fascinating how once you get the hang of things, adding to just becomes fun. Gonna go grab that Patreon link now, you deserve it.
That's awesome! Going with chunks is definitely the way to expand upon this so you can use it in massive worlds.
Best of luck with your project!
Superbb🔥. Loved it
i love the polygon packs. i hope you use more of them in the future.
nice. i would also like to see you try at 07:35 and use that rendering effect to your rooftop instead of your player character. and make it able to go completely transparent (diablo Arpg style) or as you have it now but reverse for the rooftop.
Yeah in the future I'd love to research some more complex see through methods like making blocking walls/ceilings transparent or a circle hole cutout.
Amazing ! You always kill it
Amazing!
Great job ! It looks good !
Wow, Thanks!
Great and detailed tutorial as always! Lots of possible ways of applications. Will definitely use it in my future projects :)
6:38 You could use The Sims effect where the walls can be hidden if it was in the front of the camera.
Yeah in the future I'd love to research some more complex see through methods like making blocking walls/ceilings transparent or a circle hole cutout.
@@CodeMonkeyUnity This can be done very simply with a shader that visualy "cuts holes" into objects by making part of the object transparent.
This shader can also be used to cut windows or door way into any solid wall. Of course you'll then need to cut an appropriate hole into the collision models.
How do you handle camera rotation on such a scene... meaning you have to change the building selection when the camera rotates, right?
Not sure what you mean, you mean the mouse position? The raycast from the camera will work regardless of camera rotation
Hey man, very nice vedio I was just wondering on how to use and setup the project files you have given in the description?
Loving the tutorials, I'm trying to do something just like this for a game I'm working on.
Some quick questions:
Do you know how you would go about showing the grid in play-mode?
Is there a way to allow the grid to have negative grid points?
I'd like to be able to change the grid size to without having to adjust the origin point, as that would also change the positions objects are loaded back into.
Would it be better to have all the house building objects on one layer and use a RaycastAll to check for the building type of the object? or would this be overkill.
Just to save a few layers for the future if needed.
You can show the grid with a custom tilemap like I built here unitycodemonkey.com/video.php?v=gD5EQyt7VPk
And I used it for exactly that purpose in the Factory game unitycodemonkey.com/video.php?v=88cIVR4KI_Q
Technically you could have negative grid points as long as you have space and some offset in the underlying array, but that sounds like really confusing logic. Instead I would just make multiple grids and stitch them together.
Yup you can indeed do RaycastAll and test if the object has some script to identify it.
Awesome video. Thank you very much =)
Could you add a feature where, after saving an object, you can choose to paste it on grid or as a loose object so that you can rotate houses after building them?
Hmm interesting, yeah that could be done, just need to make LooseObjectTypes that mimic the Floor and EdgeObjects. Alternatively it would also be possible to use some math and some logic to rotate a ground 90º
Awesome video. I'm very thankful that you showed me how a grid system is so powerful (I'm following all yours videos of grid system 2D and 3D). I just didn't liked the doors behavior. As you cited Brackeys, I recommend a video from SpeedTutor about doors kit system it is a very nice system available for free in the Unity assets store
What do you dislike about the doors behaviour? It's just a basic hinge joint
They are loose and do not close after the character has passed through it
I k ow this is an old video but would this also work to place objects on walls and also objects on objects? Obviously with some modification to the code, thankyou for the video
Hmm sure, for each WallEdgeObject you could have it store a field for what object is placed on it, like a Picture frame. Then you could place one on-wall object on each wall.
Placing objects on objects, that would requiring modifying the objects themselves to support that. So the grid system only stores an object, and then the object itself has logic to be able to store something on it
So yeah requires quite a bit of refactoring but it's possible
@CodeMonkeyUnity thank you so much :) will try it out this weekend
You should really turn this into an asset pack. It would work really well.
I'm thinking about it!
Anyone have any ideas on how to hide walls that are on the same side as the camera (so that we can see the interior, like in The Sims)?
You could cycle through all the walls, calculate the Dot product towards the camera and decide to show/hide the MeshRenderer
I use a calculation sort of like that in the backstab mechanic video ruclips.net/video/78J493qWfDI/видео.html
I would really like to use this kind of powerful code as a world builder tool in editor mode. Could you show or tell us how bout's we would I get the new code added here & the code from the previous city building tutorial working and tracking mouse movements in editor mode? To be able to quickly move and track the mouse whilst placing objects in editor would be a massive boon to quickly building modular worlds quickly.
It would take a bit of work but yup you can make it functional in the editor
I believe the method for raycasts is different, and spawning prefabs is also slightly different.
Maybe a better approach would be to build it in run-time, then save it as JSON and in the editor load that JSON, might be easier
I take it at the end, the rotation for objects like fountains, barrels, etc are a simple input * delta time on Y rotation?
Yup that's it, super simple
Is there a way to handle the NPC not run into objects? Like using nav mesh? Do you convert all the objects to static and recalculate bake the nev mesh? Seems expensive any ideas?
The NAvMeshComponents has some features to allow runtime generation github.com/Unity-Technologies/NavMeshComponents
do dual contouring with qef() solver. only makes sense as compute-shader, else it would be way too slow. the search function of the pouet-forum is a great start.
Are these videos (the actual tutorials) available somewhere? This is “just” a run down or these videos?
Not sure what you mean, this video is a tutorial although it is based upon things that were built in other video tutorials, there's a Grid System playlist in the description unitycodemonkey.com/search.php?q=grid
I mean, it’s a demo of what was built. Would love to see when you code it like in all your other videos. For example the video where you make the grid building system with houses. It was excellent! It helps to see you talk about / write the actual code than just downloading it and trying to figure it out. There are a lot or differences from the grid building video right? Thank you so much for doing these videos!
Your videos are great, but can you go into more detail on the grid system. tried following your videos but there's edits between each video that makes it hard to follow along and learn instead of just downloading your code.
This system has been built piece by piece over 2 years so yea it requires a bit of work to understand how it all connects. Maybe one day I'll make a step-by-step course on making it all from scratch.
Would the grid system be useful for creating a "tetris" style inventory? Like the ones from diablo or escape from tarkov?
Yup it would be perfect for that! That's a topic that I have on my list that I'd love to do at some point
@@CodeMonkeyUnity And i would totally love to see your take on it!
I thought this was a paid asset wow. I'll definitely give this a try. Just out of interest is there a way to make this building system conform to uneven ground. Like suppose I wanted to place a house on a hill. Would there be a way for the hill to flatten to the shape of the house?
Flattening the hill would depend on what terrain system you're using. I've never tried modifying the Unity terrain system at runtime so not sure exactly how that would be done
Another alternative is making the floor fit the terrain, you can use the terrain normal to rotate the floor object, kind of like I used to rotate the Scout probe launcher unitycodemonkey.com/video.php?v=67WObFrWpRg
What day will the house build system be available for download for non patreons?
It's 1 week later so this Saturday
How would you go about creating some type of runtime LevelBuilder using this system? Turn them all into ScriptableObjects? Or do you have a different approach?
Not sure what you mean, this is already a runtime system. The house is built while the game is playing
@@CodeMonkeyUnity I know, that is the issue because once you stop "playing" the game in Unity, you lose all data/progress. I want to save this data, so the created objects stay even after quitting "the game".
Wow!
Any advices on how to hide upper floors when the character is on a lower floor?
One way would be with a cutout shader so you look through the objects
Or another way is just write some logic to identify objects above the player, maybe with a BoxCast, and hide/fade those objects.
Very Nice system indeed ! Looks awsome! Could you do a tutorial for the code behind it ?
If you follow the rest of the Grid System playlist you should be able to understand it. Most of the videos on that playlist are step-by-step tutorials.
we are in ramadan i swear amma going to pray for you man thanks a lot
Nice tutorials . I need help with visualising the grid in the game I don't know how to do it.
The default visualization that I made is based on Debug.DrawLine so you just need to enable Gizmos to see it
@@CodeMonkeyUnity yes but I want to see the lines in the actual game when the player enters building mode.Also thanks so much for responding that was fast you really care a lot about your viewers.
@@fodk7021 Oh for that you need some code that cycles through the grid and creates a mesh or some sprites for the visual. I did that in the Factory Sim game which also uses the game Grid System ruclips.net/video/88cIVR4KI_Q/видео.html
And I also covered how the overlay works in the Heatmap video ruclips.net/video/mZzZXfySeFQ/видео.html
@@CodeMonkeyUnity thank you so much
Can I get only this course without take all the bundle?
I can't seem to find the video where you converted the grid from a 2D XY grid to a the GridXZ class.
I didn't do it in a specific video, first time I used XZ was in the Grid Building System ruclips.net/video/dulosHPl82A/видео.html
It's just a handful of changes so if you compare the projects files from that video with the 2D one you'll be able to see the difference.
@@CodeMonkeyUnity Ah that'd explain why I couldn't find it :) I saw the change in that mentioned video and was like "What did I miss?" haha. The underlying concept really should be the same regardless of what plane it uses anyway as long as it is still a 2d grid.
I would like to have a more detailed explanation about the floorEdgeObjects, because I came from your last video about Building System.
Hello, I'm a newbie so I don't quite understand everything you said here. I follow through with every single video you have on this list, it is so painful but feels rewarded in the end. anyway, do you have a cause that explains this system step by step? I mean sometimes your code in the video is not the same as in your provided project. in order to solve that sometimes I write my own code in it and most of the time it conflicts with yours so... I'm telling you that I'm happy to pay for it at any cost just to learn this building system.
Sorry I don't have a step by step course on this topic. This Grid System started as something pretty basic and over the years I added more and more things to it, I never planned right from the start to build all these systems on top so yeah there are a bunch of things that were done off screen although if you watch all the videos you should be able to understand the core logic behind it and understand the rest by browsing the project files.
Hello, great tutorial but I tried to load the package on Unity 2020.3.10 and I get an error Shader error in 'TextMeshPro/Mobile/Distance Field': Couldn't open include file 'TMPro_Properties.cginc'. at line 92. Any idea?
I've seen that error a few times, usually means I need to update the TextMeshPro package
@@CodeMonkeyUnity Thank you
Also got this error. In case anyone else has the same issue here's one fix..
In GameScene > Hierarchy tab: Click GameHandler > UI > Canvas > GridLevelUI > Text
Under Text > Inspector tab: Find Shader > Set to TextMeshPro/DistanceField
Can you create a video about Foot placement using Animation Rigging in Unity 3D
What is the easiest way to replace the placeholder models with my own? Everything works fine but replacing the models have been confusing.
Usually its good practice to separate the visuals from the main object, so your visuals are a child of the object that contains the logic. Then just go into that prefab and swap out the visual for something else.
If you place everything in the same parent object then yes it becomes much more difficult
I love u that's it.
Well thanks! I'm glad you like the videos!
Possibly a super dumb question, but if I was creating a tactics rpg how could I make them pathfinder between the multiple levels?
It depends on how you are handling pathfinding, you need to create some link between the grids.
@@CodeMonkeyUnity gotcha, makes sense to me. Right now I have one grid that maintains all of the "set pieces " I might have to go through and see about separating that into a grid of grids that each maintain all the set pieces.
Looking trough your excellent code I got it almost working. Problem is that when adding walls they do not "stick" / cannot find the edges :( Been struggling with this a week now. So so close. Do you know what the issue can be? Is it possible that you can provide a zip file with only the bare minimum? It is so hard with so much code, expecially since this video does not actual go step by step how to modify your previous code.
It's been a while since I made this video but if I remember the side walls are snapped to a collider on the edges, so just go through the code where it's doing a raycast to find the edges. I don't remember if I used a Layermask or not, perhaps you need the side edges on a different layer.
Is there a complete video of this project?
Complete video? You mean the rest of the Grid System? It was covered in multiple videos, all on this playlist ruclips.net/p/PLzDRvYVwl53uhO8yhqxcyjDImRjO9W722
@@CodeMonkeyUnity no, I mean the house building system. If it was made in a livestream not in RUclips or something else...
This tutorial series is great and I've been following along, but I can't seem to figure out how to delete floorEdgeObjects or looseObjects at runtime. I may have just missed this somewhere but does anyone have an idea on how to implement this?
It's been a while since I made this system so I don't remember how I set it up exactly but for loose objects you can just do a Raycast, just like the mouse is doing, see if it hits a loose object and just delete it and remove it from the list. Same thing for a floor edge object, just need to update the parent to tell it the edge was deleted.
@@CodeMonkeyUnity Thanks!
Hello i tried to open in this 2022 Universal RP and it doesn't seem to work, all i see in a capsule. Ill try to get the low poly assets by Synty, what are the controls?
Yes I did not make the assets myself so I cannot include them in the package, but all the code is there and functional
Thanks for quick reply, if i include the assets will it automatically replace ?@@CodeMonkeyUnity
@@CodeMonkeyUnity Also how to delete / remove assets what is the key.
Is it your new game or new tutorial?)
It's a tutorial but who knows! Maybe I'll use this and expand upon it on my next game
@@CodeMonkeyUnity got it, cool!
hlo
I want that how can we change terrain place in game scene
Terrain is an object so you change it like any other object. Make the terrain a prefab and spawn it whenever and wherever you like
How would you use nav mesh with this?
The same as usual, just define the walls and objects as unwalkable then refresh the navmesh when an object is placed.
When I try connecting my phone to unity remote 5 In editor project settings Computer doesnt find my phone. Everything is well connected and i installed unity remote 5.
When i went up on the roof the character stayed there. seems like a bug. Thanks for sharing.
i want to sign up on your website but your activation links are not working and thus cant access your project files can you please fix it
Check your spam folder, click the link on the last email
@@CodeMonkeyUnity i did get the mail but the activation link was broken and now it works perfectly thanks dude.
If someone is having problems with the package, the solution is installing or update the following packages: Cinemachine, TextMeshPro,UniverSalRP.
What does this "SO" mean on "ClassNameSO"?
Scriptable Object, I covered them in detail here unitycodemonkey.com/video.php?v=7jxS8HIny3Q
Oh god, it was so obvious. How did i not notice this? 😂😂😂
Thank you so much!
GridXZ cannot be found? What am I missing?
Where are you seeing that? GridXZ is included in the project files
@@CodeMonkeyUnity Using the latest version of Unity, starting a new project, importing the package (downloaded from your site) and then building triggers this and a mess of other errors. I tried to compile with your utility package added to no avail. Should I be including any other packages?
@@whattowatchrightnow Do you not see GridXZ.cs in the project assets? Use Unity 2020 although any version should work
@@CodeMonkeyUnity My mistake. I forgot to read the prerequisite. I added your utility class to this package and the only issue I see is that on line 43 of WeaponTracer you're using UtilsClass.GetAngleFromVectorFloat3D(shootDir) instead of UtilsClass.GetAngleFromVectorFloatXZ(shootDir)
Can you make a vr building system tut?
The system doesnt care how the camera is setup, can be on a VR head or a top down camera, the build system works exactly the same
Is this Unity is easy to use
why the field of view / camers is getting so blurry so soon and not only arround the edges?
It's the Post Processing Field of View effect, I made it a bit too intense so it was easily seen in the video at a glance.
Thanks as always , if you remember you use "O" keycode for saving map in update event , So I have a question , why saving system just working in update event ? i try to make button for saving , but the saving is not working , the json file included as below (when i want to save map with button ) but if i press [ O ] button everything is fine :
{"placedObjectSaveObjectArrayArray":[{"placedObjectSaveObjectArray":[]},{"placedObjectSaveObjectArray":[]},{"placedObjectSaveObjectArray":[]},{"placedObjectSaveObjectArray":[]}],"looseSaveObjectArray":[]}
I checked another option , For example demolish also is not working with button press as well
Looks like you're not saving any object, add some Debug.Log during the save cycle to see which objects it's cycling through.
Did you make your own custom SaveObject class? IF so make sure you add the attribute [System.Serializable]
@@CodeMonkeyUnity Thanks for reply , No i didn't make any save class , check below , thats your code , in update just [ O ] key for saving , am i right ? i am just making public void class and just put Save(); inside that for saving and link that to one button , when i press that button nothing happen just in debug show me i press button and in saving class everything is fine (look like) but nothing saving , but when i press [ O ] button saving system working,
private void Update() {
HandleGridSelect();
HandleTypeSelect();
HandleNormalObjectPlacement();
HandleEdgeObjectPlacement();
HandleLooseObjectPlacement();
HandleDirRotation();
HandleDemolish();
if (Input.GetMouseButtonDown(1)) {
DeselectObjectType();
}
if (Input.GetKeyDown(KeyCode.O)) {
Debug.Log("data save");
Save();
}
if (Input.GetKeyDown(KeyCode.P)) {
Debug.Log("data load");
Load();
}
}
public void systemsavingTest(){
Debug.Log("Saving button Ok!");
Save();
}
When you see ads of code monkey in code monkey own videos :
*Confused happiness sad*
A bit heavy on the depth of field :P
Heh yeah definitely made it a bit too intense so it's clearly seen in the video, I would pull it back quite a bit if I used this in a final game.
Wait, i got code monkey ad from RUclips while watching code monkey video
And where is code it isn't in video and i don't know where to put it from project files be cause i have problems with materials and URP and lot of errors
What code can't you see in the video? The project files contain all code. Make sure you have URP and Cinemachine installed.
@@CodeMonkeyUnity ok thanks
Wow, why are you doing all this for free? :)
As long as a small portion of people buy my courses/games/patreon then I can make this work and continue publishing 90% of my work for free!
Remake your other videos like programming videos and make it simpler. Like do a more simpler version of that video. Thanks 👍😊
I’ve just leave the ad from ‘studying a MBA in IU’ girl
Present
😍😍😍
For added realism, could you have sloping land blocks? Add these to the base grid, to emulate a real world slope.
Walls need to be custom height, to ensure floors are level.
For anyone who wants to recreate Frank Wright's Falling Water house, or the Edinburgh Writer's Museum (Lady Stair's Close)
Sure you could make some foundation objects that get placed "inside" the terrain, then normal floors and walls and then just add more levels total and possibly some extra logic to limit how high you can build based on the height different to the terrain right underneath.
i love your script but ican do build system whit craft in survivile games i hobe do that pls
(:
I also made this script work in third person ruclips.net/video/gkCBCCKeais/видео.html
4:56 fail
If code monkey use unity doesn't that mean code gorilla use unreal?
Second
your DOF is so crazy, can't see anything.
Yeah it's a bit too intense so it's easily seen in the video, I would lower the effect quite a bit if I used this in a complete game
1😊