Answer the question
In order to leave comments, you need to log in
How to make "coins" from tiles?
I would like to know how to make coins for the game from tiles. I just have coins in the game that are approximately the same as in Tomb of the mask, there are a lot of them. The question is how to make them in the form of tiles, so as not to arrange them manually? Can you post an example? Or is there another way?
Answer the question
In order to leave comments, you need to log in
Create a script, create a prefab for a coin with assets, calculate the position where you need to start placing them and what the difference in distance should be between 2 nearby coins. And in start() loop through them at the starting position, each time changing it to a distance. This will be much more automatic:
public GameObject coin;
public Vector3 start_pos;
public float outline;
public int c;
void Start(){
for(int i = 0; i < c; i++){
Instantive(coin, start_pos, Quaternion.identity);
start_pos.transform.position += new Vector3(outline,0f,0f);//Или изменяешь по y или z.
}
}
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question