Hello, I’m struggling with a problem and I would really appreciate some help in order to solve it.
I use Mirror for multiplayer on LAN
My game is a 1 vs 1.
The playerPrefab has many possible configurations, so I use scriptable Objects :
Short example
Player is a scriptableObject which has :
-speed
-power
-list of weapons ( weapon is a scriptableObject too )
First, you have the selection Player Menu (Offline) : you select all the caracteristics of your player.
(which player, which weapon, etc…).
Second, Network connection : the next step is exactly the same as the “Room” Mirror Example
(host or join => waiting room for all players => start the game when both are ready)
So there are 4 scenes and they occur in this order :
Menu for player caracteristics selection (offline)
Menu for choosing Host or Join (offline)
Menu for waiting both players tell that they are ready ( online )
Game Scene ( online )
What I do :
I record all player caracs choosen inside an Object at the first menu.
What I want :
When the playerPrefab is instantiated :
Load the right scriptableObjects associated to the caracteristics selected in the first offline menu.
I also want the prefab enemy to load the right scriptableObjects associated to the caracteristics he selected on his own side.
My question is :
How can I be sure that each player has its own player instanciated with good caracteristics at the start of the game and see the player Enemy with its own caracteristics ?
I’m new to Networking for few days, is it a mistake to select Player caracteristics offline ?
If it doesn’t matter, I would prefer to keep the player selection offline
Any help or directions for solving my problem would be greatly appreciated !
Thanks !