Skip to main content

Questions tagged [mirror-networking]

Mirror is a high level Networking API for Unity. It serves as a replacement for the deprecated UNet. The official website is https://mirror-networking.com/.

Filter by
Sorted by
Tagged with
3 votes
1 answer
68 views

Compiling Unity to WebGL gives a Node ESM module error

I'm trying to build my multiplayer game to WebGL in Unity (using Mirror). However, when I press "build", it gives me the following three errors: ...
kalilamodow's user avatar
0 votes
0 answers
33 views

How to make an authoritative server initialize 3 cards once 2 "Clients" join

I somewhat understand [Command], [ClientRpc], and [TargetRpc]. However, I am currently struggling to determine how to get my SetupInitialHand() method to run. When called from the same area that ...
SmileyTheMimic's user avatar
5 votes
1 answer
776 views

How to make an authoritative server assign turn order numbers to players once they join?

I'm having trouble developing and understanding Server code. Currently, I'm trying to have each person that joins the Server be given a single digit ID that can then be used for determining turn order ...
SmileyTheMimic's user avatar
2 votes
1 answer
123 views

How to Develop Card Combat System/Manager

I'm looking for some guidance on how to develop a card combat system similar to Legends of RuneTerra auto combat. I'm a bit lost on how to get the proper card info from each drop zone (5 each player) ...
SmileyTheMimic's user avatar
1 vote
1 answer
97 views

How to mirror card placement over network

I'm not sure what logic I can use to place each card in the correct position. Example, I place in my middle drop zone (AllyDropZone (2)) and it appears the opposite way for my opponent (EnemyDropZone (...
SmileyTheMimic's user avatar
0 votes
1 answer
151 views

Unity Mirror AWS clients won't connect to server

My Unity project uses the Mirror Networking component and I am using an AWS free tier EC2 instance to host it. I configured the instance following this guide from the Mirror documentation, including ...
Michael's user avatar
  • 51
0 votes
1 answer
154 views

Unity Mirror Networking Audio Behaves Differently on Host and WebGL Client

I am creating a system in Unity using Mirror Networking which will only require one host/server and one client. It is a WebGL build so the client will connect on a browser. I want to send commands ...
Michael's user avatar
  • 51
0 votes
0 answers
45 views

OnServerSceneChanged not executing

I've been trying to make a multiplayer game with mirror networking. The Network Manager works correctly when it comes to changing the scene, but the ...
koogel's user avatar
  • 79
0 votes
0 answers
87 views

VR-Game - Synchronize Transform using Unity 2021, Mirror Network and XR Interaction Toolkit

I am trying to create a simple VR-Game with objects that can be grabbed by the players and placed in a space. I am using the XR Interaction Toolkit to make the objects grabbable and the Mirror Network ...
Pabe7485's user avatar
0 votes
0 answers
729 views

Unity Mirror Networking and child object transform sync issue (VR co-op)

I'm first time trying to setup multiplayer/co-op game mode for the VR game. Currently just trying to get the avatars to move similar fashion to all clients. Issue atm is that I can read the head ...
joonasj's user avatar
  • 101
0 votes
0 answers
38 views

Both players turn around at the same time

