Questions tagged [unity-networking]
Unity 5.1 introduced a new framework to handle client+server networking, also known as UNet.
169 questions
0
votes
0
answers
69
views
How to disable lobby/relay for a project in Unity?
Me and a friend created a basic multiplayer game in Unity using Netcode For GameObjects. We also used Lobby and Relay Gaming Services to make it easier to play with each other.
There is only one ...
0
votes
2
answers
272
views
How do I synchronize thousands of game object transforms?
I'm trying to synchronize 3-4 thousand game objects' positions and rotations. I need performance for my Unity game to remain relatively high (30+fps) and to keep the amount of data sent as low as ...
1
vote
0
answers
141
views
Designing a buff/debuff system in a multiplayer game
I'm new to netcode and game dev and I'd like some input on a multiplayer buff/debuff system I'm working on in Unity, using NGO with a dedicated server. I aim to use a server authoritative architecture ...
0
votes
2
answers
193
views
Is this enough calculation on server-side to be secure?
I'm a beginner about client/server calculations and relationships (never trust the client), and I would like to know if I did or didn't get the concept right.
My weapons are calling this function ...
0
votes
1
answer
240
views
Best way to create a 2 player networked game
I've been dabbling in Unity. I learned the basics and I've created a few small games and one larger one. All of them were single player games. Now I want to create a game that's a 2 player - pretty ...
0
votes
0
answers
345
views
Client Player not moving - NetCode for Game objects - NetworkTransform
when the host try to move it works perfectly fine, but on the client, the client player does not move
...
0
votes
0
answers
168
views
Not able to host a Unity Netcode Game on specific device, but I'm able to join as a client on the same device
I'm trying to create a Unity netcode LAN connection between a few devices. It works fine with a few devices as the host or the client, but some devices can only connect as a client and are not able to ...
0
votes
1
answer
242
views
Canvas that should only be visible for local player is also visible for remote players
I'm using Unity NetCode for Game Objects. I have a player Prefab, inside it I have a canvas as a child of my player Prefab (I don't know if it's the best approach), which contains inventory, status, ...
0
votes
1
answer
457
views
Unity HTTP webrequest is very slow on localhost
I'm working on an online game on my computer localhost. to do this I use Xampp.
Anyway, my problem is that the UnityWebRequests ...
0
votes
2
answers
491
views
Host & Client user input moving both Player prefabs at the same time
I have a player controller attached to the Player prefab - along with the NGO components
Network Object Client Network Transform Network Animator
In the Network Manager I have the Player prefab added ...
2
votes
1
answer
213
views
How can I secure my data in Unity?
I have a tenant ID and client secret that I use to access my server and return an API key for users. I put it in start()
However, hackers can decompile my game and access the server data. Is there any ...
1
vote
1
answer
5k
views
Issues using NetworkServer.Spawn with Unity and Mirror-Networking
I am using Mirror to handle the networking aspect
When I spawn an object on the network, I Instantiate it on the server and then use NetworkServer.Spawn to notify all clients to spawn the object.
...
0
votes
0
answers
48
views
Unsure why my transform are not syncing
I am using this Kinematic Character Control package
I setup some Character Controls and all looks like it works fine in local. I am trying to setup some basic Networking.
I installed Network for ...
0
votes
1
answer
1k
views
How do you upload an AudioClip to a server in Unity?
My current approach is to take an AudioClip, turn it into a byte array, then put it into an UploadHandler, attached to a UnityWebRequest, to send a POST request to a server.
Right now, when I pass ...
3
votes
1
answer
1k
views
Unity Netcode how to resolve responsiveness issues on the client?
I have been reading the Unity Netcode manual and other related articles, which explains very clearly why it is essential to care about latency. Still, I haven't seen good examples of implementing a ...
1
vote
0
answers
258
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 ...
1
vote
1
answer
253
views
Why nobody creates shared world games? [closed]
Vast majority of modern network games use "lobby" conception: when limited amount of players connect to a single lobby server and play the game in isolation from everyone else who is not in ...
0
votes
0
answers
442
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 ...
2
votes
0
answers
2k
views
How to Share Screen in Unity
I am trying to create a virtual workspace where one user can share his computer screen (and show what other Desktop applications are running) onto an in-game screen in unity. By researching I did not ...
0
votes
1
answer
3k
views
400 bad request UnityWebRequest
hey everyone any ideas why im getting a 400 error? im trying to post a json to a subscription list. doing that through postman works just fine!
...
0
votes
1
answer
213
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 ...
5
votes
1
answer
10k
views
How can I use websockets in a Unity WebGL project?
There are plenty of good Websocket APIs for C#, but I run into trouble when targeting Unity WebGL due to this restriction described in the Unity documentation:
No direct socket access
Due to ...
0
votes
0
answers
52
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 ...
0
votes
1
answer
101
views
Unity UNET Project suddenly does not work anymore
I have an older Unity Unet Game which I build 2 or 3 years ago and forgot about it. Now I wanted to show it to a friend but it does not work anymore. When I start the server as player1 in the editor I ...
0
votes
1
answer
221
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 ...
0
votes
1
answer
1k
views
How to instantiate a child object in UNet without it lagging behind its parent over the network?
When I use NetworkServer.Spawn(ob) t instantiate a game object and make it a child of a transform.parent after it spawns on both ...
0
votes
1
answer
5k
views
Difference between [P2P] Relay Servers and Dedicated Game Servers?
I came across this unity Unity conference video on buillding multiplayer games https://www.youtube.com/watch?v=CuQF7hXlVyk
Form, this image we can see there are 3 P2P methods
and 1 Direct client ...
3
votes
2
answers
309
views
Prevent multiple input packets to authoritative server
I'm working on a simple game with an authoritative server. The player can move in 4 directions on a 2D board.
The game samples input at 30hz and sends it to the server. The server also runs at 30hz. ...
0
votes
1
answer
300
views
How to save user progress and report on the server?
I'm developing a game that consists of many mini-games. We want the user username to be recorded and saved. Also, each time the user plays one of the mini-games, some reports for that specific mini-...
1
vote
1
answer
756
views
In Unity/UNet: How do you properly spawn a `NetworkPlayer`?
In Unity/UNet:
How do you properly spawn a NetworkPlayer? Right now, I'm doing it like this from inside a NetworkManager ...
0
votes
2
answers
3k
views
Why does the object spawn only on client?
In my game I have an object, let's say food, that whoever consumes it, that player will spawn one more element. I am checking collision in Update.
The following code is working fine on server side, ...
0
votes
1
answer
119
views
Unity MLAPI Instance server
I am currently developing a multiplayer game with unity using MLAPI sdk.
Right now i have an API Gateway for everything that is not directly gameplay and theirs also Zone servers AKA Gameplay servers. ...
2
votes
2
answers
7k
views
How to give and remove authority of an object between multiple clients (Or how to let the client controller push a rigidbody)
I'm doing a cooperation FPS game in which players can push big rigidbody cubes with their rigidbody characters (the one from the standard assets).
The problem is that the player hosting the game has ...
0
votes
0
answers
522
views
Download Progress bar from Firebase Storage
Im trying to make a progress bar based on downloaded images from Firebase storage, now firebase does provide a snipper which works per image
...
3
votes
1
answer
657
views
Start Broadcast Unity Network Discovery
I am using the unity NetworkDiscovery component, and I am wondering how I can auto-start broadcasting when the server starts, instead of the client having to click ...
0
votes
1
answer
82
views
How do I track 2 lights in real time with a camera and send it to a phone in Unity?
I am trying to track 2 lights and send that data to Unity for VR controller tracking. How do I get started? Do I make an app that communicates with Wifi or something? And how do I detect the lights? ...
1
vote
1
answer
1k
views
Communication between Photon Cloud game and web server
I am creating a multiplayer game using Photon Cloud (Photon Unity Network). For storage of player data (profile, inventory, achievments) I use web server (asp.net mvc & sql server). How to ...
2
votes
1
answer
1k
views
problem using OnStartServer() for unity multiplayer networked game
UPDATE: i am still scratching my head over this. The way i see it, the Awake() function is only invoked when I load it in the Editor, but if I put the prefab Loading line into OnStartServer() it just ...
5
votes
1
answer
7k
views
Unity and Thread for Reading UDP
I have a GameObject that reads sensor data coming in over UDP (formatted as JSON).
What I am observing in that my handshake (dataReady) is getting cleared by the Update() cylcle fast enough, and I am ...
1
vote
1
answer
894
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 ...
0
votes
1
answer
418
views
How Client send info to Host in Unity Multiplayer
I want to send player name and other details from client to host device. I have setup game for maximum two players connection.
Here is the code that I have tried multiple times with different changes:...
0
votes
0
answers
2k
views
"The server isn't currently responsive" error when trying to log into Unity Hub
I had reinstalled Unity and Unity Hub to fix package manager error, and when I try to log into Unity Hub after it installs, i get the following error
"The server is currently unresponsive"
I tried to ...
0
votes
0
answers
510
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 ...
0
votes
0
answers
1k
views
Unity Mirror Network Transform not working
I am having an issue with Mirror's network transform component in unity. Players cannot see each other move, and in the inspector window only the host's player moves (this is not updated to the ...
1
vote
1
answer
4k
views
Peer-to-peer Multiplayer Game [closed]
I built a casual game where the user answer the right word in random question. Now I want to make this game multiplayer (4 players) working on smartphones and tablets (Androird & iOS) where all ...
0
votes
2
answers
290
views
If i make a game in Unity where a player can host their own servers, will it still cost me more money?
I know that with Unity's networking system, you will have to pay Unity if you have more than X players on your servers at the same time. I believe this is because that Unity is hosting the servers, ...
0
votes
1
answer
226
views
Parse Data on runtime into JSON
I have been trying to work out a subscription form for my game and thanks to you guys here, I came to a solution which works but still needs some changes.
The idea is to have an input field in the ...
1
vote
2
answers
1k
views
How can I read a value from a file accessed via the Internet?
I have made text file and I put it on Dropbox, I have in this text file a value. From my code, I want to check if this value is 1.
I have tried this code, inspired by the Unity example, but it looks ...
2
votes
0
answers
420
views
How does a server receive every player input with a server-authoritative structure?
I've been having a lot of trouble understanding networking in fast-paced games. A server has a fixed tickrate, and the server receives input from clients at a fixed rate as well. Let's assume that a ...
-1
votes
1
answer
96
views
Unity mailchimp / Klaviyo subscription form
Hey everyone so i want to add a subscription form on my game. so far i can send data to a database and display them on a leaderboard, i found a similar question here but its a bit outdated. Ideally i ...