Questions tagged [unity3d-unet]

UNET is the native Unity3D network system. It is the short form of unity networking. Use this tag to ask questions related to Unity3d networking.

UNET is the new native Unity3D network system (since Unity 5). It is the short form of unity networking.

http://docs.unity3d.com/Manual/UNetOverview.html

This tag covers :

  • High level scripting API, LLAPI, and all underlying concepts
  • GameDev network programming algorithms and concepts applied to Unity scripting.
  • Old (legacy) networking system.

Related tags

241 questions
2
votes
0 answers

Master / Hosts communication c#

I have a master server whose purpose is to login and send players in a game queue, and instantiate/close hosts (lobby) when necessary. Currently the clients (players and hosts) are using the NerworkClient class to connect to the NetworkServer of the…
FLX
  • 2,626
  • 4
  • 26
  • 57
2
votes
2 answers

Unity3d unet - TargetRPC call originating from Client

Unet's documentation is lacking, as we all know. I would love to get this answered, and hopefully it can help others searching later. Here is what I am trying to do: Detect hit with raycast on player client. Indicate the hit to the dedicated…
Emotitron
  • 31
  • 5
2
votes
0 answers

Unity Networking: Networked Objects not appearing on Client when Client loads scene first

I'm having an issue with object instantiation in my multiplayer game. The game layout is simple: Players enter a lobby and once everyone marks ready there is a countdown and the LobbyManager calls ServerChangeScene(gameScene) to load the game level.…
2
votes
1 answer

Sending an array of primitive types over a ClientRPC call

I am trying to send an array of various basic types over the Network using the ClientRpc attribute. The documentation states, that I can send these over the Network without problems: basic types (byte, int, float, string, UInt64, etc) arrays of…
Felk
  • 7,720
  • 2
  • 35
  • 65
2
votes
1 answer

Connect issue using IPv6 on Unity3D UNET server

I am deploying dedicated server made on UNET and when I start server I try to get list of all IPs (both IPv4 and IPv6). My server is deployed on a Linux server on DigitalOcean with IPv6 support enabled, server can be pinged via IPv6 address. When I…
2
votes
1 answer

How to run uNET (Unity Networking) Host Server for WebGL build - Unity 5.3.5

So I have a game that I want to export to WebGL. It uses Unity's latest networking solution uNET (Unity Networking) and I've selected the *use websockets option. Currently, WebGL clients cannot be a server. Thus in order to host a game, I am doing…
2
votes
4 answers

Spawn Player at Specific location With Unet

I am trying to spawn 2 Players (host and client) at 2 different locations. I have no idea how to do this because the player are automatically spawned by the network manager. I have tried the following but failed horribly :(. [Command] void…
Rana
  • 1,675
  • 3
  • 25
  • 51
1
vote
1 answer

How would I spawn a different prefab for a local client and a remote client in Unity with MLAPI?

Sorry if this is a duplicate question. I found this Reddit post which is exactly my current problem. https://www.reddit.com/r/Unity2D/comments/lw96s5/multiplayer_cameras/ However, there's only one comment which isn't that descriptive and doesn't…
1
vote
1 answer

Unity Multiplayer MLAPI Could not get NetworkObject for the NetworkBehaviour

For my PlayerController script, I changed inheriting from MonoBehaviour to NetworkBehaviour public class PlayerController : MonoBehaviour { From this, to this: public class PlayerController : NetworkBehaviour { Even though my player controller…
John
  • 5,942
  • 3
  • 42
  • 79
1
vote
0 answers

Unity Mirror; Spawn different Player Prefabs

Hi I`m making a multiplayer car game using Mirror. Every Time Player one chooses his character everything works fine. When Player two chooses his character he gets only the same character like the first player. Any Ideas? Here is my code (The set…
1
vote
1 answer

Syncronize player position in unity (Mirror)

Goal: Syncronize player position in a multiplayer game in Unity that uses the Mirror Networking API Problem: Using the NetworkTransform component the position seems to not be precisely syncronized, both the client and the server sees the player in…
1
vote
2 answers

MLAPI NetworkVariable not syncing on clients

I'm making an online multiplayer game with Unity and MLAPI. I wrote the script below and placed it in my scene, meaning each client and server should run it when a scene loads. The server is supposed to set the variable to 1, but it's not changing…
xjcl
  • 12,848
  • 6
  • 67
  • 89
1
vote
0 answers

Node Mobility in Unetstack V 3.1.0

I am trying to simulate a node moving with circular trajectory, which is receiving data from 4 stationary nodes. The simulation is working fine on the older version (1.6), however it is not working on 3.1.0. There is no error and the simulation is…
kartik
  • 11
  • 1
1
vote
3 answers

Unity/Mirror networking no client sync

Goal: Object interact-able by both players and its position and rotation is synced(LAN). Scene setup : simple scene similar to pong example in mirror,when both players are spawned a cube is spawned that is interact-able by both players with…
1
vote
0 answers

How to make Unity Tilemap.SetTile() to work in multiplayer?

I'm trying to make 2D-multiplayer game with randomly generated map. Here's some simplified code what I have tried public class Map : NetworkBehaviour { private TilePainter _tilePainter; [Command] public void CmdStartGenerating() { …
1 2
3
16 17