Skip to main content
7 votes

How to Send Voice over Unity Networking - UNET

TL;DR: You can't do it natively in Unity Microphone.Start returns an AudioClip which has 3 load types, none of which fit your ...
Cobertos's user avatar
  • 1,644
1 vote
Accepted

uNet - Client cant see server spawned objects

try with a RPC call [Command] are message from a client to the server a [ClientRPC] are messages that are send to all the ...
Jurj's user avatar
  • 26
1 vote

How to stop a host from the client script?

On your custom NetworkManager you can override the OnServerDisconnect for that purpose. Your code should looks like this: ...
Sylker Teles's user avatar
1 vote

Unet, client is unable to control spawned units

Fixed it on my own. Sometimes walking away from the computer for a minute can really help. Here is what I was doing wrong in case anyone is interested for future reference. The server was spawning ...
whiskey golf's user avatar
1 vote
Accepted

Unity networking, make player disappear for all clients

In your code you call the Command if you are the server, and call the RpcCall if you are not the server. It works the other way around: Commands are issued from the client to the server. RpcCalls are ...
Leo's user avatar
  • 1,585
1 vote
Accepted

Server and client showing different spawned object - How do I unify them?

Firstly, OnServerAddPlayer only runs on a server, so the clients don't run this code. Secondly, combined with the fact that the properties of child objects are not transmitted with a NetworkBehaviour, ...
Neil Cross's user avatar
1 vote
Accepted

Mirror/Unet, RegisterSpawnHandler throws invalid asset Id error because assetId is 0 for dynamically loaded assetbundles

Didn't really solve this particular problem, but found a much nicer working workaround. Created a Dummy prefab with my vehicle's netcode attached to it(Note, I separated vehicle physics code and ...
Nick's user avatar
  • 561
1 vote
Accepted

Peer-to-peer Multiplayer Game

While asking for what technology to use is off-topic here... I can tell you what not to use. First of all, you want the game instances to be able to work as clients or servers. There will not be an ...
Theraot's user avatar
  • 27.2k
1 vote
Accepted

how to detect Unity UNET errors?

I solved my problem with another way that works very well. For checking the port is free or not we can use System.Net. and before Network Manager ...
iman_sh's user avatar
  • 175
1 vote

Can Inspector interactions be used with UNET

When using a SyncVar, a network change can be triggered by adding a custom Editor with a field of the same type. This editor can then set the syncvar property to match the editor value when it change,...
Jethro's user avatar
  • 309
1 vote
Accepted

Help needed with syncing animation speed of a player in a Networked game (Unity)

If your intent is to create a basic multiplayer networked game, I raccomend following this tutorial series In the past, I had the same problem with some of my variables that I was not synchronizing. ...
Seyed Morteza Kamali's user avatar
1 vote

Unity UNET, problems spawning and then destroying that instantiated prefab

On UNET, when you Instantiate and Destroy Objects (or deactivate, if such the case), you must make use of Spawn and Unspawn respectively, so those objects appear / dissapear on the other clients. You ...
LifGwaethrakindo's user avatar
1 vote

In Unity, how do I set constant player numbers such that all network clients agree on them?

Forgive me if this answer is a little rough, I am copying it from a similar project I have where users need to know their own IDs so some of this may be a mix of real code and untested pseudo code. ...
Benjamin Danger Johnson's user avatar
1 vote

How do I resolve the error "Trying to send command for object without authority."?

Your problem here is this line: s.CmdSpawn(enID); You are performing a Command on your Skills from the PlayerController which ...
Dtb49's user avatar
  • 243
1 vote
Accepted

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

as long as you are inheriting a network behavior you can run a check if (isLocalPlayer) add to list. Or you can override the ...
Justin Markwell's user avatar
1 vote

Unity - DontDestroyOnLoad - FindObjectsOfType(GetType()).Length is always returning 1

Try this. It compares time alive on different instances of the class, ensuring that your first instance will be the one that survives. ...
Samuel Lopes's user avatar
1 vote
Accepted

How do I use Unity's OnPlayerConnected method?

OnPlayerConnected() and OnPlayerDisconnected() are part of the old networking API and not UNET what is currently being used. In ...
Uri Popov's user avatar
  • 3,027
1 vote

How do I use Unity's TargetRPC calls? Trying to send data from the server to a client

It is probably an issue of timing. The error message is telling you that the object to which the TargetRpcTest script is attached exists on the server, but not on ...
Chaosed0's user avatar
  • 763
1 vote

How do I use Unity's TargetRPC calls? Trying to send data from the server to a client

Based on this code i'm assuming that you want the data to be sent from player to player? ...
Nolic0321's user avatar
1 vote

Creating a master server for Unity game (Unity 2017)

Reality check.The Unity CCU deal is fine for novice developers. Assuming your game will be the next blockbuster game is going to be disappointing. Spending 100's/1000s of hours setting up a cutting ...
Jack Spite's user avatar
1 vote

Creating a master server for Unity game (Unity 2017)

You can have as many users as you would like and scale as you grow using unity multi player services as seen here UnityMultiplayer Unity offers a free amount of Concurrent users (CCU) for each ...
Justin Markwell's user avatar
1 vote

Unity low level network API

The reason of the error is that you didn't stop previous host and trying the adding new. With the same credential you are trying to add same server. So first stop host then, add host.
Muhammad Faizan Khan's user avatar

Only top scored, non community-wiki answers of a minimum length are eligible