Stack Exchange Network

Stack Exchange network consists of 174 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [unity-networking]

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

0
votes
0answers
25 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
1answer
19 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
14 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
11 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
20 views

Network Message Registering message handler Problem

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

Can Player's child object call [Command] function?

I have Player and a child as a Gun attached to it. Gun has Firing script. I wanna know how can I call [Command] function from <...
0
votes
1answer
39 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
0answers
39 views

Multiplayer GameObjects in Giant World

I'm designing some kind of MMO strategy game with hundreds of players in Unity. Since the game will not have frequent operations, i think it will not have scalability issues using Unity HLAPI. Using ...
-1
votes
0answers
19 views

Can a [Command] be sent only from a player object?

I have a query about Unity Networking. As the Unity documentation says: Commands can only be sent from YOUR player object. My question is, if I have multiple scripts which are using ...
-1
votes
0answers
22 views

Command function is not running. And showing warning **Trying to send command for object without authority.**

I have a Capsule with script attached Player, I created a Cube as a child to the Capsule, Cube also has HandGun scripts. So when I touch the fire button it will call ...
0
votes
0answers
39 views

Why Unity spawning extra object on client side but not on host side?

I Instantiated a Gun for player and also Spawned it on Server using NetworkServer.Spawn() it worked fine in Host both player have their gun but when I connected my ...
0
votes
0answers
31 views

Unity networking: argument exception while instantiating GameObject inside [Command] function

I wanted to instantiate an object and I used NetworkServer.Spawn() inside [Command] function it worked fine in host side but whenever I connect my client Untiy ...
1
vote
0answers
19 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
0answers
29 views

In voxel based multiplayer Unity game the sync messages wont find their targets sometimes?

I have a Projectile Has a NetworkBehaviour, NetworkIdentity, NetworkTransform (with high send rate) Has a ...
0
votes
1answer
44 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 ...
2
votes
1answer
153 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 ...
0
votes
2answers
215 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
0answers
27 views

How can I use NetworkTransformChild when the target only has RectTransform?

I used the normal way to add them by code like below: gameObject.SetActive(false); addNetworkTransformChild(newItem.transform); gameObject.SetActive(true); ...
3
votes
1answer
177 views

How to store and retrieve user data in a multiplayer game

I am building a multiplayer game with a team and each player will have a multiplayer rank, a matchmaking rating (MMR), a username, and possibly a picture, a description etc. We are planning on ...
0
votes
0answers
90 views

Unity NetworkTransform does not synchronize angularVelocity

I am trying to spawn a boomerang over the network with both a velocity and an angularVelocity. The boomerang succesfully spawns on all clients with the correct position, rotation and velocity, but the ...
0
votes
0answers
19 views

Client doesn’t execute command, code only works when executed from server

I’ve got some code that just doesn’t want to work correctly. When the Server executes the code, everything is fine, and the clients respond to it as well, but when the client executes the code, ...
0
votes
1answer
47 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
0answers
108 views

Networked multiplayer confusion , please help - Unity game HLAPI - was working now not

Hi guys I am quite new to writing any networking code for my games and I've been posting questions related to this topic already, however now my code has changed. I've followed through the Unity ...
0
votes
0answers
23 views

Unity Multiplayer game using HLAPI as much as possible. Basics for adding non-player registered prefabs

Hi all I am making a fairly simple multiplayer game in Unity. It's a football game. You can play with up to 11 each team and you control just one player. The system i used is the Client-Host method ...
0
votes
1answer
162 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
30 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
52 views

Does Unity's Unet LLAPI compress data?

Does the NetworkTransport compress and decompress the data sent through the network?
3
votes
0answers
110 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 ...
0
votes
1answer
27 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
102 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
16 views

Networking not working on android when upgrade project from 5.6 to 2017 or 2018

I currently have a unity project that plays a networked 360 video using unity 5.6 on android phones. (The phone plays the 360 video in cardboard view, while the video playback is controlled by a ...
0
votes
1answer
174 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 ...
1
vote
1answer
358 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
0answers
66 views

Unity Multiplayer Game: Deal with online player position update during the initial syncing of a new player

I'm creating a multiplayer game using Unity and its network library UnityEngine.Networking, basically when a client connects to the server it receives an array that ...
0
votes
0answers
78 views

Unet, how to sync a counter to check if all players are ready

I'm making a multiplayer bomberman game using Unet. I'm trying to create a ready check to start the game when everyone else is ready. I tried using a sync var,Command and Rpc calls, but nothing seems ...
0
votes
0answers
32 views

Making different users see their data on the same canvas

I'm trying to make a game similar to Wizard101 (Game in the pic). I got stuck in the networking part since all tutorials show how to handle users, but not their data. What I want to do is to create ...
0
votes
0answers
57 views

Subscribing to and sending events on UNET

I am working on large distances, where the clients only need to receive information about other players when they are nearby. I've been doing a little bit of homework and (thanks to another answer on ...
0
votes
1answer
67 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
47 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
31 views

Multiplayer TPS, data processing by server

So, I have the networking system (in Unity, using Low level API), which collects input from the player and at every tick sends it to the server. The server gets the input and processes it and sends ...
1
vote
1answer
109 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
91 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 ...
0
votes
0answers
75 views

When running both code snippets within the Unity Test Runner(EditMode) Why does code snippet 1 Freeze(Permanently) Unity, but not snippet 2?

Background Info: connection_handler is a delegate defined as the following: public void delegate Handle(LibraryState state) lib.Library_Init initializes required library fields lib....
1
vote
0answers
137 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
172 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
38 views

how to code Asset bundle download(more than one) with download bar?

I am downloading asset bundle from JSON file (i have a link field in JSON file) and that also one by one from my server and I want to create a downloading bar which fills completely when all asset ...