{"id":20954379,"url":"https://github.com/devsisters/unitycli","last_synced_at":"2025-05-14T04:32:41.966Z","repository":{"id":82601340,"uuid":"85063311","full_name":"devsisters/UnityCLI","owner":"devsisters","description":"Unity TCP CLI communication for debugging","archived":false,"fork":false,"pushed_at":"2017-05-31T06:40:04.000Z","size":482,"stargazers_count":25,"open_issues_count":0,"forks_count":7,"subscribers_count":25,"default_branch":"master","last_synced_at":"2024-11-10T21:40:14.609Z","etag":null,"topics":["cli","command-line-interface","command-line-tool","debug","productivity","tool","unity","util"],"latest_commit_sha":null,"homepage":"","language":"C#","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/devsisters.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null}},"created_at":"2017-03-15T11:13:53.000Z","updated_at":"2024-07-23T13:57:15.000Z","dependencies_parsed_at":"2023-03-05T04:15:12.766Z","dependency_job_id":null,"html_url":"https://github.com/devsisters/UnityCLI","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/devsisters%2FUnityCLI","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/devsisters%2FUnityCLI/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/devsisters%2FUnityCLI/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/devsisters%2FUnityCLI/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/devsisters","download_url":"https://codeload.github.com/devsisters/UnityCLI/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":225275657,"owners_count":17448389,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["cli","command-line-interface","command-line-tool","debug","productivity","tool","unity","util"],"created_at":"2024-11-19T01:14:29.683Z","updated_at":"2024-11-19T01:14:30.203Z","avatar_url":"https://github.com/devsisters.png","language":"C#","funding_links":[],"categories":[],"sub_categories":[],"readme":"# UnityCLI\n![][CLIImage]\n\nUnity TCP CLI communication for debugging\n\n# About This Plugin\nMaking debugging menu is always tedious.\nIt's also too complex to present every debugging UIs for all the features.\nWith UnityCLI, you can send commands any debugging logics to the target device without UI.\n\n# Platform\nThis plugin is implemented by using .Net's System.Net, so it's platform-independent.\nYou can send commands from PC to mobile device.\nIf you have TCP terminal on your mobile device, then it's also possible to send commands from that device.\n\n# How To Use\n1. Copy bin/UnityCLI.dll to your project.\n\n2. To open communication, call ```CLI.Bridge.TryInstall```.\n```cs\nCLI.Bridge.TryInstall({SOME_PORT}, {SOME_WELCOME_MESSAGE})\n```\nThis will create singleton, which opens TCP connection at {SOME_PORT}.\nIf you want to communicate upon more than one port, just attach ```CLI.Bridge``` MonoBehaviour on any of your GameObject.\n\n3. Bind your own CLI logic to ```CLI.Bridge``` like below.\n```cs\nvoid BindExecuteCmd()\n{\n  var inst = CLI.Bridge.Instance;\n  inst.ExecuteCmd = ExecuteCmd;\n}\n\nCLI.Result ExecuteCmd(CLI.Command cmd)\n{\n  switch (cmd.Exe)\n  {\n    case \"realtimeSinceStartup\":\n      return CLI.Result.Success(\"now: \" + Time.realtimeSinceStartup);\n    case \"timescale\":\n      var newTimescale = float.Parse(cmd.Args[0]);\n      Time.timeScale = newTimescale;\n      return CLI.Result.Success(\"set timescale: \" + newTimescale);\n    default:\n      return CLI.Result.InvalidCmd(cmd);\n  }\n}\n```\n\n4. Build and play your game on target device.\n\n5. To make connection from PC (OSX) to target device, you can use any TCP connection tools.\n\nIf you are on OSX, then this can be easily done with ```nc```.\nOpen your terminal and enter below.\n```\nnc {TARGET_DEVICE_IP} {TARGET_DEVICE_PORT}\n```\nMake sure that PC and target device are reachable each other.\nTo check reachable, on terminal, enter ```ping {TARGET_DEVICE_IP}```.\n\n# Contribution\nTo build DLL, enter ```make``` on your terminal.\nThe output DLL will be placed in bin/UnityCLI.dll\n\n[CLIImage]: https://raw.githubusercontent.com/devsisters/UnityCLI/master/doc/CLI.png?token=ACr4DNTruH4ygqDJ4T6wdOT7ORichPBXks5Y02GcwA%3D%3D\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdevsisters%2Funitycli","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdevsisters%2Funitycli","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdevsisters%2Funitycli/lists"}