I’m getting an error in the editor that doesnt occur in the compiled version.
I have a static class “StaticData” that does not derive from MonoBehaviour. htRemotePlayers is a static hashtable that I keep a list of GameObjects (remote players) in.
When a remote player moves smartfox envokes an event and I get the corresponding object from the hashtable:
I should also add that I have moved all variable initialisations to “Start” where possible and initialised the globals in the StaticData class in a “Initialise” class thats called very early on.
did you ensure to use smartfox the way that it uses the unity mainthread for the event callback handling, not running async in an own thread (as you can use it on .net otherwise) and firing in from there. because if it runs in an own thread you get exactly the errors you get there as unity does not allow another thread calling into any unity engine related thing at all from outside. you must “call out” from within the engine