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
1k 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
141 views

How can I send commands to only certain clients?

I am building a multiplayer game server with Unity. In the game there are players moving around the map. Now, because this map is quite large compared to the number of players, I was thinking to have ...
0
votes
0answers
101 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: ...
1
vote
1answer
114 views

How to release a new level without having to publish a new version

What can I do to extend the gameplay. So if I know that I will update the game with new levels and dont want to publish a new version every time I have a new level. How can I handle this. Ex: I have ...
1
vote
0answers
177 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
175 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 ...
4
votes
1answer
176 views

When creating a game, what are some architectural desgin concepts I can use to be able to port my game from single to multiplayer?

I am a software developer but, I mostly develop games in Unity. I have experience creating single player games as well as multiplayer games. I am at a crossroads where I am in the middle of ...
0
votes
0answers
111 views

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

Here's a very simple class/call hierarchy: ...
1
vote
1answer
584 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
715 views

Unity/UNet without a lobby: How do you get an ordered list of participants (network players)?

Please imagine a turn based multiplayer game. Right now there's no lobby in place and connections are established using Unity's Network Manager HUD. Now on the ...
0
votes
1answer
173 views

Unity Network No sound on other clients

I'm trying to play sound on other clients, so they could hear gunfire in the distance, but sound only works for the shooter. Here's my code: ...
1
vote
1answer
527 views

Unity Network Flip sprite renderer

So my 2D characters turn by setting flipX on Sprite Renderer. I'm trying to turn them on other clients, but sprite is turning only on local client. And only host turns for all clients. Here's my code:...
1
vote
0answers
420 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 ...
0
votes
2answers
937 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
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 ...
-1
votes
1answer
100 views

How to make a player walk over the network

First of all, it is a newbie question and I am a noob so ya. I am working on Unity with low level network API. I am able to ...
1
vote
1answer
727 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
401 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 ...
4
votes
2answers
11k views

Creating a master server for Unity game (Unity 2017)

I have a basic FPS game made in Unity. I am using the Unity NetworkManager, NetworkManagerUI and NetworkIdentity components that came with Unity. The game is working fine on my local network when I ...
1
vote
1answer
2k views

Unity multiplayer (online) - How to connect to a 'Client-Host' without using Unity Paid Service

I'm slightly annoyed with the official Unity guides here, because I have been following through some, and they have indeed helped me create a local network mulitplayer situation. However, at no point ...
0
votes
1answer
338 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 ...
1
vote
0answers
104 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 ...
2
votes
2answers
144 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
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 ...
2
votes
2answers
5k views

Unity - Manually sync location of players from server to client

I am new to Unity networking. I've set up my scene with NetworkManager and the Player prefab having NetworkIdentity. I originally had my players set up to sync with a NetworkTransform. This worked, ...
3
votes
1answer
527 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
0answers
263 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 ...
0
votes
1answer
204 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 ...
-3
votes
1answer
2k views

How is Forge Networking able to provide unlimited CCU?

I was wondering how Forge Networking could provide unlimited CCU for every user, since it is a one-time purchase. Is there something about networking I still do not understand or do they simply own a ...
0
votes
1answer
916 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
1k views

Delayed linear interpolation for networking

I'm trying to implement the delayed snapshot interpolation presented at Valve's article and also Gambetta's. My current implementation is almost identical as described in the 'Multiplayer object ...
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
199 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
1answer
489 views

Two headphones for two players

We're looking to create a split screen game using Unity that is highly reliant on audio. We would need each player to have their own headphones and use positional audio to navigate through the map. ...
0
votes
0answers
491 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 ...
0
votes
1answer
459 views

Spawning/Updating objects from client

I hope this is the right place to ask my question... I have been working on a game (all 2D) and I'm facing some problem with the networking part (pretty much a beginner). My game idea is a shared ...
1
vote
0answers
569 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 [...
0
votes
1answer
273 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 ...
2
votes
1answer
2k views

uNet - Client cant see server spawned objects

I'm facing a problem where when I connect with the host, all the towers spawn. After I connect with a client only to find out there are no towers visible and I can walk through them when looking at ...
0
votes
1answer
41 views

unable to map one object position to another object over network

objective: I have a player which instantiate by network manager class. I want to map/sync its position/rotation to another object which is also instantiate by my player object. (what it i have tried) ...
2
votes
1answer
738 views

Unet, client is unable to control spawned units

I am trying to create a simple table top game with Unet. Right now I am just trying to get simple spawn mechanics working. The issue I am having is that the host computer can spawn and control objects ...
0
votes
1answer
1k views

How to sync a LineRenderer in a multiplayer game?

After a lot of searching online, I have come here as a last resort for my problem. The question says it all. How to sync a LineRenderer? One answer I found was to use a ClientRpc. I tried it with no ...
1
vote
1answer
230 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, ...
8
votes
1answer
9k views

When to use Command and RpcClient

I'm working on a multiplayer turn-based project in unity 5.4 and Unity Networking. I'm trying to learn Networking and one thing I am wondering is when to use ...
3
votes
0answers
241 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, ...
1
vote
3answers
935 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.
3
votes
1answer
352 views

2 cameras that each player sees through a different one

Im very new to Networking in Unity 5. Im trying to bring the finished basis for my 2 player, 1 vs 1, turn-based game I made for local multiplayer (both players on same computer) to an online ...
-1
votes
1answer
205 views

MMORPG networkconnection like Vindictus [closed]

to be honest, I like to make "small" MMORPG with my frends. We are 4 guys and are using Unity3D and Blender. I am a Programmer and I am using Eclipse. I know, it's silly to start a Question like "How ...