How do I create dictionary with 3D Objects?

I’m currently trying to convert this 2D code (sprite) to 3D (3D game objects), but I don’t know how. Can anyone tell me how to convert these things? This is the code

void InitializeSpriteDictionary() {
	
	spriteDictionary = new Dictionary<char, Sprite> ();
	spriteDictionary.Add (' ', none);

	spriteDictionary.Add ('r', blackRook);
	spriteDictionary.Add ('n', blackKnight);
	spriteDictionary.Add ('b', blackBishop);
	spriteDictionary.Add ('q', blackQueen);
	spriteDictionary.Add ('k', blackKing);
	spriteDictionary.Add ('p', blackPawn);

	spriteDictionary.Add ('R', whiteRook);
	spriteDictionary.Add ('N', whiteKnight);
	spriteDictionary.Add ('B', whiteBishop);
	spriteDictionary.Add ('Q', whiteQueen);
	spriteDictionary.Add ('K', whiteKing);
	spriteDictionary.Add ('P', whitePawn);
}

Regarding the dictionary code, I suspect you will simply want to replace “Sprite” (a flat image) with “Mesh” (a collection of 3D verticies, that makes up a set of triangles, and info about them). Obviously, you will also need to change all those sprite references, like “whiteRook”, into Mesh references.
e.g.

(dictionary creation)

meshDictionary = new Dictionary<char, Mesh> ();

(mesh reference declaration)

public Mesh whiteRook;

A Mesh, just like a sprite, can be stored as “Assets” in your project folder. Usually they are created in another program, and imported.

Edit: I think Cherno’s comments are referring to the next step, changing the scene objects to render Meshes, rather than sprites, and I agree.