{"id":15578698,"url":"https://github.com/iamwing/universalcontroller_server","last_synced_at":"2026-04-18T00:31:24.262Z","repository":{"id":80963607,"uuid":"109120135","full_name":"iamWing/UniversalController_Server","owner":"iamWing","description":"Server side Unity package for project \"Universal Controller\"","archived":false,"fork":false,"pushed_at":"2018-01-15T00:31:01.000Z","size":81,"stargazers_count":1,"open_issues_count":0,"forks_count":1,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-07-29T16:29:52.800Z","etag":null,"topics":["csharp","networking","socket-programming","socket-server","unity","unity-library","unity3d"],"latest_commit_sha":null,"homepage":null,"language":"C#","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/iamWing.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","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,"publiccode":null,"codemeta":null}},"created_at":"2017-11-01T10:53:23.000Z","updated_at":"2018-01-10T11:54:34.000Z","dependencies_parsed_at":"2023-05-18T19:30:31.551Z","dependency_job_id":null,"html_url":"https://github.com/iamWing/UniversalController_Server","commit_stats":{"total_commits":97,"total_committers":1,"mean_commits":97.0,"dds":0.0,"last_synced_commit":"54123bada475e59c13d1293619c305905597866e"},"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"purl":"pkg:github/iamWing/UniversalController_Server","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/iamWing%2FUniversalController_Server","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/iamWing%2FUniversalController_Server/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/iamWing%2FUniversalController_Server/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/iamWing%2FUniversalController_Server/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/iamWing","download_url":"https://codeload.github.com/iamWing/UniversalController_Server/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/iamWing%2FUniversalController_Server/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31951231,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-17T17:29:20.459Z","status":"ssl_error","status_checked_at":"2026-04-17T17:28:47.801Z","response_time":62,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":["csharp","networking","socket-programming","socket-server","unity","unity-library","unity3d"],"created_at":"2024-10-02T19:12:21.136Z","updated_at":"2026-04-18T00:31:24.238Z","avatar_url":"https://github.com/iamWing.png","language":"C#","readme":"# Universal Controller Server\n\nUniversal Controller is a SDK that allows developers to use their customised \ncontroller on mobile devices or tailor made hardware controllers with Unity. \nThis package doesn't limited the mobile side application to be an Unity app. \nIt's aimed to support native Android, iOS apps, and single board computers like \nArduino boards \u0026 Raspberry Pi for the controller side.\n\nThis repo is the server side Unity package which hosts a socket server within \nthe Unity app by using native .NET socket APIs.\n\nFor the client side library, please refer to \n[here](https://github.com/iamWing/uc-client-java) for Java based client and \n[here](https://github.com/iamWing/uc-client-android) for Android client library.\n\n---\n## Getting start\n\nTo set up the server, follow the following instructions:\n\n1. Create an empty GameObject in the scene you want to start up the server \nand attach component _UCNetworkManager_ to it.\n2. Set the port number and maximum connections in _UCNetworkManager_.\n3. Create a new C# script as a child class of _UCPlayer_, override methods from \n_UCPlayer_ (see _SamplePlayer_.cs for reference) and implement your own logics for \neach command received.\n4. Attach the script you just created to your player object, then make that as \na prefab.\n5. Set the player prefab in _UCNetworkManager_.\n6. You are now good to go.\n\nThere is a sample scene included in the _Sample_ folder with everything set up \nproperly that you can use it as an example.\n\nThe server will shutdown by itself on application quit. Alternatively you can \ncall UCNetworkManager.ServerShutDown() to shutdown the server anytime you \nwant, the server will then shutdown after all data is sent and received.\n\nTo test the server, you can use \n[this](https://gist.github.com/iamWing/45ce5432acacf75fbb3b98c0b4c8e0fe) Java \ncmd tool. It is a fairly simple cmd line program to test out your server. Just \ntype in your server IP and type in the commands. One thing to mention is this \ntool will throw the IOException and terminate itself if there is any error on \nthe connection between the tool and the socket server.\n\n---\n## Commands\n\nBelow are the formats of each command that will be handled by the server once \nreceived from client:\n\n__Register player__\n\n`REGISTER:{player_id}`\n\n__Deregister player__\n\n`DEREGISTER:{player_id}`\u003cbr\u003e\n_* The client who registered that player will be disconnected._\n\n__Key pressed__\n\n`{player_id}:KEY_DOWN:{custom_key}`\n\n_or_\n\n`{player_id}:KEY_DOWN:{custom_key}:{extra_content}`\n\n__Joystick data__\n\n`{player_id}:JOYSTICK:{x}:{y}`\n\n__Gyro data__\n\n`{player_id}:GYRO:{x}:{y}:{z}`\n\n___Type of parameters___\n\n- _player\\_id : int_\n- _custom\\_key : string_\n- _extra\\_content : string_\n- _x : float_\n- _y : float_\n- _z : float_\n- ___value of float x, y, z must be between -1.0f \u0026 1.0f___\n\n---\n## Version history\n\n__v2.0.1__\n\n- Closes the socket when disconnected.\n\n__v2.0.0__\n\n- Reimplemented socket server with better structure and resources management.\n- Added function GetIPv4Address() in NetworkUtilities for fetching the local \nIPv4 address.\n- Implemented callbacks for data received from the clients.\n- Introduces UC-Commands (Register, Deregister, KeyDown, Joystick, Gyro).\n- Added component UCNetworkManager \u0026 UCPlayer.\n- Includes sample scene.\n\n__v1.0.0-alpha *pre-release*__\n\n - Set up socket server in Unity.\n - Includes test script for starting the server.\n\n## License \u0026 copyright\n\nCopyright (c) 2018 Wing Chau \u0026 AlphaOwl.co.uk\n\u003cbr /\u003e\nAll rights reserved.\n\nThis software may be modified and distributed under the terms\nof the MIT license. See the LICENSE file for details.\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fiamwing%2Funiversalcontroller_server","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fiamwing%2Funiversalcontroller_server","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fiamwing%2Funiversalcontroller_server/lists"}