Bad news. In any project I set up from scratch myself using the latest 1.7.1 Plugins I get an error:
smartFox = new SmartFox(UseWebSocket.WS);
The name 'UseWebSocket' does no exist in the current context.
Is there a chance it's confused about what to .dll to use or a path problem to the websocket info?
Code: Select all
using UnityEngine;
using System;
using System.Collections;
using System.Collections.Generic;
using System.Text;
using Sfs2X;
using Sfs2X.Core;
using Sfs2X.Entities;
using Sfs2X.Entities.Data;
using Sfs2X.Entities.Variables;
using Sfs2X.Requests;
using Sfs2X.Logging;
public class HelloWebSocket : MonoBehaviour {
private string defaultHost = "127.0.0.1"; // Default host
private int defaultTcpPort = 9933; // Default TCP port
private int defaultWsPort = 8888; // Default WebSocket port
private SmartFox smartFox;
// Use this for initialization
void Start () {
// Initialize SFS2X client and add listeners
// WebGL build uses a different constructor
#if !UNITY_WEBGL
smartFox = new SmartFox();
#else
smartFox = new SmartFox(UseWebSocket.WS);
#endif
}
}