I'm in a very early state of the game, it is just a Room(1-8 players)
card game.
The idea is this:
Have one dedicated server (One single scene) which contains the next tree:
- NetworkManager
- ServerManager
- Games
- Game 1 (Prefab 1.1)
- RoomManager
- InGameManager
- Game 2 (Prefab 1.2)
- etc.
I don't want to use multiple scenes in the server because I just want to store all the info of multiples games in the different managers, and instantiate the prefabPlayer
in RoomManager
and move them to InGameManager
in the startGame().
The main problem im having is with the comunication between client and server cause its a little non-intuitive. The [Command] function in all the examples and codes i saw its done in the client side Player GameObject to do it on the Server side Player GameObject. But i dont have any idea about how to just create a game.
I have in my ServerManager
GO a method called "CreateGame()"
, but is not attached to any playerPrefab
or anything known by the client directly.
Being in my client side I cant do a [Command] to CreateGame
cause I cant find that function (Ofc
cause isnt in my playerprefabGO
) but how do I call those """External Methods"""
to create a game or join a game or other thing out of the proper player (ConnectionServer.CreateGame
or something like that -.-'')
Tried using commands, RPC
, etc. but I cant understand the logic out of the players.
ChatGPT
abuser here and even with that I cant realize how to do it.