{"id":19684113,"url":"https://github.com/interactivescapegmbh/tuiounityclient","last_synced_at":"2025-07-04T16:07:22.069Z","repository":{"id":187709692,"uuid":"607118576","full_name":"InteractiveScapeGmbH/TuioUnityClient","owner":"InteractiveScapeGmbH","description":"This package provides the functionality to use TUIO 1.1 or 2.0 in your Unity projects.","archived":false,"fork":false,"pushed_at":"2025-01-23T11:56:43.000Z","size":1491,"stargazers_count":27,"open_issues_count":7,"forks_count":4,"subscribers_count":9,"default_branch":"main","last_synced_at":"2025-04-29T05:35:34.314Z","etag":null,"topics":["tuio","tuio-client","unity"],"latest_commit_sha":null,"homepage":"","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/InteractiveScapeGmbH.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","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,"zenodo":null}},"created_at":"2023-02-27T10:57:52.000Z","updated_at":"2025-04-29T00:56:12.000Z","dependencies_parsed_at":"2024-06-03T15:11:49.702Z","dependency_job_id":"bb43c2d1-32b0-49ad-9923-d759de056fa7","html_url":"https://github.com/InteractiveScapeGmbH/TuioUnityClient","commit_stats":null,"previous_names":["interactivescapegmbh/tuiounityclient"],"tags_count":4,"template":false,"template_full_name":null,"purl":"pkg:github/InteractiveScapeGmbH/TuioUnityClient","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/InteractiveScapeGmbH%2FTuioUnityClient","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/InteractiveScapeGmbH%2FTuioUnityClient/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/InteractiveScapeGmbH%2FTuioUnityClient/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/InteractiveScapeGmbH%2FTuioUnityClient/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/InteractiveScapeGmbH","download_url":"https://codeload.github.com/InteractiveScapeGmbH/TuioUnityClient/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/InteractiveScapeGmbH%2FTuioUnityClient/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":263573356,"owners_count":23482640,"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":["tuio","tuio-client","unity"],"created_at":"2024-11-11T18:16:51.952Z","updated_at":"2025-07-04T16:07:22.009Z","avatar_url":"https://github.com/InteractiveScapeGmbH.png","language":"C#","funding_links":[],"categories":[],"sub_categories":[],"readme":"# TUIO Client for Unity\n\u003c!-- ALL-CONTRIBUTORS-BADGE:START - Do not remove or modify this section --\u003e\n[![All Contributors](https://img.shields.io/badge/all_contributors-2-orange.svg?style=flat-square)](#contributors-)\n\u003c!-- ALL-CONTRIBUTORS-BADGE:END --\u003e\nThis package provides the functionality to use TUIO 1.1 or 2.0 in you Unity projects. It is based on [TuioNet](https://github.com/InteractiveScapeGmbH/TuioNet), a .Net implementation of the TUIO 1.1 and 2.0 specification by Martin Kaltenbrunner.\n\n## IMPORTANT\n**Version 2.0 introduces breaking changes. Take care when hitting the update button in the package manager!**\n\n## Overview\n\nA TUIO Client package to enable the easy creation of apps and games that interface with TUIO capable hardware and software for tangible input.\n\n## Package contents\n\nThe Editor and Runtime folders contain key scripts for the Unity editor and runtime respectively. The Samples~ folder contains a simple reference implementation for TUIO 1.1 or TUIO 2.0 that visualizes the cursors and objects as coloured squares.\n\n## Installation instructions\n\nOpen the Package Manager window and click the plus icon followed by \"Add package from git URL...\". Enter https://github.com/InteractiveScapeGmbH/TuioUnityClient.git and click \"Add\".\u003c/br\u003e\nAlternatively download the code from github, unzip it and choose the \"Add package from disk..\" option. Select the ```package.json``` file from the package directory.\n\n![Add Package](Documentation~/img/pm-add.png)\n\nAfter the import process is finished the package should appear in the Package Manager and you can import the sample projects.\n\n![Imported Package](Documentation~/img/imported-package.png)\n\n## Requirements\n\nYou will require a TUIO source connected to your device.\n\nThis package is built to run from Unity 2021.3 upwards.\n\n**Important:** By default the windows firewall blocks network communication of the Unity Editor. In order to receive UDP messages from other devices in your local network you need to allow it in the windows firewall settings as shown below:\n\n![Firewall Settings](/Documentation~/img/firewall.png)\n\n## Dependencies\n- TextMesh Pro for displaying debugging information like id, position or angle.\n\n## Limitations\n\nTUIO 1.1 support is currently limited to 2Dobj, 2Dcur and 2Dblb messages.\u003c/br\u003e\n**Important:** 25Dobj, 25Dcur, 25Dblb, 3Dobj, 3Dcur, 3Dblb and custom messages are all ignored.\n\nTUIO 2.0 support is currently limited to FRM, ALV, TOK, PTR, BND and SYM messages.\u003c/br\u003e \n**Important:** T3D, P3D, B3D, CHG, OCG, ICG, SKG, S3D, SVG, ARG, RAW, CTL, DAT, SIG, ALA, COA, LIA, LLA, LTA and custom messages are all ignored.\n\nThis package has not been tested outside of Windows, however should be compatible across all platforms.\n\n## Workflows\n\n- Create a TUIO 1.1 Session or TUIO 2.0 Session in your scene using GameObject \u003e TUIO in the main Unity window or Right Click \u003e TUIO in the Hierarchy.\n\n![Create Tuio Manager](Documentation~/img/add-manager.png)\n\nSet the desired TUIO Session Settings (see Reference).\n\n![Manager Settings](Documentation~/img/settings.png)\n\n**Default Websocket ports**\n- Tuio 1.1: `3333`\n- Tuio 2.0: `3343`\n\n### Simple Setup\n- Add a TUIO 1.1 or TUIO 2.0 Visualizer from the `Prefabs` folder of the package to your scene\n- Set the reference to the `Tuio Session` and make sure all references to Tuio Prefabs are set (you can find them in the `Prefabs` folder of the packge too.)\n\n![Tuio Visualizer](Documentation~/img/tuio-visualizer.png)\n\n### Advanced Setup\nThe TUIO Visualizer Prefabs are just for testing purpose to check if everything works as expected. But they are simple examples how to implement your own custom solution. The most important component is the `TuioDispatcher`. There is one for Tuio 1.1 (`Tuio11Dispatcher`) and Tuio 2.0 (`Tuio20Dispatcher`). They provide all events you need to. You can access the dispatcher through the `TuioSession` object.\n\nIn general there are four types of events we care about. `Add`, `Update`, `Remove` and `Refresh`. \n- `Add`/`Remove`: are called once when a touch or an object gets placed or removed from the table\n- `Update`: is called everytime when a property of a touch or an object was changed this frame (e.g. it was moved or rotated)\n- `Refresh`: is called every frame. This can be helpful if you want to handle all updates conained in one TUIO frame together\n\nThere are some little differences between Tuio 1.1 and Tuio 2.0 for `Add`, `Remove` and `Update`.\n\n#### TUIO 1.1\n- there are `Add`, `Remove` and `Update` events for each type of tuio objects (`Touch`, `Object`, `Blob`)\n```csharp\npublic event EventHandler\u003cTuio11Cursor\u003e OnCursorAdd;\npublic event EventHandler\u003cTuio11Cursor\u003e OnCursorUpdate;\npublic event EventHandler\u003cTuio11Cursor\u003e OnCursorRemove;\n\npublic event EventHandler\u003cTuio11Object\u003e OnObjectAdd;\npublic event EventHandler\u003cTuio11Object\u003e OnObjectUpdate;\npublic event EventHandler\u003cTuio11Object\u003e OnObjectRemove;\n\npublic event EventHandler\u003cTuio11Blob\u003e OnBlobAdd;\npublic event EventHandler\u003cTuio11Blob\u003e OnBlobUpdate;\npublic event EventHandler\u003cTuio11Blob\u003e OnBlobRemove;\n```\n\n#### TUIO 2.0\n- for tuio 2.0 things are handled a little bit differently. There is only one `Add`, `Remove` and `Update` event. \n```csharp\npublic event EventHandler\u003cTuio20Object\u003e OnObjectAdd;\npublic event EventHandler\u003cTuio20Object\u003e OnObjectUpdate;\npublic event EventHandler\u003cTuio20Object\u003e OnObjectRemove;\n```\nThe `Tuio20Object` can hold different Tuio 2.0 types simultaneously and has methods to check which type it contains:\n\n**Tuio20Object.cs**\n```csharp\n public bool ContainsTuioToken() =\u003e this.Token != null;\n\npublic bool ContainsTuioPointer() =\u003e this.Pointer != null;\n\npublic bool ContainsTuioBounds() =\u003e this.Bounds != null;\n\npublic bool ContainsTuioSymbol() =\u003e this.Symbol != null;\n\npublic bool ContainsNewTuioToken()\n{\n  Tuio20Token token = this.Token;\n  return token != null \u0026\u0026 token.State == TuioState.Added;\n}\n\npublic bool ContainsNewTuioPointer()\n{\n  Tuio20Pointer pointer = this.Pointer;\n  return pointer != null \u0026\u0026 pointer.State == TuioState.Added;\n}\n\npublic bool ContainsNewTuioBounds()\n{\n  Tuio20Bounds bounds = this.Bounds;\n  return bounds != null \u0026\u0026 bounds.State == TuioState.Added;\n}\n\npublic bool ContainsNewTuioSymbol()\n{\n  Tuio20Symbol symbol = this.Symbol;\n  return symbol != null \u0026\u0026 symbol.State == TuioState.Added;\n}\n```\n\nYou can then access the object you want by public properties of the `Tuio20Object`\n\n```csharp\npublic Tuio20Token Token { get; private set; }\n\npublic Tuio20Pointer Pointer { get; private set; }\n\npublic Tuio20Bounds Bounds { get; private set; }\n\npublic Tuio20Symbol Symbol { get; private set; }\n```\n\n## Reference\n\n| **Field** | **Format** | **Description** |\n|--|--|--|\n|Tuio Version|Tuio 1.1/ Tuio 2.0| Version of the Tuio specification you want to use\n|Tuio Connection Type | Websocket / UDP | The connection type to use\n| Udp Port | 0 - 9999 | The local port to receive UDP messages on |\n| Websocket Address | IPv4 address   | The remote address to connect to websocket server\n\n\n\n## Samples\nSamples can be imported via the Package Manager. Right now there are two basic sample scenes for TUIO 1.1 and TUIO 2.0\n![Sample Scene](Documentation~/img/sample-scene.png)\n\n## Contributors ✨\n\nThanks goes to these wonderful people ([emoji key](https://allcontributors.org/docs/en/emoji-key)):\n\n\u003c!-- ALL-CONTRIBUTORS-LIST:START - Do not remove or modify this section --\u003e\n\u003c!-- prettier-ignore-start --\u003e\n\u003c!-- markdownlint-disable --\u003e\n\u003ctable\u003e\n  \u003ctbody\u003e\n    \u003ctr\u003e\n      \u003ctd align=\"center\" valign=\"top\" width=\"14.28%\"\u003e\u003ca href=\"https://www.interactive-scape.com/\"\u003e\u003cimg src=\"https://avatars.githubusercontent.com/u/51314413?v=4?s=100\" width=\"100px;\" alt=\"Erich Querner\"/\u003e\u003cbr /\u003e\u003csub\u003e\u003cb\u003eErich Querner\u003c/b\u003e\u003c/sub\u003e\u003c/a\u003e\u003cbr /\u003e\u003ca href=\"https://github.com/InteractiveScapeGmbH/TuioUnityClient/commits?author=eqbic\" title=\"Code\"\u003e💻\u003c/a\u003e\u003c/td\u003e\n      \u003ctd align=\"center\" valign=\"top\" width=\"14.28%\"\u003e\u003ca href=\"https://github.com/gilescoope\"\u003e\u003cimg src=\"https://avatars.githubusercontent.com/u/5291605?v=4?s=100\" width=\"100px;\" alt=\"Giles Coope\"/\u003e\u003cbr /\u003e\u003csub\u003e\u003cb\u003eGiles Coope\u003c/b\u003e\u003c/sub\u003e\u003c/a\u003e\u003cbr /\u003e\u003ca href=\"https://github.com/InteractiveScapeGmbH/TuioUnityClient/commits?author=gilescoope\" title=\"Code\"\u003e💻\u003c/a\u003e\u003c/td\u003e\n    \u003c/tr\u003e\n  \u003c/tbody\u003e\n\u003c/table\u003e\n\n\u003c!-- markdownlint-restore --\u003e\n\u003c!-- prettier-ignore-end --\u003e\n\n\u003c!-- ALL-CONTRIBUTORS-LIST:END --\u003e\n\nThis project follows the [all-contributors](https://github.com/all-contributors/all-contributors) specification. Contributions of any kind welcome!","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Finteractivescapegmbh%2Ftuiounityclient","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Finteractivescapegmbh%2Ftuiounityclient","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Finteractivescapegmbh%2Ftuiounityclient/lists"}