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
1 answer

Client disconnect when shooting in Unity (Mirror)

I am making an online multiplayer game in Unity with Mirror Networking. In this script I am trying to shoot a bullet by calling, from the client, a command on the server ( CmdFire() ) that instantiate a projectile from a shot position using the…
2
votes
0 answers

How do you instantiate a game object on client in Unity?

I am currently creating a two-person multiplayer game and have stumbled upon a problem when trying to spawn a game object from the client. In my Defender class I have a function which gets called upon each time a player recruits a unit. void…
Martin V
  • 65
  • 1
  • 4
2
votes
2 answers

Broadcast not received in Client-Unet

I am using unet for client-server communication, when i broadcast a message from server(on PC) to client(on PC) it works fine but when i try the same from server(PC) to client(Hololens emulator) unet doesn't work. NetClient.cs public override void…
Suraksha Ajith
  • 872
  • 2
  • 12
  • 23
2
votes
2 answers

Unity NetworkTransform, force update every Frame?

On a purposed LAN setup, I want Unity's NetworkTransform to simply send every single frame. (Mode is "Sync Transform", not rigidbody, etc.) I'm wondering how to do this .. if you just set the send rate to 0.00001 will it in fact do it every frame…
Fattie
  • 27,874
  • 70
  • 431
  • 719
2
votes
1 answer

Getting Local Player Authority on Player Child

I have got my Hand Prefab attached to Player Prefab as a child. I want to spawn Gun Prefab in my Hand Prefab(Players child). Is this way i can do this from Hand level? At the moment I am spawning Gun from Hand, but it works only on single Player.…
2
votes
1 answer

Unity Networking 2d game, ClientRpc not working correctly

I am networking a 2d game for my school project and I have come across a problem when attempting to make a player "Evolve" in a network scenario. The player will only evolve correctly on the client and not on the host. The code that causes the…
2
votes
1 answer

unable to set text with syncvars in unity

I'm ultimately trying to show active players, but I'm having trouble setting the value of a text box. My understanding is that once a player joins, I need to use syncvars to show all player names on each client. So to start, I'm trying…
tintyethan
  • 1,772
  • 3
  • 20
  • 44
2
votes
2 answers

Unity Networking synchronization via SyncVar

I am writing a Unity App, which connects two mobile divices using Unity Networking. One is acting as a Master (the host) and the other one as a Slave (Client). The Application should synchronously take photos from each device. For now I am using…
mojado
  • 370
  • 1
  • 12
2
votes
0 answers

Unity unet network message or Command/RPC

I want to know when we should use network message and when its better we use Command or client Rpc ? what is difference between network message and Client Rpc and commands ?
2
votes
0 answers

Unity3D - Starting multiplayer architecture

I am working on a new 3d game based on a 2D tiled map. After developing the most basic features (procedural map generation, and player movement) i want to make it work in multiplayer. I have read the whole HLAPI documentation and I have done twice…
2
votes
1 answer

Unity UNET- Can't spawn object with client authority

I have a problem where I can't spawn the selected object from clients. It works perfectly when the action is performed by the host, but not when a client attempts it. When a client attempts it, I get the following error: "SpawnWithClientAuthority…
2
votes
1 answer

Unity Networking: Unity crashes when I call the NetworkManager.singleton.StopClient() function

So basically, all i want to do is to disconnect a user when he presses a button. I've added the NetworkManager.singleton.StopClient(); function on my customNetworkManager script, which inherits from the NetworkManager class. But whenever I press the…
2
votes
1 answer

Keeping Unity networking code separate from game logic

I want to keep network code separate from my game logic. Not only do I need to do that to be able to share game logic between single and multiplayer game modes, I also want it because of the Separation Of Concerns thing. My current approach is to…
2
votes
1 answer

Unity2D: UNET transport layer API server script isn't messaging properly

I'm following a tutorial unity multiplayer (UNET) on YouTube but I'm getting different results compared to the guy in the video. You see I followed his tutorial to the tea, however in my server script within the update function I used a debug.log in…
2
votes
0 answers

Unity3D websocket client with Node.js server?

I have a game server made in Node.js, and am building a Unity3D client for it. I have already built a pure Javascript web client for the same server as well, which works great. I was able to build the client for Unity3D using the websocket-sharp,…
1
2
3
16 17