-
Notifications
You must be signed in to change notification settings - Fork 23
Open
Description
I am using the following server side code to test with the C# code provided in the documentation.
/server/main.js
import { Meteor } from 'meteor/meteor';
collection = new Mongo.Collection('collectionName')
Meteor.methods({
'getStringMethod':function(){
return "HELLO WORLD"
}
});
Meteor.publish('subscriptionEndpointName',function(){
return collection.find()
});
Meteor.startup(() => {
// code to run on server at startup
});
Then I inserted an empty document in meteor mongodb.
db.collectionName.insert({})
But I got an error in Unity.
NullReferenceException: Object reference not set to an instance of an object
Meteor.Collection`1[main+DocumentType].Meteor.Internal.ICollection.Added (System.String messageText) (at Assets/Meteor-Unity/LiveData/Collection.cs:211)
Meteor.Internal.LiveData.HandleOnTextMessageRecv (System.String socketMessage) (at Assets/Meteor-Unity/LiveData/LiveData.cs:334)
Meteor.Internal.LiveData+<Dispatcher>c__Iterator4.MoveNext () (at Assets/Meteor-Unity/LiveData/LiveData.cs:205)
UnityEngine.SetupCoroutine.InvokeMoveNext (IEnumerator enumerator, IntPtr returnValueAddress) (at /Users/builduser/buildslave/unity/build/Runtime/Export/Coroutines.cs:17)
There is no problem to insert documents via a meteor method but this error is prompted when I insert documents via meteor mongo directly.
Metadata
Metadata
Assignees
Labels
No labels