KO
|
EN
gitlite — search
Search
#javascript
#python
#hacktoberfest
#react
#ai
#typescript
#llm
#go
#golang
#android
#machine-learning
#rust
#deep-learning
#linux
uni-pusher
★ 14
Open GitHub ↗
Unity3D + Pusher.Com
Download README (.md)
Explore Similar Repositories
csg.dart
:
Constructive solid geometry on meshes using BSP trees in JavaScript
adventure
:
Melonjs-powered platforming game
CodeBeats
:
Online music programming / live coding platform
Endurance
:
PHP library for parsing cycling GPS activities and calculating metrics.
baidu_app_demo
:
百度站内应用演示
// repository documentation
Was this content helpful?
★ 0
(0 ratings)
Select Rating:
★
★
★
★
★
Submit Feedback
Recent Feedback
×
Download README
Do you want to download the
README.md
file for
uni-pusher
?
Download (.md)
uni-pusher ========== Unity3D + Pusher.Com UniPusher is a Unity3D API to use pusher.com webservices. It requires UniWeb. <http://u3d.as/content/different-methods/uni-web/1Cw> To get started, create a new GameObject with a PusherAPI component. Make sure you set your Pusher key in the inspector panel. Next, you need to create your own component which uses the PusherAPI component. The below code shows how to use a coroutine to wait for a connection, and then subscribe to channels, assign callbacks and finally public an event. IEnumerator Start () { yield return null; var api = GetComponent<PusherAPI>(); //This line makes the coroutine wait until connected. while(!api.connectedToPusher) yield return null; //The next two lines subscribe to some channels on pusher. //The last argument is the method that will be called when //a message is received on the specified channel. api.Subscribe("public-channel", OnPublicChannel); api.Subscribe("private-channel", OnPrivateChannel); //This line publishes a message to a channel. api.Send ("private-channel", "client-hello-world", null); } void OnPrivateChannel (Hashtable obj) { Debug.Log(obj); } void OnPublicChannel (Hashtable obj) { Debug.Log(obj); }