♟️ Create an Online Chess Game – Spawning Chess Pieces – 2/5 [Unity tutorial 2021][C#]

We spawn 3D Chess Pieces on top of the tiles created last episode, and position them where they belong. We create them in a multi dimensional array of Chess Pieces, and define a new c# class for every single one of them. Pawn, Rook, Knight, Bishop, Queen and King will be inheriting from a base class called Chess Piece

Be careful as I’ve misplaced the king and queen on their X index, sorry!

Link to the Chess Assets, by my friend Z3nder (affiliate) :

– – – – –
0:00 Preview
0:34 Defining Pieces
5:45 Creating Pieces Prefabs
7:15 Spawning a Single Piece
12:30 Spawning ALL the Pieces
17:08 Positioning the Pieces
– – – – –

►♟️ Learn how to make a Online Multiplayer Chess Game (on Youtube!)

► ⚔️ FREE Top Down RPG Course (on Youtube!):

► Develop a FULL Mobile Game with the help of my Udemy Course :

► Want the files? You can find everything on the website!
► Need help? Join our discord community!

Discord 👊
Website 📡
Email me! 📧 [email protected]

Personal channel 🇨🇦

Social Media 🤳

#gameDev #unityEngine #unityTutorial #n3k #epitome


  1. How to make the chess piece rotate in direction when movingthat is, when the queen moves diagonally, it will rotate 45°

  2. En este vídeo no hay cagadas, pero como he tenido que usar otro conjunto de assets he tenido que añadir código para gestionarlo porque el caballo es más grande de lo normal y el peón no se posicionaba a la altura correcta.

  3. why I can’t generate the piece right on the chessboard?

  4. Since the channel name isn't EpitomeGames anymore I thought this was one of those re-uploads.

  5. I have an issue, when I try to apply the new material to the meshRender it says this "MissingComponentException: There is no 'MeshRenderer' attached to the "Queen(Clone)" game object, but a script is trying to access it.You probably need to add a MeshRenderer to the game object "Queen(Clone)". Or your script needs to check if the component is attached before using it." at is not letting me to change it. Someone knows how to fix it?

  6. Epitome it really cool project thanks but can you make different gun buying system and how to use plz iam u are subscribe.

  7. Help! All my code is accurate, but around line 144-146 in 'SpawnSinglePiece' method i get an error in Unity when i start the game saying:

    NullReferenceException: Object reference not set to an instance of an object
    Chessboard.SpawnSinglePiece (ChessPieceType type, System.Int32 team) (at Assets/Scripts/Chessboard.cs:146)
    Chessboard.SpawnAllPieces () (at Assets/Scripts/Chessboard.cs:117)
    Chessboard.Awake () (at Assets/Scripts/Chessboard.cs:28)

    I only have 1 piece on the board. Not an Array of pieces.

    I messed around with changing the number value in the Instantiate function from 'type – 1' to 'type – 2' and so on. It always only changes 1 piece or none.

    How can I fix my issue?

  8. Perfect explanation and clear speech, so even me, a guy from Russia, can understand everything. Спасибо!

  9. hello, you have highlighted a possible move on click of the grid position.
    If we have to highlight the possible moves on click of the chess pieces, then how can we do it. Can you please put out a sample of that?

  10. Clarifiying coding processssss
    Thanks to you, I can learn a lot!

  11. I'm at "Spawning a Single Piece" and I can't get the Instantiation to work… Anyone know where I might've gotten something wrong?

  12. Hey man for some reason the chess pieces are not color coordinated like yours is, when I choose the team color on it, it looks weird, it's not as smooth as yours, when I change the thing from renderer to something other than lit it changes, but not perfectly what I wanted

Leave a Reply

Your email address will not be published. Required fields are marked *