- Home /
Automatically generate prefabs on a level?
Hello, I am making a tower defense game and I need to generate prefabs automatically to my map I've made with blender as placing the prefabs automatically as placing them manually on the editor on the right places would take too long.
What I need to do is fill the squares on the highest altitude with prefabs that are just planes but I have no idea how to make it work. It does not necessarily need to generate it automatically when the scene starts but being able to make them on the editor would also be fine. Thanks in advance.
Hello bud, it`s Gruffy here. This question has most likely been answered a thousand times on this forum and if you use the search bar at the top right, you will undoubtedly have return of links that cover your topic. if, in the unlikely event, this does not return a link for you to read and make a start yourself with, then this is the time to ask the question here dude. I hope that helps you out a little, and if you think about it, it may yield a faster answer due to already being solved. Thanks for reading bud. Gruffy. (pointer) try having a look on the asset store, there a few free AI pathfinding projects on there.. these are a great place for you to start with, when you come up against a problem using that for example, then pump your question over to us on Unity Answers and we will do our very best hands down to help. ;)
Cheers Dude
EDIT: I just used search bar with "Generate prefabs for tower defense game" and got a lot of returns with very similar questions to yours dude (just so you know searching can yield you the same or better results) Cheers G
Okay, well thanks for the insight to your 3 sentences. The real point that you have obviously over sighted, in some way perhaps due to your frustration at not getting a result, was to make some level of $$anonymous$$imal effort yourself, which you have not in any way done.
That is why I gave you the tip to go looking/using search.
$$anonymous$$y search term, alone, is not meant to be the definitive question for your answer either, that is for you to (again) perhaps put some $$anonymous$$imal effort into.
I would have thought with a reply written, such as yours here, your intellect might have of been able to glean this simple premise, being.... Do something first, make some small effort before you come here and ask someone to solve your problem, knowing full well you have made <0 attempts at solving this yourself.
Automatically instantiating prefabs at run time is one thing, keeping them to a path is another (totally). Your question is basically asking "can someone write me a full AI script that keep gameObjects fixed to a path, oh yeah and while that`s happening, automatically instantiate them too at runtime.
Don`t understand this:
It does not necessarily need to generate it automatically when the scene starts but being able to make them on the editor would also be fine.
I hope that clears my NON-ANSWER up for you.(as it`s placed in the comments section, not Answer section etc)
Thanks dude. I really hope you solve your problem or somebody on here will write you entire mechanic that instantiate multiple prefabs automatically and keep them on their specific paths. I don`t have time to do that for you i am afraid, though I could easily help you get further if you came across a problem with the code during your own experiements Gruffy
Wow @Folero! $$anonymous$$y second comment was indeed laced with retort yes, as I picked up on the fairly presumptuous nature towards reading the whole post in your reply comment, amongst others after that.
$$anonymous$$y first however, was really a message of good intent and one that has obviously been misinterpreted by your good self.
$$anonymous$$y frustration became less from the fact that I did not get a result but rather from the fact that you really bothered to just make an insult post without any intention to do anything besides trying to be funny.
If you look around these parts, you might find my comments and answers, they may at times have comedic value (this is subjective of course) but they have always been aimed at helping others where my skills allow me to do so, and I have always appreciated any response given by my peers on here too.
None of these are contributions that were aimed to raise a laugh or a giggle, though much more to help solve a problem for someone who has had a go, as was the advice given to me and many many many many others upon first entrance to this Answers forum. Like most, you may have not read how to post. It is ok, not to know where to go or what to do. it`s not so okay to turn up and ask for someone
Anyway, I wish I had just rejected your question now, ins$$anonymous$$d of being nice and accepting it in, then trying to help you out in the comments section.
But hey, to each their own. I hope someone else, with greater patience than I can help you out cos you just lost $$anonymous$$e. Take care Gruffy
Your answer

Follow this Question
Related Questions
How to instantiate prefabs between 2 objects like a path 0 Answers
Is there another way of making a Top-Down-2D Map other than generating hundreds of Spriterenderes? 1 Answer
how to instantiate prefab with Resources.Load ? 4 Answers
Generate unlimited map 1 Answer
how to set custom parameters to GameObjects and access them? 1 Answer