x


Unity & XMPP tag team

Good morning,

I was wondering if it's possible to use XMPP with Unity?

more ▼

asked Dec 10 '09 at 03:21 PM

Ciatog gravatar image

Ciatog
21 1 1 2

(comments are locked)
10|3000 characters needed characters left

5 answers: sort voted first

If there are .NET/Mono libraries available, that should work. Keep in mind, however, that - if you are building Web players - this will very likely make the Web player quite a bit larger since the assemblies need to be included (and it's very likely that these assemblies have dependencies to standard assemblies that then also need to be included).

For standalones, that shouldn't be much of an issue - but for Web players, it might be.

You could probably use one of the libraries listed here: XMPP Software: Libraries

Regarding the issue with Web players I've mentioned, read this for more details: Reducing included dlls in the Web Player (you'll need to scroll down to the bottom of the page).

more ▼

answered Dec 10 '09 at 04:37 PM

jashan gravatar image

jashan
10.1k 25 40 116

(comments are locked)
10|3000 characters needed characters left

I am looking at using XMPP for networking in Unity3d myself. No roadblocks so far, but I've only spent 8hrs looking into it all.

The Jabber-net assemblies add 860KB, which is almost trivial. You'd have some cost if you did it all yourself anyway.

As noted above, there may be dependencies that have to be added to a unity web-player build. I'll know more soon as I develop the idea further. But the references for the core Jabber-net assembly are the core ones plus System.XML and System.Security which should not need to be bundled.

As a side-question: is there a way for a web-player deploy to check what is available locally before sending assemblies? Perhaps a bootstrap process that creates a manifest is required.

more ▼

answered Jan 11 '10 at 10:47 AM

xian1971 gravatar image

xian1971
12 1

(comments are locked)
10|3000 characters needed characters left

Does it work in Mobile? I have tried it, but does not work in android.

more ▼

answered Sep 24 '12 at 03:44 PM

tree1891 gravatar image

tree1891
1

(comments are locked)
10|3000 characters needed characters left

Should be good; be sure to only include client libraries (some implementations include both the client and server, which would be a lot bigger). We use the SmartFoxServer library, which is basically a XMPPish chat server + stuff. It's C# library just starts up a new thread to handle the server socket, and then has a "poll" function for you to call in FixedUpdate() which locks a "event queue" mutex, enqueues new events from the server on the main thread, and then unlocks the mutex so both threads can go merrily on their way.

more ▼

answered Jan 07 '10 at 08:11 PM

Max Kaufmann gravatar image

Max Kaufmann
573 10 12 21

(comments are locked)
10|3000 characters needed characters left

xian1971 whats your status on this ? I was not able to get jabber-net working in webplayer build, while it works fine in standalone builds. I guess this is due to security stuff in the webplayer and jabber-net uses some .NET libs which are not allowed there. what a bummer, XMPP would habe been perfect for my chatting stuff and presence etc.

more ▼

answered Feb 18 '10 at 06:44 AM

kayoone gravatar image

kayoone
1

(comments are locked)
10|3000 characters needed characters left
Your answer
toggle preview:

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Topics:

x394
x2

asked: Dec 10 '09 at 03:21 PM

Seen: 1711 times

Last Updated: Sep 24 '12 at 03:44 PM