Skip to content

Releases: hiddenswitch/Meteor-Unity

Updating for 2018.3+

14 Mar 00:07
Compare
Choose a tag to compare

All tested. Make sure to include the link.xml file in your Assets folder!

Added documentation and cleaned up API

03 Mar 19:51
Compare
Choose a tag to compare

Updates for better syntax

12 Feb 01:59
Compare
Choose a tag to compare

This release now supports Observe, a fix to the PongMessage and all the Unity value types in Mongo document definitions.

Unity 5 release

14 Jan 19:05
Compare
Choose a tag to compare

Now supports Unity 5 and secure passwords.

meteor-unity-v1.0

14 Jan 19:04
Compare
Choose a tag to compare

Unity 4 series release

In this release

  • Do your work in IEnumerator/Coroutine methods. The pattern is yield return asyncAction, just like the async await pattern in .Net 5.0.
  • Connect to your local server with LiveData.Instance.Connect("wss://127.0.0.1:3000/websocket").
  • Login with yield return Accounts.LoginAsGuest(), yield return Accounts.LoginWith(username, password) or yield return Accounts.CreateAndLoginWith(email, username, password). Your token is saved!
  • Declare a collection with var myCollection = Collection<RecordType>.Create("collectionName"). RecordType should inherit from MongoDocument.
  • Subscribe to records with yield return (Coroutine)Subscription.Subscribe("publishName").
  • Observe collections with collection.OnAdded, collection.OnChanged, and collection.OnRemoved.
  • Use System.Linq to query collections effortlessly.

Calling methods

using Meteor;
using UnityEngine;
using Extensions;

var methodCall = Method<ReturnType>.Call("functionName",arg1,arg2,arg3, ...);
yield return (Coroutine)methodCall;
Debug.Log(methodCall.Response.Serialize());