Iam doing a Tetris game.I have to add a preview of tetriminos.Currently the tetrimino’s prefabs are spawning using the below method.but,I want to first see them at preview position and then copy the same to game area. can you help me
public void spawnNext()
{
// Random Index
// Random Index
count = count + 1;
int i = Random.Range(0, groups.Length);
// Spawn Group at current Position
Instantiate(groups*,*
Just copy your code again and change the position to be wherever your preview window is located.
//Spawn your prefab in your game
Instantiate(groups*,*
transform.position, Quaternion.identity); } //Spawn your prefab in your preview location Instantiate(groups*,* GameObject.Find(“Preview Window”).transform.position, Quaternion.identity); } If your Preview window isnt in the world and is a UI element or something, just put a Image element on the UI, and have that image sprite change to whatever the image that corresponds with that block is. Youll just need to make an image for each type of block in your game.