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
0
votes
0answers
24 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
29 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
1answer
45 views

Can't join to room through Unity's Matchmaking system on the Internet

It works perfectly when I try to connect locally from my editor to my running build. But after I start the server on my Android, and try to connect to it from my editor, it time outs: As you can see,...
3
votes
1answer
512 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 ...
1
vote
1answer
440 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 ...
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 ...
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 ...
2
votes
1answer
941 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 ...
1
vote
1answer
535 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 ...
2
votes
1answer
132 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 ...
0
votes
2answers
2k views

Object spawn only on Server in multiplayer unity3d game

In my game I have an object let say food, whoever eat that food that player will spawn one more element. I am sharing code here :- I am checking collision in Update. Following code is working fine on ...
0
votes
1answer
63 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) ...
1
vote
1answer
840 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 ...
0
votes
1answer
156 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
54 views

How to make it so that players can only see one specific player but not the others?

I'm developing an educational game whose main mechanics are not multiplayer-oriented. However, I would like to add a feature that allows the teacher to enter the game and all students can see him, but ...
0
votes
0answers
28 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
80 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
36 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 ...
1
vote
1answer
1k 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
0answers
41 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
931 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
2answers
103 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 ...
0
votes
1answer
44 views

Networking - assigning IDs to entities

Maybe I'm asking dumb question, but this problems bothers me... So I have my networked game in Unity (client), and server written in C# (without Unity). I Use ENet library for networking. Most of ...
1
vote
0answers
31 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 ...
0
votes
0answers
70 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 ...
1
vote
1answer
1k 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 ...
2
votes
0answers
149 views

Simple networking, now that UNet is deprecated [duplicate]

I'm prototyping a two-player typing game in Unity. I don't have any experience making multiplayer games, so I'm not sure how to best approach the netcode. For this game all I think I really need is ...
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: ...
3
votes
1answer
4k views

How can the Server send a message to a single Client?

I'm trying to send an Rpc, or any sort of message, to a specific client instead of to them all. I'm completely at the loss trying to associate a ...
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
1answer
63 views

SerialPort() data reading slowing down Unity

I am sending a few data from Arduino Uno to Unity using serial Port, baud rate is 115200. Still Unity is response time is pretty poor. At first it takes fraction ...
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 ...
3
votes
1answer
370 views

Unity3d UnityWebRequest EscapeURL standard does not match Swift url encoding. How to decode it?

How should I decode escaped URL by unity in Swift? I am developing a game with Unity3d. Something MMORPG. With server implemented by me in Swift under ...
0
votes
1answer
27 views

Synchronized non-local CharacterController's velocity is stuck at the last movement in Unity3D

I have CharacterControllers as players in my multiplayer scene, and they got NetworkTransforms attached, with ...
0
votes
2answers
92 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
0answers
204 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
69 views

Network Message Registering message handler Problem

I have a confusion about when and where to use NetworkServer.RegisterHandler() and ...
0
votes
1answer
35 views

Use of NetworkHash128 assetId in Custom Spawn Handler

I was learning Custom spawn handler on Unity Manual. It says before spawning we need to Register Spawn handler using ...
1
vote
1answer
843 views

Weapon Switching - Unity 3d

when I switch between weapons by Number [1 2 3 4] the weapon don't switch between them but the variable " selected weapon value changed" anyone help me, this my Code and screenshots! ...
0
votes
1answer
638 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 ...
3
votes
0answers
142 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 ...
0
votes
2answers
2k 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 ...
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 ...
0
votes
1answer
6k views

How to correctly sync an ArrayList of GameObjects on a server/client

I'm experimenting with networking in Unity and I can't seem to get an ArrayList of GameObjects to sync from the server to the client. Here is the relevant code: ...
0
votes
1answer
102 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?
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 ...
0
votes
1answer
100 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
1answer
555 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
2answers
745 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 ...
2
votes
1answer
292 views

Enter in a match that is already started

In my Unity mobile game, I need multiplayer online functionalities. All the players should be visible in the world at any given time (of course, with some filtering), and a player should be able to ...