private void TimeScale(string[] args) { string amount = args[2]; Time.timeScale = float.Parse(amount); CommandLineCore.Print("TimeScale set to " + Time.timeScale); }
private void PrintArgs(string[] args) { foreach (var item in args) { CommandLineCore.Print(item); } }
public override void Help() { StringBuilder helpMessage = new StringBuilder(); helpMessage.AppendLine("example"); helpMessage.Append("printargs string:messageToPrint"); CommandLineCore.Print(helpMessage.ToString()); }
public override void Help() { StringBuilder helpMessage = new StringBuilder(); helpMessage.Append("timescale float:amount\n"); helpMessage.Append("slowmo float:amount float:duration\n"); helpMessage.Append("devicetime\n"); helpMessage.Append("currenttimescale"); CommandLineCore.Print(helpMessage.ToString()); }
public override void Help() { StringBuilder helpMessage = new StringBuilder(); helpMessage.Append("loadscene int:sceneIndex\n"); helpMessage.Append("reloadscene\n"); helpMessage.Append("loadnextscene\n"); helpMessage.Append("loadpreviousscene\n"); helpMessage.Append("sceneindex"); CommandLineCore.Print(helpMessage.ToString()); }
public override void Help() { StringBuilder helpMessage = new StringBuilder(); helpMessage.Append("call string:methodName string:gameObjectName\n"); helpMessage.Append("callbytag string:methodName string:gameObjectTag\n"); helpMessage.Append("callall string:methodName\n"); helpMessage.Append("destroy string:gameObjectName\n"); helpMessage.Append("destroytag string:gameObjectsTag\n"); helpMessage.Append("instantiate string:pathInAResourcesFolder"); CommandLineCore.Print(helpMessage.ToString()); }
public override void Help() { StringBuilder helpMessage = new StringBuilder(); helpMessage.Append("getint string:key\n"); helpMessage.Append("getfloat string:key\n"); helpMessage.Append("getstring string:key\n"); helpMessage.Append("setint string:keyWithPipes int:value\n"); helpMessage.Append("setfloat string:keyWithPipes float:value\n"); helpMessage.Append("setstring string:keyWithPipes string:value\n"); helpMessage.Append("saveprefs\n"); helpMessage.Append("deleteallprefs"); CommandLineCore.Print(helpMessage.ToString()); }
public virtual void Help() { StringBuilder builder = new StringBuilder(); int counter = 0; foreach (var item in commands) { builder.Append(item.Key); counter++; if (counter < commands.Count) { builder.Append("\n"); } } CommandLineCore.Print(builder.ToString()); }
public override void Help() { StringBuilder helpMessage = new StringBuilder(); helpMessage.Append("position float:x float:y float:z string:gameObjectName\n"); helpMessage.Append("move float:x float:y float:z string:gameObjectName\n"); helpMessage.Append("rotation float:x float:y float:z string:gameObjectName\n"); helpMessage.Append("rotate float:x float:y float:z string:gameObjectName\n"); helpMessage.Append("scale float:x float:y float:z string:gameObjectName\n"); helpMessage.Append("addscale float:x float:y float:z string:gameObjectName\n"); helpMessage.Append("getposition string:gameObjectName\n"); helpMessage.Append("getrotation string:gameObjectName\n"); helpMessage.Append("getscale string:gameObjectName"); CommandLineCore.Print(helpMessage.ToString()); }
private void ChangeTransform(string[] args) { switch (args[1]) { case "position": case "setposition": GameObject.Find(CommandLineCore.StringWithSpaces(args, 5)).transform.position = new Vector3(float.Parse(args[2]), float.Parse(args[3]), float.Parse(args[4])); break; case "move": GameObject.Find(CommandLineCore.StringWithSpaces(args, 5)).transform.position += new Vector3(float.Parse(args[2]), float.Parse(args[3]), float.Parse(args[4])); break; case "rotation": case "setrotation": GameObject.Find(CommandLineCore.StringWithSpaces(args, 5)).transform.eulerAngles = new Vector3(float.Parse(args[2]), float.Parse(args[3]), float.Parse(args[4])); break; case "rotate": GameObject.Find(CommandLineCore.StringWithSpaces(args, 5)).transform.Rotate(float.Parse(args[2]), float.Parse(args[3]), float.Parse(args[4])); break; case "scale": case "setscale": GameObject.Find(CommandLineCore.StringWithSpaces(args, 5)).transform.localScale = new Vector3(float.Parse(args[2]), float.Parse(args[3]), float.Parse(args[4])); break; case "addscale": GameObject.Find(CommandLineCore.StringWithSpaces(args, 5)).transform.localScale += new Vector3(float.Parse(args[2]), float.Parse(args[3]), float.Parse(args[4])); break; case "getposition": CommandLineCore.Print(GameObject.Find(CommandLineCore.StringWithSpaces(args, 2)).transform.position.ToString()); break; case "getrotation": CommandLineCore.Print(GameObject.Find(CommandLineCore.StringWithSpaces(args, 2)).transform.rotation.ToString()); break; case "getscale": CommandLineCore.Print(GameObject.Find(CommandLineCore.StringWithSpaces(args, 2)).transform.localScale.ToString()); break; } }
private void SomeMethod(string[] args) { Debug.Log("SomeMethod() was called"); CommandLineCore.Print("This is an example message."); }
private void CurrentTimeScale(string[] args) { CommandLineCore.Print("Current TimeScale: " + Time.timeScale); }
private void DeviceTime(string[] args) { CommandLineCore.Print(System.DateTime.Now.ToString()); }
private void GetString(string[] args) { CommandLineCore.Print(PlayerPrefs.GetString(CommandLineCore.StringWithPipes(args[2]))); }
public void SceneIndex(string[] args) { CommandLineCore.Print("Current scene index: " + SceneManager.GetActiveScene().buildIndex); }