Questions tagged [unity-networking]

Unity 5.1 introduced a new framework to handle client+server networking, also known as UNet.

54 questions with no upvoted or accepted answers
Filter by
Sorted by
Tagged with
5
votes
0answers
2k views

Unity3D LLAPI and Pyhton UDP communication

I need a Unity3D game on Android to receive UDP packages from a Python script running on a different device. Using System.Net is not (yet) an option, as it is only supported on Android with a valid ...
4
votes
0answers
234 views

Networking and physics

Context I have been implementing my own networking for a third person multiplayer game, but controls and physics will be ala old school FPSs. I'm using Unity's transport layer, which allows me to ...
3
votes
0answers
147 views

Object pooling in Multiplayer Game. Physics not synchronizing well

I implemented object pooling for my multiplayer project. Following Unity Manual I used custom spawn handler for shooting bullets. Bullets game object has rigidbody so selected Sync Rigibody 3D in ...
3
votes
1answer
514 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 ...
3
votes
0answers
231 views

UNET Performance of (many) Kinematic Rigidbodies

I am building a game in Unity in C# using the UNET networking elements. I am trying to figure out what is the performance cost of kinematic rigidbodies? My understanding is that, when kinematic, ...
2
votes
1answer
136 views

Load order of networked objects in Unity

I am making a 2D RTS, and am trying to get a multiplayer version working. I've run into some problems with the order that scripts are getting executed. For the host everything runs fine, but when a ...
2
votes
1answer
942 views

Unity 5.x Network Synchronization Concepts

Bear with me, It will be long read^^ I am working on the new Unity Networking system. I was using Photon and old (legacy) unity network API's before. But as it seems there are some good benefits of ...
2
votes
1answer
2k views

Unity 5 Networking Send Rate: Send Rate is Zero but server movement is still happening

I have a client server scenario, just a player moving about on the client and he moves about on the server using the built in networking provided in Unity 5. I have my client scene running in the ...
1
vote
0answers
46 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
vote
0answers
32 views

Destroying a networked projectile and creating a client side visual for all clients in Unity?

I'm making a shooter in Unity with UNET, and of course I handle projectile (like arrows) collision on the server. The arrows are Networked rigidbodies with NetworkBehaviours, and I would like to ...
1
vote
0answers
51 views

How to implement a network proximity checker in Unity using LLAPI?

I'm trying to implement a network proximity checker using my own functions in Unity, using LLAPI. How can I implemnet a network proximity checker, with similar functionalities than the ones in the ...
1
vote
0answers
21 views

Share content FROM Facebook, not to it

Regarding Unity 2018.x: The Facebook SDK provides a way to get log-in information from a user's FB account, and allows information or an image from an app to be shared TO Facebook. Is it possible to ...
1
vote
1answer
456 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 ...
1
vote
0answers
34 views

I wanted to create a simple mobile online game for me and my mates. How should I handle the networking?

I've made a few simple games and one multiplayer game where you connect through LAN but for this one I wanted to learn something new. I have the game concept working on my computer, it's just waiting ...
1
vote
0answers
85 views

Does Unity's Unet LLAPI compress data?

Does the NetworkTransport compress and decompress the data sent through the network?
1
vote
0answers
158 views

How to transmit data structures larger than the allowed packet size?

The player avatars in my current project are rather complex and can be configured in a variety of ways. Configurations can be saved and switched between during the game, similar to e.g. an RPG where ...
1
vote
0answers
173 views

Unity Game with Voice Chat

Have been working on a Poker game, it is network based and instead of launching game instance on server. I have managed everything via www class and on server created PHP API. Now PHP is taking care ...
1
vote
1answer
541 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 ...
1
vote
0answers
359 views

Unity multiple servers for rooms

I have an FPS game that I'd like to make multiplayer. It would need to support multiple matches at once with about 10 players in each. However I want physics to be server-authoritative so that means ...
1
vote
0answers
382 views

Help needed, following Unity multiplayer Health-Bar tutorial. Only working on Server Host instance of the game

was really hoping someone can be good enough to look over my code, I've been trying to fix it for several days. I followed the Unity tutorial which is fairly basic but the bit that confuses me (and ...
1
vote
0answers
101 views

Are ClientRpc calls unsafe? How does a Unity server account for enforcing state concerning these?

I have recently picked up learning Unity3D's networking API, and have been following their multiplayer networking tutorial. I just got to the topic "Death and Respawning" and am concerned ...
1
vote
0answers
252 views

How can I instantiate and sync a LineRenderer in multiplayer network?

I am trying to make a laser that will be visible to all clients in a multiplayer networked game on Unity. I've tried using a Command Attribute but that hasn't worked. I also found some ideas to use ...
1
vote
0answers
2k views

ClientDisconnected due to error: Timeout UnityEngine.Networking.NetworkIdentity:UNetStaticUpdate()

Why am I getting this error. I think it has problem with port so I change port number and still getting same error. yesterday it was working fine but when I start today it giving me error like this. ...
1
vote
0answers
196 views

What is Unity NetworkTransport message encoding and signature

