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 ...
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 ...
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:
...
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 ...
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 ...
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 ...
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 ...
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,...
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. ...
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 ...
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. ...
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 ...
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 ...
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.
...
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 ...
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 ...
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?
...
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 ...
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 ...
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.
Only top scored, non community-wiki answers of a minimum length are eligible
Related Tags
unet × 51unity × 47
unity-networking × 23
multiplayer × 19
c# × 14
networking × 10
client-server × 3
synchronization × 3
mirror-networking × 3
hololens × 2
physics × 1
procedural-generation × 1
unityscript × 1
coordinates × 1
server × 1
rigidbody × 1
debugging × 1
interpolation × 1
resource-management × 1
instancing × 1
spawning × 1
udp × 1
augmented-reality × 1
photon × 1
client × 1