public static void ListGameObjects(RequestContext context, string[] args) { if (args == null || args.Length == 0) { CUDLR.Console.Log(" Hierarchy TREE:"); UnityEngine.GameObject[] objects = UnityEngine.Object.FindObjectsOfType <GameObject> ().Where(t => t.transform.parent == null).ToArray(); foreach (UnityEngine.Object obj in objects) { CUDLR.Console.Log("\t" + obj.name); } } else if (args.Length == 1) { var path = args [0]; UnityEngine.GameObject[] objects = UnityEngine.Object.FindObjectsOfType <GameObject> ().Where(t => t.transform.GetAbsolutePath() == path).ToArray(); if (objects.Length >= 1) { for (int i = 0; i < objects.Length; i++) { var go = objects [i]; //Console.Log("\t" + go.transform.GetAbsolutePath()); for (int j = 0; j < go.transform.childCount; j++) { var child = go.transform.GetChild(j); CUDLR.Console.Log("\t\t" + child.GetAbsolutePath()); } } } else { Console.Log("can not find :" + args [0]); } } }
public static void Pull(RequestContext context) { string module = Uri.UnescapeDataString(context.Request.QueryString.Get("file")); var path = LogManager.Instance.GetModuleLogFilePath(module); try { context.Response.WriteFile(path, "application/octet-stream", true); Console.Log("downloading... " + path); } catch (Exception e) { Console.Log("\tERROR:" + e.Message + "\n" + e.StackTrace); } }
public static void Play() { Time.timeScale = 1; Console.Log("\tdone!"); }
public static void Pause() { Time.timeScale = 0; Console.Log("\tdone!"); }