I'm new to exciting world of Unity, and I have problem establishing network connection using NetworkTransport API. I'm using NodeJS as server. And I have some questions. Does NetworkTransport....
1
vote
0answers
553 views

UNET (Multiplayer) calling [command] function twice

I am playing around with UNET but stuck into this weird problem/scenario while testing on same machine (unityEditor and buildRun to create "2 players/instances" The problem is weird interaction of [...
1
vote
0answers
1k views

UnityWebRequest and/or HttpWebRequest give 403 on Android with PUT

I am trying to post an image captured through my game to Facebook through their SDK, and as it requires a URI, I wrote a simple AWS Lambda function to take a byte array and upload it to an AWS bucket. ...
1
vote
1answer
850 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 ...
1
vote
0answers
512 views

UNet send message by Client.Send error

I'm try to implement client-server communication base on UNET. The problem i got now is send custom message to server, but the Client.Send always show error without my understanding. So what i'm wrong?...
1
vote
0answers
156 views

How do I allow clients to move a GameObject that exists on the server?

I started to delve into the UNet system for the first time the other day and I've run into a bit of an issue while testing on a localhost server. In the scene there is a Rigidbody ball that I want ...
1
vote
0answers
2k views

Switch UNet From LocalHost to IP

I have set my game up so that I can run one instance as host and one instance as client and I see two people in the room. How do I get from that setup to another computer (as client) connecting to ...
0
votes
0answers
82 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 ...
0
votes
0answers
44 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 ...
0
votes
0answers
29 views

WebSocketSharp For Unity

I have integrated WebSocketSharp with Unity 2018.4.14f1 and it works well with Android and IOS. I wanted to know that most of the other socket.io plugins for unity have a wrapper of Class Packet over ...
0
votes
0answers
84 views

Cost of Unity Local Multiplayer VS Unity Online Multiplayer

I know that making multiplayer games in Unity costs money because of the servers that are used in connecting the players. So basically its free upto 20 CCU and then it increases as per the CCU. Its ...
0
votes
0answers
73 views

Communication Between Client and Seperate host Unity Unet

I building a realtime multiplayer game like a small quiz game that players can able to join the game and then quiz master who handling the host will launch the game. I need to that how to do this ...
0
votes
0answers
45 views

Authoritative server running multiple Unity scenes

I want to develop a 2d multiplayer game using an authoritative dedicated server where each session contains up to 4 players and I thought of multiple ways to develop this and I can't decide what's ...
0
votes
0answers
1k 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
0answers
75 views

Unity network player synchronization issues with HingeJoint(s)

I have a vehicle with custom wheels which are connected to it by the HingeJoint components. Everything works perfectly when using this car in single-player mode. Wheels are actually as ...
0
votes
0answers
23 views

Networking and Timing issue

I have been trying to use the low-level API for UNET and the focus of this problem is this: ...
0
votes
0answers
26 views

Unity: How do I fix the players model rotation in a NetworkManager to spawn properly?

How do I fix the players model rotation in a NetworkManager to spawn properly? I created a game with the NetworkManager code. Player Model is a cone I made and imported. all works fine but when the ...
0
votes
0answers
216 views

Unity - Bullet spawns in wrong position in client

I am making a multiplayer game with prefab shooting, but unfortunately the prefab sometimes spawns in the wrong position when I shoot from a client. The bullet ...
0
votes
0answers
72 views

Network Message Registering message handler Problem

I have a confusion about when and where to use NetworkServer.RegisterHandler() and ...
0
votes
1answer
167 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
1answer
66 views

Message Passing b/w “LAN Server Only” and “LAN Client” on Different Scenes in Unity

I want to pass message back and forth on client and server which are on different scenes, how can I do that in Unity?** Following is my Scenario:- I have 5 scenes- BaseScene (2) OfflineScene (3) ...
0
votes
0answers
147 views

What's wrong in switching Script - Unity Multiplayer

I'm trying to switch between weapons but when I want to display another screen "some example" in client I don't see any change! This screenshot shows what I mean. [1] : https://imgur.com/uEUOFhC "...
0
votes
0answers
80 views

Unity Photon multiplayer :: check distance between two players

How to get distance between two player in a photon multiplayer game. Condition is both the player is moving. I have tried something like this, in my player control script: ...
0
votes
0answers
109 views

How is Unity's [Command] supposed to behave?

Here's a very simple class/call hierarchy: ...
0
votes
0answers
1k views

RTS Networking in Unity: Client-Server vs. Lockstep

I am trying to make a RTS game in Unity, and I've got a few non-networked features working and so I want to start working on the multiplayer aspect so I don't dig myself into too deep a hole with ...
0
votes
1answer
900 views

How to instantiate GameObject on client without network?

When I NetworkServer.Spawn(ob) a gameobject and make it a child of a transform.parent after it spawns on both the server and ...
0
votes
0answers
480 views

why command is not executing on local player

I am getting very strange behavior, if my player instantiate as host (Server+Player) then my command function runs perfectly and certain object become instantiate but if I join the host then my ...