Questions tagged [unity-networking]

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

56 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
211 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
102 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
492 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
228 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
120 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
930 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
23 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
41 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
313 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
33 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
81 views

Does Unity's Unet LLAPI compress data?

Does the NetworkTransport compress and decompress the data sent through the network?
1
vote
0answers
119 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
167 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
447 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
314 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
353 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
91 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 about the ...
1
vote
0answers
246 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
189 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
519 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
773 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
506 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
154 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
38 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
17 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
17 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
113 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
34 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
22 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
29 views

How to create Simple Click multiplayer test Game with photon

I am trying to create a simple multiplayer test sample with unity and photon but unable to do so. I am watching the tutorial and reading for 2 days. Now I know how to connect the player to a server ...
0
votes
0answers
24 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
15 views

Unity5 multiplayer healthtag update issues

I followed some tutorials about unitys UNET. I have setup a offline and online scene and can spawn player prefabs. I use "Command" and "ClientRpc" calls to update and sync some variables. For example ...
0
votes
0answers
171 views

Spawned Network Object with rigidbody moves at different velocity/angle/pos on the clients/host - Unity Unet Mirror

I am using Mirror API with Unity 2019 to make a basic multiplayer game. The game is a simple ice hockey style with cylinder shaped players and a cylinder puck. The players are spawned by Network ...
0
votes
0answers
22 views

Multiplayer game- Client Shooting backwards

Making a multiplayer game. The Host shoots properly but the other players would only shoot backwards. Shooting script: ...
0
votes
0answers
21 views

Unity MatchMaker not finding rooms on different computer

I followed tutorial about Multiplayer FPS by Unity. When I used MatchMaker on the same computer the game was able to find the Room. But when I used MatchMaking from a different computer it didn't work....
0
votes
0answers
157 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
198 views

Multiplayer Card Game using Photon Unity Networking

I'm making a card game using photon and an important issue i am facing is getting reference of other player objects that are instantiated on the network.The Card game allows players to swap cards with ...
0
votes
0answers
14 views

Custom spawn handler for Object Pooling

I've been working on creating object Networked Object pooling so I came across Unity's Manual Custom Spawn Function, and it worked, but the problem is that all clients are using the same pool. What I ...
0
votes
0answers
47 views

Network Message Registering message handler Problem

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

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

Here's a very simple class/call hierarchy: ...