- Home /
Too subjective and argumentative
Make a cube or plane appear in one spot or the other on game start
Hi, so I wrote out a huge paragraph explaining my situation and what I'm looking for, but it got deleted, so here's the short version
Long story short, making a game, need a cube to appear at either one set of coordinates, or another set of coordinates at the beginning of the game.
I'm bad at code, took it in college, got a basic understanding, but can't make it from scratch.
That was a lot more detailed, but this is the TL;DR version
Can anyone help with this? It would be greatly appreciated.
dude this site simply doesn't have "write code" questions, I'm sorry
I urge you to look at Random (ie "read the doco" to easily choose one position or anothre
to "set the position" of an object, it's very easy, just ".position =" (look at the doco for "position")
a very simple idea for you: simply place BOTH items in your scene, ok?
And randomly $$anonymous$$ETE either one or the other. it's just that simple.
if (Random.Range(0,2)==0) delete one of them else delete the other
to "delete" the item just look at "destroy" in the doco. Hope it helps!
try the forum for "help write code" questions champ
Sorry, but your question is not suitable for Unity Answers. Please use the Unity Forum for discussions such as "How to ...". Unity Answers is here to help you solve any specific problems you have.
Follow this Question
Related Questions
A node in a childnode? 1 Answer
Coordinate confusion 1 Answer
Database for a hangman game 0 Answers
How to open a video inside the unity scene? 1 Answer
Question about arrays. 1 Answer