[Release] FM Network UDP: Easy Server-Clients Networking

FM Network UDP provides you a simple, flexible networking solution using UDP
Webpage | Asset Store

UDP Networking With Simple Commands:
FMNetworkManager.instance.SendToAll(“Hello World”);
FMNetworkManager.instance.SendToOthers(“Hello World”);
FMNetworkManager.instance.SendToServer(“Hello World”);
FMNetworkManager.instance.SendToAll(byte[ ]);
FMNetworkManager.instance.SendToOthers(byte[ ]);
FMNetworkManager.instance.SendToServer(byte[ ]);

Auto Network Discovery & Connect

Simple Send & Receive with Message or Byte[ ]

Smooth Sync Network Objects

Server <=> Clients

General Send Type: All, Server, Others

Cross Platform: iOS/Android/Mac/PC

All Written in C#, easy to modify if necessary.

*We also provided advanced streaming solution in FM Exhibition Tool Pack

Support: thelghome@gmail.com



[Sharing our recent developments]
Small improvement for this old motion capture system & this little UDP tool works well.

1 Like

It is proud to apply FM Network UDP for LEONARDO DA VINCI exhibition in Hong Kong!

1 Like

[v1.097] updates
-Added Large File Sender Example

1 Like

Oculus GO Live Streaming Demo with FM Network UDP

Hi. I am trying to use this to connect an app running on an Oculus Go headset with an Android tablet, but they dont want to connect. Im starting off with the demo scene, starting one as the Server / one as Client, but the two apps dont find each other. I was expecting the AutoNetworkDiscovery would handle this? With my use case I wont be able to specify in advance what the IP will be, so I really need them to find each other automatically. On the Client the value for IsConnected switches to True for a couple of seconds and then reverts to False.
Am I missing something here? Thanks for any help with this.

okay, got them to talk to each other!
Just need to work out

  1. how to send a snapshot of the current view from the client headset to the server tablet and
  2. how to send commands from the server to client, for changing the scene, configuration etc (an RPC I guess?)
    Are these both possible with this version, or should I be using the full pack (I bought both)
    Many thanks
1 Like

Q1:
You may refer to GameViewEncoder/Decoder.cs, if you want to capture snapshots only. The sample scene is in our full pack.

Q2:
Our network systems support below behaviour.
SendToAll()
SendToOthers()
SendToServer()

We might include some minimal multiplayer game demo scene in future.

PS: we are on our holiday period til 24th December. Sorry about the late reply.

Thanks for your help, much appreciated! Asset looks great so far, clean code and well documented.
I can see how it all works when everything is in one scene, but Im having problems seeing how to keep the connection across multiple scenes. My project needs to switch scenes. I use SendToOthers() to get the scene switched, but then there is no connection to the Server in the next scene. I note in your demo project you dont change scene after AssignasServer/Client…

I have tried a couple of routes - adding a NetworkManager object to the new scene (fails) and using DontDestroyOnLoad from the init screen (also fails)
So, Im wondering if you know what the best practise is for keeping a connection with your network object between scenes?
Many thanks, and seasons greetings

Sorry for late reply, during the holiday period.

Some of suggested ways:

  1. Try, Async Load scene
  2. Don’t destroy the network objects between scenes
  3. Never create network manager twice

Hi,
Thanks for the response.
I have started with your demo scene, and adapted it so that the Server / Client buttons go to a second scene using LoadSceneAsync.
The FMNetworkManager object is retained through to the second scene via DontDestroyOnLoad.
Unfortunately, the connection doesnt work. The IsConnected value switches to False after a couple of seconds on the second scene.

Is it not possible to retain the connection between scenes with your asset?

Are you testing them(Server & Client) on one computer only?

In one of my projects, I used “LoadSceneMode.Additive” for my second scene without any connection issue.

PS: We will try to reproduce your issue on our side asap. sorry for the inconvenience during the holidays, as we are out of town.

Hi,
Thanks for the reply.
I am testing on android phone (server) to oculus go (client) which didn’t work.
Then tried android phone (server) to pc (client) which also fails.
Really need to know if its possible to achieve this or not with your assets.
A sample project would be really helpful.

Could you send us an email for technical support?

We will try to reproduce the issue on our side asap, and hopefully a sample scene will be ready soon.

Support email: thelghome@gmail.com

In FMNetworkManager.cs, please replace the Awake() with below script.
It’s tested on Macbook and works fine. and We will test on other devices soon.

//It also works when you switch scene with below function too.
//UnityEngine.SceneManagement.SceneManager.LoadScene(SceneName);
//Please be noted:
//DontDestroyOnLoad only work for root GameObjects or components on root GameObjects.

void Awake()
{
    if (instance == null)
    {
        instance = this;
        this.gameObject.transform.parent = null;
        DontDestroyOnLoad(this.gameObject);
    }
    else
    {
        Destroy(this.gameObject);
    }
}

Many thanks. I will try that today. I was using dontdestroy within my own script (finding the network object by name and then DontDestroyonload) so maybe that was an issue? Also, I wasn’t using loadscene additive, I am using loadasync.
I will make some changes and if that doesnt work I will send a mail to support.
Cheers guys

that worked, many thanks :slight_smile:

@thelghome want to know support Reliable UDP?thanks

It’s non-reliable UDP. If you need reliable solution, will you consider TCP or WebSocket?
full pack: http://u3d.as/1uHj
we have live streaming examples in UDP/TCP/WebSocket.

thanks,Can your consider adding rudp? I have frequent rpc calls for tasks, important tasks rudp is very important

I suggested that you can implement some “confirmation” method yourself for important tasks.

For example, I can sync multiple video players without rudp(in a panorama projection setup).

To achieve this, I will send a round trip command for confirm the status/important task.