Questions tagged [unity-networking]

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

Filter by
Sorted by
Tagged with
1
vote
1answer
229 views

Unity networking, make player disappear for all clients

As title says I need to make the player disappear when he gets in car. Right now, it works as a single-player, but since I am new to unet I don't really know how to achieve this, I tried some ways, ...
1
vote
3answers
873 views

How do you get audio clips to play on all clients?

I am new to networking with so this is probably a noob question. For context I am trying to get a gunshot sound effect to play and be heard by all players.
1
vote
1answer
559 views

Random Disconnects on UNET

Using UNET, I can't host a game for more than a few minutes unless both server and client are on the same computer. It appears that I am not alone in this. Essentially, any latency problems or ...
1
vote
2answers
427 views

List of Lists for sending paths from client to server? [closed]

I have a client server scenario and I'm looking into distributed AI. I want the server to move x amount of ai characters around a map by pathfinding and then send the x amount of paths to the client ...
1
vote
0answers
87 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
638 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 ...
1
vote
1answer
2k 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. ...
1
vote
0answers
45 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
53 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
0answers
35 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
88 views

Does Unity's Unet LLAPI compress data?

Does the NetworkTransport compress and decompress the data sent through the network?
1
vote
0answers
174 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
174 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
578 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
405 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
1answer
719 views

Client not executing commands in Unet

Edit Okay, so I partially solved the problem by adding a rigid body component to the capsule. I read somewhere that apparently you have to have one in order to move on the server. Problem 2 The ...
1
vote
0answers
397 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
102 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
259 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
1answer
2k views

Unity Network how to move noplayer object from client side

When i drag a nonplayer object from host, client can see it, but when move the object from client, host player doesnt see any changes. How can i fix it? ...
1
vote
0answers
197 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
566 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
902 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
4answers
5k views

How to receive broadcast message in Unity?

I am trying to get the broadcasted message in overridden method of NetworkDiscovery.OnReceivedBroadcast(). For that what I had done is below: I create class which implements NetworkDiscovery where I ...
1
vote
1answer
2k views

Unity 5 Command not being sent

I have a client server build in Unity 5. I want to send a command from the client to the server with a GUI button click, this is for testing purposes. So on my client all I want is to click a button ...
1
vote
0answers
513 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
157 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
1answer
2k views

Failed to spawn server object, Unity UNET

I'm familiar with Unity and programming but I'm new to this site. So I have an issue with clients on Unity. I start servers with no errors, flawless. But when I join a server as a client I get a ...
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 ...
1
vote
1answer
2k views

UNET Error handling

I am trying to handle errors received by a UNET (new Unity3D networking) client. The below code successfully connects to a server when it is present, but obviously gives a timeout error when there is ...
0
votes
2answers
902 views

Unity - DontDestroyOnLoad - FindObjectsOfType(GetType()).Length is always returning 1

I'm trying to have an object with the DontDestroyOnLoad property. I want an object with NetworkIdentity to persist across scenes, so I can have a holder script for ...
0
votes
2answers
77 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
1answer
348 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 ...
0
votes
1answer
2k views

Unity Networked gaming 2019… What happened to NetworkBehaviour, OnServerStart() etc

After a long break, I am now trying to learn some basics in networked gaming in Unity. I've installed the latest beta client (because I want to ultimately make a network multiplayer game but it will ...
0
votes
1answer
7k views

Objects spawned on clients only appear locally

I'm trying out the new Unity 5.1 networking for a Bomberman style game and i can't seem to get the bombs to instantiate on both the client and all those connected, what am i missing? The code below ...
0
votes
2answers
115 views

Unity - Instantiate GameObject from client on Network

I am building a game where a weapon shoots prefab bullets. I am trying to make this a multiplayer game, so the bullets need to be spawned into the Network. What ...
0
votes
1answer
136 views

Difference between Unity's [Command] and [Server]

[Command] and [Server] functions both run on the server and can also be called by a local player but what is the difference between them?
0
votes
1answer
116 views

Implementing online connectivity and multiplayer/PVP for a newbie

Background I'm a noob programmer looking to create a simple turn based mobile game as a side project. I've pretty much got the game logic down and am left with implementing the online multiplayer/PVP ...
0
votes
2answers
595 views

Getting ip address of connected network

I have two scripts, a server script and a client script. I built two parts of the app, one with the client script and another one with the server script. I put both apps on devices, connected two ...
0
votes
1answer
656 views

Unity UNET, problems spawning and then destroying that instantiated prefab

I am very new to networking, and have ran into an issue, read below. I have multiplayer system setup, where players can spawn, they can pick up weapons and drop them, there is an object representing ...
0
votes
1answer
1k views

How do I use Unity's OnPlayerConnected method?

https://docs.unity3d.com/ScriptReference/MonoBehaviour.OnPlayerConnected.html ...
0
votes
2answers
3k views

How do I use Unity's TargetRPC calls? Trying to send data from the server to a client

I want to send a large amount of data to only one player, as it would be wasteful to do this for every player when only one player needs the data. After a bit of research, it appears that TargetRPC is ...
0
votes
1answer
331 views

Unity low level network API

I was trying out Unity Network LLAPI, I am following the this tutorial. I wrote everything the same, my server starts well and good with no errors. When my ...
0
votes
1answer
202 views

How to make local keyboard input move only the local player, not everyone in networked multiplayer?

I am working on Unity Networking and following this Tanks Networking tutorial: https://www.youtube.com/watch?v=V6wEvT6G92M Problem is that the keyboard inputs move all the tanks in the scene. It is ...
0
votes
1answer
263 views

Unity Multiplayer functionalities or Google's plug-in?

I want to add multiplayer matches to a game I'm making for Android/PC, and something echoed in my mind: would the network functionalities Unity provides work in Android? I ask this because Google has ...
0
votes
1answer
669 views

Unity3d multiplayer canvas

so I am making multiplayer game and I stuck on one thing, I have blood overlay canvas in my scene(you know, in fps games if somebody shoots you your screen becomes red and this stuff), and when I ...
0
votes
1answer
143 views

The best way to pass data between clients in a room

I am developing a backgammon game in Unity and tried to use Photon. But I could not find a step by step help for it and I also know that photon in real-time and it syncs data over 10 times per second. ...