i got the main camera following the players but once a player rotate to left or right the other player would do it too at the same time. I noticed that the event happens on void Turning() (on the ...
RandomNoobDev's user avatar
1 vote
0 answers
200 views

FPS Networking Rollback Algorithm

I'm attempting to implement rollback networking for an FPS game right now, but I'm not entirely sure about how to proceed. From what I know, it is bad practice to send over client positions whenever ...
TakeMeHomeCountryRoads's user avatar
0 votes
0 answers
302 views

How to spawn object in a multiplayer game, without triggering "NetworkClient is not ready" error?

I'm trying make a multiplayer game, using Mirror, but can't get the health indicator to spawn. An error message appears: Send command attempted while NetworkClient is not ready. ...
Iya's user avatar
  • 1
0 votes
0 answers
116 views

Unity Mirror Enemy Spawned, but sprite not showing

I am using Mirror's Scene Interest Management. I am creating a server only then in another instance joining as client. My player loads into the scene and then the enemy spawner begins to spawn enemies....
pizzarob's user avatar
  • 101
0 votes
0 answers
58 views

Make new clients play in their own scene

I'm building a game where a single player fights waves of mobs to earn a high score. I'd like to use mirror to add server authority. In the first instance this looks like a single player game. So ...
pizzarob's user avatar
  • 101
0 votes
1 answer
750 views

How to reconnect a client to a match (not the server)

In a multiplayer client-server Unity project using Mirror networking, I have a matchmaking system where the server matches two players and gives them a MatchID. The ...
Saleh Hosseini's user avatar
0 votes
0 answers
63 views

Why don't my pieces shuffle on the client's end?

In my game there is a 'Shuffle()' function that both clients and the host can access that shuffles pieces around on a board: ...
kayra yorulmaz's user avatar
0 votes
0 answers
390 views

Multiserver support in Mirror [Unity]

Is there any mechanism in Mirror networking library to scale the load in case single server gets overloaded? There is possibility to use "lobby" conception, but if you want all players to ...
AseN's user avatar
  • 113
0 votes
1 answer
173 views

Synvar not syncing when Instantiating gameObject

I am instantiating a gameObject server-side using the code below. The problem I am facing is that the SyncVar "PlayerUnit" is null on the client, even though I referenced a networked ...
ToltottKaposzta's user avatar
0 votes
1 answer
186 views

Unity Multiplayer Sync Bools

I have a little problem with syncing booleans on my networking game. I use the Mirror-Package for networking and use KCP for transport. When the players basicly collide each other (using a sphere ...
aleqkzander's user avatar
0 votes
0 answers
492 views

Unity XR toolkit and Mirror networking, grabbing

I am new to both XR toolkit and Mirror and I have this problem that when I try to grab a box in online scene. It didn't work even thought it worked on the offline scene when I test it. anyone got any ...
Grandpa Fox's user avatar
0 votes
1 answer
3k views

Getting XR Grabbable items networked with Unity

I'm trying to get XR Grabbable objects networked in Unity, with the networking framework Mirror. This should be a simple task as Mirror has a component called "NetworkTransform" that simply ...
Richard Muthwill's user avatar
0 votes
0 answers
158 views

How can I display and sort a game server list by latency in a scalable manner?

If I have a game that allows players to self-host a multiplayer session which other players can join by browsing a game server browser to select a game I ideally want to be able to sort that list by ...
Xefan's user avatar
  • 101
0 votes
1 answer
4k views

Mirror Create Player From Client and Change Scene

I'm very new to Mirror in Unity but I have a lot of experience in Network-programing. I'm currently trying to create a Game, where the Player's data is stored on the client, and can join different ...
Jonas Re's user avatar
0 votes
1 answer
632 views

Why players who join late can't see other people data?

I want to show the name of the players above their head but I have a problem where people joining late doesn't get other players' name. For example: Player 1 joins to the server with the name Peter. ...
shlime's user avatar
  • 23
0 votes
1 answer
3k views

Unity Mirror client scene.local player.connection to client.client owned object not working in client

U hmm I'm new to mirror networking I just wanna find objects that the local player has authority, but it doesn't work on client, is there a solution to this? Well I could make an object tracking ...
henry blue throttle unedited's user avatar
0 votes
0 answers
956 views

What's the better approach, running multiple server-builds on one instance or running one server-build and managing matches in different rooms?

We are building a racing multiplayer game using Mirror and Unity and we've been able to successfully run the authoritative server on AWS-Gamelift and Playfab so far. Both providers are with the ...
waleed's user avatar
  • 101
0 votes
0 answers
891 views

Scene's network objects are disabled when building server separately

If one of the clients is also the server then this situation does not happen and networked scene objects are visible. But when building the server separately and then when a client is connected, all ...
Çağatay IŞIK's user avatar
0 votes
0 answers
440 views

Mirror Networking; How to Pass/Sync c# actions?

Since you can not pass actions as parameters to commands and rpc calls, how would you sync actions ? My main goal is to find an easy and generic way for objects to easily do actions from their local ...
Çağatay IŞIK's user avatar
1 vote
2 answers
3k views

Unity 3D mirror, sync player spawn name

I am using Mirror for doing my little multi-player car racing project which I want to rename the game object automatically after the NetworkManager auto create the game object. Here is my ...
HCCY's user avatar
  • 11
0 votes
1 answer
499 views

Moving non-local player from local player with Mirror Networking

i am using mirror networking which is based on UNet. I can move non local objects easly by assigning their authority to the local player and move them, but i can't assign/remove authority for other ...
Çağatay IŞIK's user avatar
0 votes
1 answer
104 views

Synchronize running code over the network Unity

I want my code to run/perform the same on different Unity clients. I don't know if this is hard to achieve. Here hare my problems: The enemies movement: I have a pathfinding that should always give ...
kyu's user avatar
  • 35
6 votes
1 answer
9k views

How do I get the local player?

I'm using Mirror as UNet is deprecated. How can I get the local player GameObject in my code?
Banana's user avatar
  • 243
0 votes
1 answer
2k views

How to change player objects when switching scenes?

I have a scene for lobby. When player connects to server he gets a lobbyCharacter, which is an empty gameobject with a script on it that create UI element with the players name. In lobby players can ...
Marko Taht's user avatar
1 vote
1 answer
858 views

Mirror/Unet, RegisterSpawnHandler throws invalid asset Id error because assetId is 0 for dynamically loaded assetbundles

Its weird how documentation literally states that For more advanced uses, such as object pools or dynamically created Assets, you can use the ClientScene.RegisterSpawnHandler method But seems like ...
Nick's user avatar
  • 561