I'm currently working on a project in Unity with Javascript, and I'd like to setup SFS to handle multiplayer. I've been using Javascript for years now, but I've never even touched C# so I would really rather not have to learn C# at this stage to make me entire game unless it is 100% necessary. Is there a way to connect to SFS using Javascript rather than C#? I've tried to rewrite the simple connection example from the API with Javascript, but it doesn't like the following:
Code: Select all
SFSEvent.onConnection += HandleConnection;
which I changed to:
Code: Select all
SFSEvent.onConnection = Delegate.Combine(HandleConnection);
and get the error: InvalidCastException: Cannot cast from source type to destination type.