This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // Unity C# Cheat Sheet | |
| // I made these examples for students with prior exerience working with C# and Unity. | |
| // Too much? Try Unity's very good tutorials to get up to speed: https://unity3d.com/learn/tutorials/topics/scripting |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #define DEBUG_CONSOLE | |
| #define DEBUG_LEVEL_LOG | |
| #define DEBUG_LEVEL_WARN | |
| #define DEBUG_LEVEL_ERROR | |
| #if (UNITY_EDITOR || DEVELOPMENT_BUILD) | |
| #define DEBUG | |
| #endif | |
| #if (UNITY_IOS || UNITY_ANDROID) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| using UnityEngine; | |
| using System.Collections; | |
| using SuperWebSocket.Client; | |
| using System; | |
| public class Net : MonoBehaviour { | |
| private string lastMessage = string.Empty; | |
| public static string serverURI = "ws://192.168.100.196:12345/channels/0?userId=1"; | |
| public static WebSocket webSocket = new WebSocket(serverURI, "basic"); | |