├── .gitignore ├── README.md ├── docs ├── UnityOSC & TouchOSC Integration.pdf ├── UnityOSC_manual.pdf └── doxygen │ └── html │ ├── UnityOSC_Logo.jpg │ ├── _o_s_c_bundle_8cs_source.html │ ├── _o_s_c_client_8cs_source.html │ ├── _o_s_c_handler_8cs_source.html │ ├── _o_s_c_helper_8cs_source.html │ ├── _o_s_c_message_8cs_source.html │ ├── _o_s_c_packet_8cs_source.html │ ├── _o_s_c_server_8cs_source.html │ ├── annotated.html │ ├── bc_s.png │ ├── class_o_s_c_handler-members.html │ ├── class_o_s_c_handler.html │ ├── class_o_s_c_helper-members.html │ ├── class_o_s_c_helper.html │ ├── class_unity_o_s_c_1_1_o_s_c_bundle-members.html │ ├── class_unity_o_s_c_1_1_o_s_c_bundle.html │ ├── class_unity_o_s_c_1_1_o_s_c_bundle.png │ ├── class_unity_o_s_c_1_1_o_s_c_client-members.html │ ├── class_unity_o_s_c_1_1_o_s_c_client.html │ ├── class_unity_o_s_c_1_1_o_s_c_message-members.html │ ├── class_unity_o_s_c_1_1_o_s_c_message.html │ ├── class_unity_o_s_c_1_1_o_s_c_message.png │ ├── class_unity_o_s_c_1_1_o_s_c_packet-members.html │ ├── class_unity_o_s_c_1_1_o_s_c_packet.html │ ├── class_unity_o_s_c_1_1_o_s_c_packet.png │ ├── class_unity_o_s_c_1_1_o_s_c_server-members.html │ ├── class_unity_o_s_c_1_1_o_s_c_server.html │ ├── classes.html │ ├── closed.png │ ├── doxygen.css │ ├── doxygen.png │ ├── files.html │ ├── ftv2blank.png │ ├── ftv2doc.png │ ├── ftv2folderclosed.png │ ├── ftv2folderopen.png │ ├── ftv2lastnode.png │ ├── ftv2link.png │ ├── ftv2mlastnode.png │ ├── ftv2mnode.png │ ├── ftv2node.png │ ├── ftv2plastnode.png │ ├── ftv2pnode.png │ ├── ftv2splitbar.png │ ├── ftv2vertline.png │ ├── functions.html │ ├── functions_func.html │ ├── hierarchy.html │ ├── index.html │ ├── jquery.js │ ├── namespace_unity_o_s_c.html │ ├── namespaces.html │ ├── nav_f.png │ ├── nav_h.png │ ├── navtree.css │ ├── navtree.js │ ├── open.png │ ├── resize.js │ ├── struct_client_log-members.html │ ├── struct_client_log.html │ ├── struct_server_log-members.html │ ├── struct_server_log.html │ ├── tab_a.png │ ├── tab_b.png │ ├── tab_h.png │ ├── tab_s.png │ └── tabs.css ├── src ├── Editor │ └── OSCHelper.cs └── OSC │ ├── OSCBundle.cs │ ├── OSCClient.cs │ ├── OSCHandler.cs │ ├── OSCMessage.cs │ ├── OSCPacket.cs │ └── OSCServer.cs └── tests └── touchosc_integration ├── Assets ├── TestScene.unity ├── TestScene.unity.meta ├── WSATestCertificate.pfx ├── WSATestCertificate.pfx.meta ├── oscControl.cs └── oscControl.cs.meta └── ProjectSettings ├── AudioManager.asset ├── ClusterInputManager.asset ├── DynamicsManager.asset ├── EditorBuildSettings.asset ├── EditorSettings.asset ├── GraphicsSettings.asset ├── InputManager.asset ├── NavMeshAreas.asset ├── NetworkManager.asset ├── Physics2DSettings.asset ├── ProjectSettings.asset ├── ProjectVersion.txt ├── QualitySettings.asset ├── TagManager.asset ├── TimeManager.asset └── UnityConnectSettings.asset /.gitignore: -------------------------------------------------------------------------------- 1 | /[Ll]ibrary/ 2 | /[Tt]emp/ 3 | /[Oo]bj/ 4 | /[Bb]uild/ 5 | /[Bb]uilds/ 6 | /Assets/AssetStoreTools* 7 | 8 | # Autogenerated VS/MD solution and project files 9 | ExportedObj/ 10 | *.csproj 11 | *.unityproj 12 | *.sln 13 | *.suo 14 | *.tmp 15 | *.user 16 | *.userprefs 17 | *.pidb 18 | *.booproj 19 | *.svd 20 | 21 | 22 | # Unity3D generated meta files 23 | *.pidb.meta 24 | 25 | # Unity3D Generated File On Crash Reports 26 | sysinfo.txt 27 | 28 | # Builds 29 | *.apk 30 | *.unitypackage 31 | 32 | # ========================= 33 | # Operating System Files 34 | # ========================= 35 | 36 | # OSX 37 | # ========================= 38 | 39 | .DS_Store 40 | .AppleDouble 41 | .LSOverride 42 | 43 | # Thumbnails 44 | ._* 45 | 46 | # Files that might appear in the root of a volume 47 | .DocumentRevisions-V100 48 | .fseventsd 49 | .Spotlight-V100 50 | .TemporaryItems 51 | .Trashes 52 | .VolumeIcon.icns 53 | 54 | # Directories potentially created on remote AFP share 55 | .AppleDB 56 | .AppleDesktop 57 | Network Trash Folder 58 | Temporary Items 59 | .apdisk 60 | 61 | # Windows 62 | # ========================= 63 | 64 | # Windows image file caches 65 | Thumbs.db 66 | ehthumbs.db 67 | 68 | # Folder config file 69 | Desktop.ini 70 | 71 | # Recycle Bin used on file shares 72 | $RECYCLE.BIN/ 73 | 74 | # Windows Installer files 75 | *.cab 76 | *.msi 77 | *.msm 78 | *.msp 79 | 80 | # Windows shortcuts 81 | *.lnk 82 | 83 | #mywork 84 | *.swp 85 | tests/touchosc_integration/Assets/Editor* 86 | tests/touchosc_integration/Assets/OSC* 87 | tests/touchosc_integration/Library 88 | tests/touchosc_integration/Temp 89 | tests/touchosc_integration/UWP 90 | tests/touchosc_integration/App 91 | 92 | 93 | 94 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | 2 | ## This version support HoloLens(UWP) forked from UnityOSC v1.2. 3 | 4 | by littilewing 5 | 6 | 7 | ## UnityOSC v1.2. 8 | 9 | Open Sound Control classes and API for the Unity 3d game engine 10 | 11 | Based on Bespoke Open Sound Control Library by Paul Varcholik (pvarchol@bespokesoftware.org). 12 | Licensed under MIT license. 13 | 14 | ##How to use 15 | 16 | Copy the src/Editor folder contents to the corresponding Editor/ folder of your Unity project. The rest can go to your e.g. Assets/ folder of the same project. 17 | 18 | ## Documentation and examples of usage 19 | 20 | docs/doxygen/html/index.html 21 | 22 | docs/UnityOSC_manual.pdf 23 | 24 | docs/UnityOSC & TouchOSC Integration.pdf 25 | 26 | Please head to the tests/ folder for examples of usage and a TouchOSC test Unity project. 27 | 28 | ## TODO 29 | 30 | 07.11 Change string concatenations to C# string builders. 31 | -------------------------------------------------------------------------------- /docs/UnityOSC & TouchOSC Integration.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/the6th/UnityOSC-HoloLens/b0c16ecf7482f3ced8b211dc8c6723683fe1cfed/docs/UnityOSC & TouchOSC Integration.pdf -------------------------------------------------------------------------------- /docs/UnityOSC_manual.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/the6th/UnityOSC-HoloLens/b0c16ecf7482f3ced8b211dc8c6723683fe1cfed/docs/UnityOSC_manual.pdf -------------------------------------------------------------------------------- /docs/doxygen/html/UnityOSC_Logo.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/the6th/UnityOSC-HoloLens/b0c16ecf7482f3ced8b211dc8c6723683fe1cfed/docs/doxygen/html/UnityOSC_Logo.jpg -------------------------------------------------------------------------------- /docs/doxygen/html/annotated.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | UnityOSC: Class List 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 16 | 17 | 18 | 19 | 20 | 23 |
24 |
25 | 26 | 27 | 28 | 29 | 33 | 34 | 35 |
30 |
UnityOSC 1.0
31 |
Open Sound Control classes and API for the Unity 3d game engine (http://www.unity3d.com)
32 |
36 |
37 | 61 | 69 |
70 |
71 | 75 |
77 |
78 |
79 | 82 |
83 |
84 |
85 |
Class List
86 |
87 |
88 |
Here are the classes, structs, unions and interfaces with brief descriptions:
89 | 90 | 91 | 92 | 93 | 94 | 95 | 96 | 97 | 98 |
ClientLogModels a log of a client composed by an OSCClient, a List of OSCMessage and a List of strings that represent the current messages in the log
UnityOSC.OSCBundleModels a Bundle of the OSC protocol. Derived from a OSC Packet over a OSC Stream
UnityOSC.OSCClientDispatches OSC messages to the specified destination address and port
OSCHandlerHandles all the OSC servers and clients of the current Unity game/application. Tracks incoming and outgoing messages
OSCHelperHelper to monitor incoming at outgoing OSC messages from the Unity Editor. You should have this script placed at the /Editor folder. Show the panel helper by selecting "Window->OSC Helper" from the Unity menu
UnityOSC.OSCMessage
UnityOSC.OSCPacketModels a OSC Packet over an OSC stream
UnityOSC.OSCServerReceives incoming OSC messages
ServerLogModels a log of a server composed by an OSCServer, a List of OSCPacket and a List of strings that represent the current messages in the log
99 |
100 |
101 | 108 | 109 |
113 |  All Classes Namespaces Functions
114 | 115 | 116 |
117 | 120 |
121 | 122 | 123 | 124 | 125 | -------------------------------------------------------------------------------- /docs/doxygen/html/bc_s.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/the6th/UnityOSC-HoloLens/b0c16ecf7482f3ced8b211dc8c6723683fe1cfed/docs/doxygen/html/bc_s.png -------------------------------------------------------------------------------- /docs/doxygen/html/class_o_s_c_handler-members.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | UnityOSC: Member List 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 16 | 17 | 18 | 19 | 20 | 23 |
24 |
25 | 26 | 27 | 28 | 29 | 33 | 34 | 35 |
30 |
UnityOSC 1.0
31 |
Open Sound Control classes and API for the Unity 3d game engine (http://www.unity3d.com)
32 |
36 |
37 | 61 | 69 |
70 |
71 | 75 |
77 |
78 |
79 | 82 |
83 |
84 |
85 |
OSCHandler Member List
86 |
87 |
88 | This is the complete list of members for OSCHandler, including all inherited members. 89 | 90 | 91 | 92 | 93 | 94 | 95 | 96 | 97 | 98 |
Clients (defined in OSCHandler)OSCHandler
CreateClient(string clientId, IPAddress destination, int port)OSCHandler
CreateServer(string serverId, int port)OSCHandler
Init()OSCHandler
Instance (defined in OSCHandler)OSCHandler [static]
SendMessageToClient< T >(string clientId, string address, T value)OSCHandler
SendMessageToClient< T >(string clientId, string address, List< T > values)OSCHandler
Servers (defined in OSCHandler)OSCHandler
UpdateLogs()OSCHandler
99 |
100 | 107 | 108 |
112 |  All Classes Namespaces Functions
113 | 114 | 115 |
116 | 119 |
120 | 121 | 122 | 123 | 124 | -------------------------------------------------------------------------------- /docs/doxygen/html/class_o_s_c_helper-members.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | UnityOSC: Member List 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 16 | 17 | 18 | 19 | 20 | 23 |
24 |
25 | 26 | 27 | 28 | 29 | 33 | 34 | 35 |
30 |
UnityOSC 1.0
31 |
Open Sound Control classes and API for the Unity 3d game engine (http://www.unity3d.com)
32 |
36 |
37 | 61 | 69 |
70 |
71 | 75 |
77 |
78 |
79 | 82 |
83 |
84 |
85 |
OSCHelper Member List
86 |
87 |
88 | This is the complete list of members for OSCHelper, including all inherited members. 89 |
90 |
91 | 98 | 99 |
103 |  All Classes Namespaces Functions
104 | 105 | 106 |
107 | 110 |
111 | 112 | 113 | 114 | 115 | -------------------------------------------------------------------------------- /docs/doxygen/html/class_o_s_c_helper.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | UnityOSC: OSCHelper Class Reference 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 16 | 17 | 18 | 19 | 20 | 23 |
24 |
25 | 26 | 27 | 28 | 29 | 33 | 34 | 35 |
30 |
UnityOSC 1.0
31 |
Open Sound Control classes and API for the Unity 3d game engine (http://www.unity3d.com)
32 |
36 |
37 | 61 | 69 |
70 |
71 | 75 |
77 |
78 |
79 | 82 |
83 |
84 |
85 |
OSCHelper Class Reference
86 |
87 |
88 | 89 |

Helper to monitor incoming at outgoing OSC messages from the Unity Editor. You should have this script placed at the /Editor folder. Show the panel helper by selecting "Window->OSC Helper" from the Unity menu. 90 | More...

91 | 92 |

List of all members.

93 | 94 |
95 |

Detailed Description

96 |

Helper to monitor incoming at outgoing OSC messages from the Unity Editor. You should have this script placed at the /Editor folder. Show the panel helper by selecting "Window->OSC Helper" from the Unity menu.

97 | 98 |

Definition at line 32 of file OSCHelper.cs.

99 |

The documentation for this class was generated from the following file: 102 |
103 |
104 | 112 | 113 |
117 |  All Classes Namespaces Functions
118 | 119 | 120 |
121 | 124 |
125 | 126 | 127 | 128 | 129 | -------------------------------------------------------------------------------- /docs/doxygen/html/class_unity_o_s_c_1_1_o_s_c_bundle.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/the6th/UnityOSC-HoloLens/b0c16ecf7482f3ced8b211dc8c6723683fe1cfed/docs/doxygen/html/class_unity_o_s_c_1_1_o_s_c_bundle.png -------------------------------------------------------------------------------- /docs/doxygen/html/class_unity_o_s_c_1_1_o_s_c_client-members.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | UnityOSC: Member List 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 16 | 17 | 18 | 19 | 20 | 23 |
24 |
25 | 26 | 27 | 28 | 29 | 33 | 34 | 35 |
30 |
UnityOSC 1.0
31 |
Open Sound Control classes and API for the Unity 3d game engine (http://www.unity3d.com)
32 |
36 |
37 | 61 | 69 |
70 |
71 | 75 |
77 |
78 |
79 | 82 |
83 |
84 |
85 |
UnityOSC.OSCClient Member List
86 |
87 |
88 | This is the complete list of members for UnityOSC.OSCClient, including all inherited members. 89 | 90 | 91 | 92 | 93 | 94 | 95 |
ClientIPAddress (defined in UnityOSC.OSCClient)UnityOSC.OSCClient
Close()UnityOSC.OSCClient
Connect()UnityOSC.OSCClient
OSCClient(IPAddress address, int port) (defined in UnityOSC.OSCClient)UnityOSC.OSCClient
Port (defined in UnityOSC.OSCClient)UnityOSC.OSCClient
Send(OSCPacket packet)UnityOSC.OSCClient
96 |
97 | 104 | 105 |
109 |  All Classes Namespaces Functions
110 | 111 | 112 |
113 | 116 |
117 | 118 | 119 | 120 | 121 | -------------------------------------------------------------------------------- /docs/doxygen/html/class_unity_o_s_c_1_1_o_s_c_message.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/the6th/UnityOSC-HoloLens/b0c16ecf7482f3ced8b211dc8c6723683fe1cfed/docs/doxygen/html/class_unity_o_s_c_1_1_o_s_c_message.png -------------------------------------------------------------------------------- /docs/doxygen/html/class_unity_o_s_c_1_1_o_s_c_packet-members.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | UnityOSC: Member List 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 16 | 17 | 18 | 19 | 20 | 23 |
24 |
25 | 26 | 27 | 28 | 29 | 33 | 34 | 35 |
30 |
UnityOSC 1.0
31 |
Open Sound Control classes and API for the Unity 3d game engine (http://www.unity3d.com)
32 |
36 |
37 | 61 | 69 |
70 |
71 | 75 |
77 |
78 |
79 | 82 |
83 |
84 |
85 |
UnityOSC.OSCPacket Member List
86 |
87 |
88 | This is the complete list of members for UnityOSC.OSCPacket, including all inherited members. 89 | 90 | 91 | 92 | 93 | 94 | 95 | 96 | 97 | 98 | 99 | 100 | 101 | 102 | 103 | 104 | 105 | 106 | 107 |
_address (defined in UnityOSC.OSCPacket)UnityOSC.OSCPacket [protected]
_binaryData (defined in UnityOSC.OSCPacket)UnityOSC.OSCPacket [protected]
_data (defined in UnityOSC.OSCPacket)UnityOSC.OSCPacket [protected]
_timeStamp (defined in UnityOSC.OSCPacket)UnityOSC.OSCPacket [protected]
Address (defined in UnityOSC.OSCPacket)UnityOSC.OSCPacket
Append< T >(T msgvalue) (defined in UnityOSC.OSCPacket)UnityOSC.OSCPacket [pure virtual]
BinaryData (defined in UnityOSC.OSCPacket)UnityOSC.OSCPacket
Data (defined in UnityOSC.OSCPacket)UnityOSC.OSCPacket
IsBundle() (defined in UnityOSC.OSCPacket)UnityOSC.OSCPacket [pure virtual]
OSCPacket()UnityOSC.OSCPacket
Pack() (defined in UnityOSC.OSCPacket)UnityOSC.OSCPacket [pure virtual]
PackValue< T >(T value)UnityOSC.OSCPacket [protected, static]
PadNull(List< byte > data)UnityOSC.OSCPacket [protected, static]
SwapEndian(byte[] data)UnityOSC.OSCPacket [protected, static]
TimeStamp (defined in UnityOSC.OSCPacket)UnityOSC.OSCPacket
Unpack(byte[] data)UnityOSC.OSCPacket [static]
Unpack(byte[] data, ref int start, int end)UnityOSC.OSCPacket [static]
UnpackValue< T >(byte[] data, ref int start)UnityOSC.OSCPacket [protected, static]
108 |
109 | 116 | 117 |
121 |  All Classes Namespaces Functions
122 | 123 | 124 |
125 | 128 |
129 | 130 | 131 | 132 | 133 | -------------------------------------------------------------------------------- /docs/doxygen/html/class_unity_o_s_c_1_1_o_s_c_packet.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/the6th/UnityOSC-HoloLens/b0c16ecf7482f3ced8b211dc8c6723683fe1cfed/docs/doxygen/html/class_unity_o_s_c_1_1_o_s_c_packet.png -------------------------------------------------------------------------------- /docs/doxygen/html/class_unity_o_s_c_1_1_o_s_c_server-members.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | UnityOSC: Member List 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 16 | 17 | 18 | 19 | 20 | 23 |
24 |
25 | 26 | 27 | 28 | 29 | 33 | 34 | 35 |
30 |
UnityOSC 1.0
31 |
Open Sound Control classes and API for the Unity 3d game engine (http://www.unity3d.com)
32 |
36 |
37 | 61 | 69 |
70 |
71 | 75 |
77 |
78 |
79 | 82 |
83 |
84 |
85 |
UnityOSC.OSCServer Member List
86 |
87 |
88 | This is the complete list of members for UnityOSC.OSCServer, including all inherited members. 89 | 90 | 91 | 92 | 93 | 94 | 95 |
Close()UnityOSC.OSCServer
Connect()UnityOSC.OSCServer
LastReceivedPacket (defined in UnityOSC.OSCServer)UnityOSC.OSCServer
LocalPort (defined in UnityOSC.OSCServer)UnityOSC.OSCServer
OSCServer(int localPort) (defined in UnityOSC.OSCServer)UnityOSC.OSCServer
UDPClient (defined in UnityOSC.OSCServer)UnityOSC.OSCServer
96 |
97 | 104 | 105 |
109 |  All Classes Namespaces Functions
110 | 111 | 112 |
113 | 116 |
117 | 118 | 119 | 120 | 121 | -------------------------------------------------------------------------------- /docs/doxygen/html/classes.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | UnityOSC: Class Index 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 16 | 17 | 18 | 19 | 20 | 23 |
24 |
25 | 26 | 27 | 28 | 29 | 33 | 34 | 35 |
30 |
UnityOSC 1.0
31 |
Open Sound Control classes and API for the Unity 3d game engine (http://www.unity3d.com)
32 |
36 |
37 | 61 | 69 |
70 |
71 | 75 |
77 |
78 |
79 | 82 |
83 |
84 |
85 |
Class Index
86 |
87 |
88 |
C | O | S
89 | 90 |
  C  
91 |
OSCBundle (UnityOSC)   OSCHelper   OSCPacket (UnityOSC)   
  S  
92 |
ClientLog   OSCClient (UnityOSC)   OSCMessage (UnityOSC)   OSCServer (UnityOSC)   ServerLog   
  O  
93 |
OSCHandler   
C | O | S
94 |
95 |
96 | 103 | 104 |
108 |  All Classes Namespaces Functions
109 | 110 | 111 |
112 | 115 |
116 | 117 | 118 | 119 | 120 | -------------------------------------------------------------------------------- /docs/doxygen/html/closed.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/the6th/UnityOSC-HoloLens/b0c16ecf7482f3ced8b211dc8c6723683fe1cfed/docs/doxygen/html/closed.png -------------------------------------------------------------------------------- /docs/doxygen/html/doxygen.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/the6th/UnityOSC-HoloLens/b0c16ecf7482f3ced8b211dc8c6723683fe1cfed/docs/doxygen/html/doxygen.png -------------------------------------------------------------------------------- /docs/doxygen/html/files.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | UnityOSC: File List 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 16 | 17 | 18 | 19 | 20 | 23 |
24 |
25 | 26 | 27 | 28 | 29 | 33 | 34 | 35 |
30 |
UnityOSC 1.0
31 |
Open Sound Control classes and API for the Unity 3d game engine (http://www.unity3d.com)
32 |
36 |
37 | 61 | 66 |
67 |
68 | 72 |
74 |
75 |
76 | 79 |
80 |
81 |
82 |
File List
83 |
84 |
85 |
Here is a list of all documented files with brief descriptions:
86 | 87 | 88 | 89 | 90 | 91 | 92 | 93 |
/Users/jorgegarciamartin/Desktop/src/OSCHandler.cs [code]
/Users/jorgegarciamartin/Desktop/src/Editor/OSCHelper.cs [code]
/Users/jorgegarciamartin/Desktop/src/UnityOSC/OSCBundle.cs [code]
/Users/jorgegarciamartin/Desktop/src/UnityOSC/OSCClient.cs [code]
/Users/jorgegarciamartin/Desktop/src/UnityOSC/OSCMessage.cs [code]
/Users/jorgegarciamartin/Desktop/src/UnityOSC/OSCPacket.cs [code]
/Users/jorgegarciamartin/Desktop/src/UnityOSC/OSCServer.cs [code]
94 |
95 |
96 | 103 | 104 |
108 |  All Classes Namespaces Functions
109 | 110 | 111 |
112 | 115 |
116 | 117 | 118 | 119 | 120 | -------------------------------------------------------------------------------- /docs/doxygen/html/ftv2blank.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/the6th/UnityOSC-HoloLens/b0c16ecf7482f3ced8b211dc8c6723683fe1cfed/docs/doxygen/html/ftv2blank.png -------------------------------------------------------------------------------- /docs/doxygen/html/ftv2doc.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/the6th/UnityOSC-HoloLens/b0c16ecf7482f3ced8b211dc8c6723683fe1cfed/docs/doxygen/html/ftv2doc.png -------------------------------------------------------------------------------- /docs/doxygen/html/ftv2folderclosed.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/the6th/UnityOSC-HoloLens/b0c16ecf7482f3ced8b211dc8c6723683fe1cfed/docs/doxygen/html/ftv2folderclosed.png -------------------------------------------------------------------------------- /docs/doxygen/html/ftv2folderopen.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/the6th/UnityOSC-HoloLens/b0c16ecf7482f3ced8b211dc8c6723683fe1cfed/docs/doxygen/html/ftv2folderopen.png -------------------------------------------------------------------------------- /docs/doxygen/html/ftv2lastnode.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/the6th/UnityOSC-HoloLens/b0c16ecf7482f3ced8b211dc8c6723683fe1cfed/docs/doxygen/html/ftv2lastnode.png -------------------------------------------------------------------------------- /docs/doxygen/html/ftv2link.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/the6th/UnityOSC-HoloLens/b0c16ecf7482f3ced8b211dc8c6723683fe1cfed/docs/doxygen/html/ftv2link.png -------------------------------------------------------------------------------- /docs/doxygen/html/ftv2mlastnode.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/the6th/UnityOSC-HoloLens/b0c16ecf7482f3ced8b211dc8c6723683fe1cfed/docs/doxygen/html/ftv2mlastnode.png -------------------------------------------------------------------------------- /docs/doxygen/html/ftv2mnode.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/the6th/UnityOSC-HoloLens/b0c16ecf7482f3ced8b211dc8c6723683fe1cfed/docs/doxygen/html/ftv2mnode.png -------------------------------------------------------------------------------- /docs/doxygen/html/ftv2node.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/the6th/UnityOSC-HoloLens/b0c16ecf7482f3ced8b211dc8c6723683fe1cfed/docs/doxygen/html/ftv2node.png -------------------------------------------------------------------------------- /docs/doxygen/html/ftv2plastnode.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/the6th/UnityOSC-HoloLens/b0c16ecf7482f3ced8b211dc8c6723683fe1cfed/docs/doxygen/html/ftv2plastnode.png -------------------------------------------------------------------------------- /docs/doxygen/html/ftv2pnode.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/the6th/UnityOSC-HoloLens/b0c16ecf7482f3ced8b211dc8c6723683fe1cfed/docs/doxygen/html/ftv2pnode.png -------------------------------------------------------------------------------- /docs/doxygen/html/ftv2splitbar.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/the6th/UnityOSC-HoloLens/b0c16ecf7482f3ced8b211dc8c6723683fe1cfed/docs/doxygen/html/ftv2splitbar.png -------------------------------------------------------------------------------- /docs/doxygen/html/ftv2vertline.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/the6th/UnityOSC-HoloLens/b0c16ecf7482f3ced8b211dc8c6723683fe1cfed/docs/doxygen/html/ftv2vertline.png -------------------------------------------------------------------------------- /docs/doxygen/html/functions.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | UnityOSC: Class Members 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 16 | 17 | 18 | 19 | 20 | 23 |
24 |
25 | 26 | 27 | 28 | 29 | 33 | 34 | 35 |
30 |
UnityOSC 1.0
31 |
Open Sound Control classes and API for the Unity 3d game engine (http://www.unity3d.com)
32 |
36 |
37 | 61 | 69 | 75 |
76 |
77 | 81 |
83 |
84 |
85 | 88 |
89 |
90 |
Here is a list of all documented class members with links to the class documentation for each member:
150 |
151 |
152 | 159 | 160 |
164 |  All Classes Namespaces Functions
165 | 166 | 167 |
168 | 171 |
172 | 173 | 174 | 175 | 176 | -------------------------------------------------------------------------------- /docs/doxygen/html/functions_func.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | UnityOSC: Class Members - Functions 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 16 | 17 | 18 | 19 | 20 | 23 |
24 |
25 | 26 | 27 | 28 | 29 | 33 | 34 | 35 |
30 |
UnityOSC 1.0
31 |
Open Sound Control classes and API for the Unity 3d game engine (http://www.unity3d.com)
32 |
36 |
37 | 61 | 69 | 75 |
76 |
77 | 81 |
83 |
84 |
85 | 88 |
89 |
90 |   150 |
151 |
152 | 159 | 160 |
164 |  All Classes Namespaces Functions
165 | 166 | 167 |
168 | 171 |
172 | 173 | 174 | 175 | 176 | -------------------------------------------------------------------------------- /docs/doxygen/html/hierarchy.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | UnityOSC: Class Hierarchy 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 16 | 17 | 18 | 19 | 20 | 23 |
24 |
25 | 26 | 27 | 28 | 29 | 33 | 34 | 35 |
30 |
UnityOSC 1.0
31 |
Open Sound Control classes and API for the Unity 3d game engine (http://www.unity3d.com)
32 |
36 |
37 | 61 | 69 |
70 |
71 | 75 |
77 |
78 |
79 | 82 |
83 |
84 |
85 |
Class Hierarchy
86 |
87 |
88 |
This inheritance list is sorted roughly, but not completely, alphabetically:
101 |
102 |
103 | 110 | 111 |
115 |  All Classes Namespaces Functions
116 | 117 | 118 |
119 | 122 |
123 | 124 | 125 | 126 | 127 | -------------------------------------------------------------------------------- /docs/doxygen/html/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | UnityOSC: Main Page 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 16 | 17 | 18 | 19 | 20 | 23 |
24 |
25 | 26 | 27 | 28 | 29 | 33 | 34 | 35 |
30 |
UnityOSC 1.0
31 |
Open Sound Control classes and API for the Unity 3d game engine (http://www.unity3d.com)
32 |
36 |
37 | 61 |
62 |
63 | 67 |
69 |
70 |
71 | 74 |
75 |
76 |
77 |
UnityOSC Documentation
78 |
79 |
80 |
81 |
82 | 89 | 90 |
94 |  All Classes Namespaces Functions
95 | 96 | 97 |
98 | 101 |
102 | 103 | 104 | 105 | 106 | -------------------------------------------------------------------------------- /docs/doxygen/html/namespace_unity_o_s_c.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | UnityOSC: Package UnityOSC 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 16 | 17 | 18 | 19 | 20 | 23 |
24 |
25 | 26 | 27 | 28 | 29 | 33 | 34 | 35 |
30 |
UnityOSC 1.0
31 |
Open Sound Control classes and API for the Unity 3d game engine (http://www.unity3d.com)
32 |
36 |
37 | 61 | 66 |
67 |
68 | 72 |
74 |
75 |
76 | 79 |
80 |
81 |
82 | Classes
83 |
84 |
Package UnityOSC
85 |
86 |
87 | 88 | 90 | 91 | 92 | 93 | 94 | 95 | 96 | 97 | 98 | 99 |

89 | Classes

class  OSCBundle
 Models a Bundle of the OSC protocol. Derived from a OSC Packet over a OSC Stream. More...
class  OSCClient
 Dispatches OSC messages to the specified destination address and port. More...
class  OSCMessage
class  OSCPacket
 Models a OSC Packet over an OSC stream. More...
class  OSCServer
 Receives incoming OSC messages. More...
100 |
101 |
102 | 110 | 111 |
115 |  All Classes Namespaces Functions
116 | 117 | 118 |
119 | 122 |
123 | 124 | 125 | 126 | 127 | -------------------------------------------------------------------------------- /docs/doxygen/html/namespaces.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | UnityOSC: Packages 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 16 | 17 | 18 | 19 | 20 | 23 |
24 |
25 | 26 | 27 | 28 | 29 | 33 | 34 | 35 |
30 |
UnityOSC 1.0
31 |
Open Sound Control classes and API for the Unity 3d game engine (http://www.unity3d.com)
32 |
36 |
37 | 61 | 66 |
67 |
68 | 72 |
74 |
75 |
76 | 79 |
80 |
81 |
82 |
Packages
83 |
84 |
85 |
Here are the packages with brief descriptions (if available):
86 | 87 |
UnityOSC
88 |
89 |
90 | 97 | 98 |
102 |  All Classes Namespaces Functions
103 | 104 | 105 |
106 | 109 |
110 | 111 | 112 | 113 | 114 | -------------------------------------------------------------------------------- /docs/doxygen/html/nav_f.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/the6th/UnityOSC-HoloLens/b0c16ecf7482f3ced8b211dc8c6723683fe1cfed/docs/doxygen/html/nav_f.png -------------------------------------------------------------------------------- /docs/doxygen/html/nav_h.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/the6th/UnityOSC-HoloLens/b0c16ecf7482f3ced8b211dc8c6723683fe1cfed/docs/doxygen/html/nav_h.png -------------------------------------------------------------------------------- /docs/doxygen/html/navtree.css: -------------------------------------------------------------------------------- 1 | #nav-tree .children_ul { 2 | margin:0; 3 | padding:4px; 4 | } 5 | 6 | #nav-tree ul { 7 | list-style:none outside none; 8 | margin:0px; 9 | padding:0px; 10 | } 11 | 12 | #nav-tree li { 13 | white-space:nowrap; 14 | margin:0px; 15 | padding:0px; 16 | } 17 | 18 | #nav-tree .plus { 19 | margin:0px; 20 | } 21 | 22 | #nav-tree .selected { 23 | background-image: url('tab_a.png'); 24 | background-repeat:repeat-x; 25 | color: #fff; 26 | text-shadow: 0px 1px 1px rgba(0, 0, 0, 1.0); 27 | } 28 | 29 | #nav-tree img { 30 | margin:0px; 31 | padding:0px; 32 | border:0px; 33 | vertical-align: middle; 34 | } 35 | 36 | #nav-tree a { 37 | text-decoration:none; 38 | padding:0px; 39 | margin:0px; 40 | outline:none; 41 | } 42 | 43 | #nav-tree .label { 44 | margin:0px; 45 | padding:0px; 46 | } 47 | 48 | #nav-tree .label a { 49 | padding:2px; 50 | } 51 | 52 | #nav-tree .selected a { 53 | text-decoration:none; 54 | padding:2px; 55 | margin:0px; 56 | color:#fff; 57 | } 58 | 59 | #nav-tree .children_ul { 60 | margin:0px; 61 | padding:0px; 62 | } 63 | 64 | #nav-tree .item { 65 | margin:0px; 66 | padding:0px; 67 | } 68 | 69 | #nav-tree { 70 | padding: 0px 0px; 71 | background-color: #FAFAFF; 72 | font-size:14px; 73 | overflow:auto; 74 | } 75 | 76 | #doc-content { 77 | overflow:auto; 78 | display:block; 79 | padding:0px; 80 | margin:0px; 81 | } 82 | 83 | #side-nav { 84 | padding:0 6px 0 0; 85 | margin: 0px; 86 | display:block; 87 | position: absolute; 88 | left: 0px; 89 | width: 300px; 90 | } 91 | 92 | .ui-resizable .ui-resizable-handle { 93 | display:block; 94 | } 95 | 96 | .ui-resizable-e { 97 | background:url("ftv2splitbar.png") repeat scroll right center transparent; 98 | cursor:e-resize; 99 | height:100%; 100 | right:0; 101 | top:0; 102 | width:6px; 103 | } 104 | 105 | .ui-resizable-handle { 106 | display:none; 107 | font-size:0.1px; 108 | position:absolute; 109 | z-index:1; 110 | } 111 | 112 | #nav-tree-contents { 113 | margin: 6px 0px 0px 0px; 114 | } 115 | 116 | #nav-tree { 117 | background-image:url('nav_h.png'); 118 | background-repeat:repeat-x; 119 | background-color: #FAFBFB; 120 | } 121 | 122 | 123 | 124 | -------------------------------------------------------------------------------- /docs/doxygen/html/navtree.js: -------------------------------------------------------------------------------- 1 | var NAVTREE = 2 | [ 3 | [ "UnityOSC", "index.html", [ 4 | [ "Class List", "annotated.html", [ 5 | [ "ClientLog", "struct_client_log.html", null ], 6 | [ "UnityOSC.OSCBundle", "class_unity_o_s_c_1_1_o_s_c_bundle.html", null ], 7 | [ "UnityOSC.OSCClient", "class_unity_o_s_c_1_1_o_s_c_client.html", null ], 8 | [ "OSCHandler", "class_o_s_c_handler.html", null ], 9 | [ "OSCHelper", "class_o_s_c_helper.html", null ], 10 | [ "UnityOSC.OSCMessage", "class_unity_o_s_c_1_1_o_s_c_message.html", null ], 11 | [ "UnityOSC.OSCPacket", "class_unity_o_s_c_1_1_o_s_c_packet.html", null ], 12 | [ "UnityOSC.OSCServer", "class_unity_o_s_c_1_1_o_s_c_server.html", null ], 13 | [ "ServerLog", "struct_server_log.html", null ] 14 | ] ], 15 | [ "Class Index", "classes.html", null ], 16 | [ "Class Hierarchy", "hierarchy.html", [ 17 | [ "ClientLog", "struct_client_log.html", null ], 18 | [ "UnityOSC.OSCClient", "class_unity_o_s_c_1_1_o_s_c_client.html", null ], 19 | [ "OSCHandler", "class_o_s_c_handler.html", null ], 20 | [ "OSCHelper", "class_o_s_c_helper.html", null ], 21 | [ "UnityOSC.OSCPacket", "class_unity_o_s_c_1_1_o_s_c_packet.html", [ 22 | [ "UnityOSC.OSCBundle", "class_unity_o_s_c_1_1_o_s_c_bundle.html", null ], 23 | [ "UnityOSC.OSCMessage", "class_unity_o_s_c_1_1_o_s_c_message.html", null ] 24 | ] ], 25 | [ "UnityOSC.OSCServer", "class_unity_o_s_c_1_1_o_s_c_server.html", null ], 26 | [ "ServerLog", "struct_server_log.html", null ] 27 | ] ], 28 | [ "Class Members", "functions.html", null ], 29 | [ "Packages", "namespaces.html", [ 30 | [ "UnityOSC", "namespace_unity_o_s_c.html", null ] 31 | ] ], 32 | [ "File List", "files.html", [ 33 | [ "/Users/jorgegarciamartin/Desktop/src/OSCHandler.cs", null, null ], 34 | [ "/Users/jorgegarciamartin/Desktop/src/Editor/OSCHelper.cs", null, null ], 35 | [ "/Users/jorgegarciamartin/Desktop/src/UnityOSC/OSCBundle.cs", null, null ], 36 | [ "/Users/jorgegarciamartin/Desktop/src/UnityOSC/OSCClient.cs", null, null ], 37 | [ "/Users/jorgegarciamartin/Desktop/src/UnityOSC/OSCMessage.cs", null, null ], 38 | [ "/Users/jorgegarciamartin/Desktop/src/UnityOSC/OSCPacket.cs", null, null ], 39 | [ "/Users/jorgegarciamartin/Desktop/src/UnityOSC/OSCServer.cs", null, null ] 40 | ] ] 41 | ] ] 42 | ]; 43 | 44 | function createIndent(o,domNode,node,level) 45 | { 46 | if (node.parentNode && node.parentNode.parentNode) 47 | { 48 | createIndent(o,domNode,node.parentNode,level+1); 49 | } 50 | var imgNode = document.createElement("img"); 51 | if (level==0 && node.childrenData) 52 | { 53 | node.plus_img = imgNode; 54 | node.expandToggle = document.createElement("a"); 55 | node.expandToggle.href = "javascript:void(0)"; 56 | node.expandToggle.onclick = function() 57 | { 58 | if (node.expanded) 59 | { 60 | $(node.getChildrenUL()).slideUp("fast"); 61 | if (node.isLast) 62 | { 63 | node.plus_img.src = node.relpath+"ftv2plastnode.png"; 64 | } 65 | else 66 | { 67 | node.plus_img.src = node.relpath+"ftv2pnode.png"; 68 | } 69 | node.expanded = false; 70 | } 71 | else 72 | { 73 | expandNode(o, node, false); 74 | } 75 | } 76 | node.expandToggle.appendChild(imgNode); 77 | domNode.appendChild(node.expandToggle); 78 | } 79 | else 80 | { 81 | domNode.appendChild(imgNode); 82 | } 83 | if (level==0) 84 | { 85 | if (node.isLast) 86 | { 87 | if (node.childrenData) 88 | { 89 | imgNode.src = node.relpath+"ftv2plastnode.png"; 90 | } 91 | else 92 | { 93 | imgNode.src = node.relpath+"ftv2lastnode.png"; 94 | domNode.appendChild(imgNode); 95 | } 96 | } 97 | else 98 | { 99 | if (node.childrenData) 100 | { 101 | imgNode.src = node.relpath+"ftv2pnode.png"; 102 | } 103 | else 104 | { 105 | imgNode.src = node.relpath+"ftv2node.png"; 106 | domNode.appendChild(imgNode); 107 | } 108 | } 109 | } 110 | else 111 | { 112 | if (node.isLast) 113 | { 114 | imgNode.src = node.relpath+"ftv2blank.png"; 115 | } 116 | else 117 | { 118 | imgNode.src = node.relpath+"ftv2vertline.png"; 119 | } 120 | } 121 | imgNode.border = "0"; 122 | } 123 | 124 | function newNode(o, po, text, link, childrenData, lastNode) 125 | { 126 | var node = new Object(); 127 | node.children = Array(); 128 | node.childrenData = childrenData; 129 | node.depth = po.depth + 1; 130 | node.relpath = po.relpath; 131 | node.isLast = lastNode; 132 | 133 | node.li = document.createElement("li"); 134 | po.getChildrenUL().appendChild(node.li); 135 | node.parentNode = po; 136 | 137 | node.itemDiv = document.createElement("div"); 138 | node.itemDiv.className = "item"; 139 | 140 | node.labelSpan = document.createElement("span"); 141 | node.labelSpan.className = "label"; 142 | 143 | createIndent(o,node.itemDiv,node,0); 144 | node.itemDiv.appendChild(node.labelSpan); 145 | node.li.appendChild(node.itemDiv); 146 | 147 | var a = document.createElement("a"); 148 | node.labelSpan.appendChild(a); 149 | node.label = document.createTextNode(text); 150 | a.appendChild(node.label); 151 | if (link) 152 | { 153 | a.href = node.relpath+link; 154 | } 155 | else 156 | { 157 | if (childrenData != null) 158 | { 159 | a.className = "nolink"; 160 | a.href = "javascript:void(0)"; 161 | a.onclick = node.expandToggle.onclick; 162 | node.expanded = false; 163 | } 164 | } 165 | 166 | node.childrenUL = null; 167 | node.getChildrenUL = function() 168 | { 169 | if (!node.childrenUL) 170 | { 171 | node.childrenUL = document.createElement("ul"); 172 | node.childrenUL.className = "children_ul"; 173 | node.childrenUL.style.display = "none"; 174 | node.li.appendChild(node.childrenUL); 175 | } 176 | return node.childrenUL; 177 | }; 178 | 179 | return node; 180 | } 181 | 182 | function showRoot() 183 | { 184 | var headerHeight = $("#top").height(); 185 | var footerHeight = $("#nav-path").height(); 186 | var windowHeight = $(window).height() - headerHeight - footerHeight; 187 | navtree.scrollTo('#selected',0,{offset:-windowHeight/2}); 188 | } 189 | 190 | function expandNode(o, node, imm) 191 | { 192 | if (node.childrenData && !node.expanded) 193 | { 194 | if (!node.childrenVisited) 195 | { 196 | getNode(o, node); 197 | } 198 | if (imm) 199 | { 200 | $(node.getChildrenUL()).show(); 201 | } 202 | else 203 | { 204 | $(node.getChildrenUL()).slideDown("fast",showRoot); 205 | } 206 | if (node.isLast) 207 | { 208 | node.plus_img.src = node.relpath+"ftv2mlastnode.png"; 209 | } 210 | else 211 | { 212 | node.plus_img.src = node.relpath+"ftv2mnode.png"; 213 | } 214 | node.expanded = true; 215 | } 216 | } 217 | 218 | function getNode(o, po) 219 | { 220 | po.childrenVisited = true; 221 | var l = po.childrenData.length-1; 222 | for (var i in po.childrenData) 223 | { 224 | var nodeData = po.childrenData[i]; 225 | po.children[i] = newNode(o, po, nodeData[0], nodeData[1], nodeData[2], 226 | i==l); 227 | } 228 | } 229 | 230 | function findNavTreePage(url, data) 231 | { 232 | var nodes = data; 233 | var result = null; 234 | for (var i in nodes) 235 | { 236 | var d = nodes[i]; 237 | if (d[1] == url) 238 | { 239 | return new Array(i); 240 | } 241 | else if (d[2] != null) // array of children 242 | { 243 | result = findNavTreePage(url, d[2]); 244 | if (result != null) 245 | { 246 | return (new Array(i).concat(result)); 247 | } 248 | } 249 | } 250 | return null; 251 | } 252 | 253 | function initNavTree(toroot,relpath) 254 | { 255 | var o = new Object(); 256 | o.toroot = toroot; 257 | o.node = new Object(); 258 | o.node.li = document.getElementById("nav-tree-contents"); 259 | o.node.childrenData = NAVTREE; 260 | o.node.children = new Array(); 261 | o.node.childrenUL = document.createElement("ul"); 262 | o.node.getChildrenUL = function() { return o.node.childrenUL; }; 263 | o.node.li.appendChild(o.node.childrenUL); 264 | o.node.depth = 0; 265 | o.node.relpath = relpath; 266 | 267 | getNode(o, o.node); 268 | 269 | o.breadcrumbs = findNavTreePage(toroot, NAVTREE); 270 | if (o.breadcrumbs == null) 271 | { 272 | o.breadcrumbs = findNavTreePage("index.html",NAVTREE); 273 | } 274 | if (o.breadcrumbs != null && o.breadcrumbs.length>0) 275 | { 276 | var p = o.node; 277 | for (var i in o.breadcrumbs) 278 | { 279 | var j = o.breadcrumbs[i]; 280 | p = p.children[j]; 281 | expandNode(o,p,true); 282 | } 283 | p.itemDiv.className = p.itemDiv.className + " selected"; 284 | p.itemDiv.id = "selected"; 285 | $(window).load(showRoot); 286 | } 287 | } 288 | 289 | -------------------------------------------------------------------------------- /docs/doxygen/html/open.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/the6th/UnityOSC-HoloLens/b0c16ecf7482f3ced8b211dc8c6723683fe1cfed/docs/doxygen/html/open.png -------------------------------------------------------------------------------- /docs/doxygen/html/resize.js: -------------------------------------------------------------------------------- 1 | var cookie_namespace = 'doxygen'; 2 | var sidenav,navtree,content,header; 3 | 4 | function readCookie(cookie) 5 | { 6 | var myCookie = cookie_namespace+"_"+cookie+"="; 7 | if (document.cookie) 8 | { 9 | var index = document.cookie.indexOf(myCookie); 10 | if (index != -1) 11 | { 12 | var valStart = index + myCookie.length; 13 | var valEnd = document.cookie.indexOf(";", valStart); 14 | if (valEnd == -1) 15 | { 16 | valEnd = document.cookie.length; 17 | } 18 | var val = document.cookie.substring(valStart, valEnd); 19 | return val; 20 | } 21 | } 22 | return 0; 23 | } 24 | 25 | function writeCookie(cookie, val, expiration) 26 | { 27 | if (val==undefined) return; 28 | if (expiration == null) 29 | { 30 | var date = new Date(); 31 | date.setTime(date.getTime()+(10*365*24*60*60*1000)); // default expiration is one week 32 | expiration = date.toGMTString(); 33 | } 34 | document.cookie = cookie_namespace + "_" + cookie + "=" + val + "; expires=" + expiration+"; path=/"; 35 | } 36 | 37 | function resizeWidth() 38 | { 39 | var windowWidth = $(window).width() + "px"; 40 | var sidenavWidth = $(sidenav).width(); 41 | content.css({marginLeft:parseInt(sidenavWidth)+6+"px"}); //account for 6px-wide handle-bar 42 | writeCookie('width',sidenavWidth, null); 43 | } 44 | 45 | function restoreWidth(navWidth) 46 | { 47 | var windowWidth = $(window).width() + "px"; 48 | content.css({marginLeft:parseInt(navWidth)+6+"px"}); 49 | sidenav.css({width:navWidth + "px"}); 50 | } 51 | 52 | function resizeHeight() 53 | { 54 | var headerHeight = header.height(); 55 | var footerHeight = footer.height(); 56 | var windowHeight = $(window).height() - headerHeight - footerHeight; 57 | content.css({height:windowHeight + "px"}); 58 | navtree.css({height:windowHeight + "px"}); 59 | sidenav.css({height:windowHeight + "px",top: headerHeight+"px"}); 60 | } 61 | 62 | function initResizable() 63 | { 64 | header = $("#top"); 65 | sidenav = $("#side-nav"); 66 | content = $("#doc-content"); 67 | navtree = $("#nav-tree"); 68 | footer = $("#nav-path"); 69 | $(".side-nav-resizable").resizable({resize: function(e, ui) { resizeWidth(); } }); 70 | $(window).resize(function() { resizeHeight(); }); 71 | var width = readCookie('width'); 72 | if (width) { restoreWidth(width); } else { resizeWidth(); } 73 | resizeHeight(); 74 | var url = location.href; 75 | var i=url.indexOf("#"); 76 | if (i>=0) window.location.hash=url.substr(i); 77 | var _preventDefault = function(evt) { evt.preventDefault(); }; 78 | $("#splitbar").bind("dragstart", _preventDefault).bind("selectstart", _preventDefault); 79 | } 80 | 81 | 82 | -------------------------------------------------------------------------------- /docs/doxygen/html/struct_client_log-members.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | UnityOSC: Member List 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 16 | 17 | 18 | 19 | 20 | 23 |
24 |
25 | 26 | 27 | 28 | 29 | 33 | 34 | 35 |
30 |
UnityOSC 1.0
31 |
Open Sound Control classes and API for the Unity 3d game engine (http://www.unity3d.com)
32 |
36 |
37 | 61 | 69 |
70 |
71 | 75 |
77 |
78 |
79 | 82 |
83 |
84 |
85 |
ClientLog Member List
86 |
87 |
88 | This is the complete list of members for ClientLog, including all inherited members. 89 | 90 | 91 | 92 |
client (defined in ClientLog)ClientLog
log (defined in ClientLog)ClientLog
messages (defined in ClientLog)ClientLog
93 |
94 | 101 | 102 |
106 |  All Classes Namespaces Functions
107 | 108 | 109 |
110 | 113 |
114 | 115 | 116 | 117 | 118 | -------------------------------------------------------------------------------- /docs/doxygen/html/struct_client_log.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | UnityOSC: ClientLog Struct Reference 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 16 | 17 | 18 | 19 | 20 | 23 |
24 |
25 | 26 | 27 | 28 | 29 | 33 | 34 | 35 |
30 |
UnityOSC 1.0
31 |
Open Sound Control classes and API for the Unity 3d game engine (http://www.unity3d.com)
32 |
36 |
37 | 61 | 69 |
70 |
71 | 75 |
77 |
78 |
79 | 82 |
83 |
84 | 86 |
87 |
ClientLog Struct Reference
88 |
89 |
90 | 91 |

Models a log of a client composed by an OSCClient, a List of OSCMessage and a List of strings that represent the current messages in the log. 92 | More...

93 | 94 |

List of all members.

95 | 96 | 98 | 100 | 102 | 104 |

97 | Public Attributes

99 | OSCClient client
101 | List< OSCMessagemessages
103 | List< string > log
105 |

Detailed Description

106 |

Models a log of a client composed by an OSCClient, a List of OSCMessage and a List of strings that represent the current messages in the log.

107 | 108 |

Definition at line 43 of file OSCHandler.cs.

109 |

The documentation for this struct was generated from the following file: 112 |
113 |
114 | 122 | 123 |
127 |  All Classes Namespaces Functions
128 | 129 | 130 |
131 | 134 |
135 | 136 | 137 | 138 | 139 | -------------------------------------------------------------------------------- /docs/doxygen/html/struct_server_log-members.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | UnityOSC: Member List 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 16 | 17 | 18 | 19 | 20 | 23 |
24 |
25 | 26 | 27 | 28 | 29 | 33 | 34 | 35 |
30 |
UnityOSC 1.0
31 |
Open Sound Control classes and API for the Unity 3d game engine (http://www.unity3d.com)
32 |
36 |
37 | 61 | 69 |
70 |
71 | 75 |
77 |
78 |
79 | 82 |
83 |
84 |
85 |
ServerLog Member List
86 |
87 |
88 | This is the complete list of members for ServerLog, including all inherited members. 89 | 90 | 91 | 92 |
log (defined in ServerLog)ServerLog
packets (defined in ServerLog)ServerLog
server (defined in ServerLog)ServerLog
93 |
94 | 101 | 102 |
106 |  All Classes Namespaces Functions
107 | 108 | 109 |
110 | 113 |
114 | 115 | 116 | 117 | 118 | -------------------------------------------------------------------------------- /docs/doxygen/html/struct_server_log.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | UnityOSC: ServerLog Struct Reference 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 16 | 17 | 18 | 19 | 20 | 23 |
24 |
25 | 26 | 27 | 28 | 29 | 33 | 34 | 35 |
30 |
UnityOSC 1.0
31 |
Open Sound Control classes and API for the Unity 3d game engine (http://www.unity3d.com)
32 |
36 |
37 | 61 | 69 |
70 |
71 | 75 |
77 |
78 |
79 | 82 |
83 |
84 | 86 |
87 |
ServerLog Struct Reference
88 |
89 |
90 | 91 |

Models a log of a server composed by an OSCServer, a List of OSCPacket and a List of strings that represent the current messages in the log. 92 | More...

93 | 94 |

List of all members.

95 | 96 | 98 | 100 | 102 | 104 |

97 | Public Attributes

99 | OSCServer server
101 | List< OSCPacketpackets
103 | List< string > log
105 |

Detailed Description

106 |

Models a log of a server composed by an OSCServer, a List of OSCPacket and a List of strings that represent the current messages in the log.

107 | 108 |

Definition at line 32 of file OSCHandler.cs.

109 |

The documentation for this struct was generated from the following file: 112 |
113 |
114 | 122 | 123 |
127 |  All Classes Namespaces Functions
128 | 129 | 130 |
131 | 134 |
135 | 136 | 137 | 138 | 139 | -------------------------------------------------------------------------------- /docs/doxygen/html/tab_a.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/the6th/UnityOSC-HoloLens/b0c16ecf7482f3ced8b211dc8c6723683fe1cfed/docs/doxygen/html/tab_a.png -------------------------------------------------------------------------------- /docs/doxygen/html/tab_b.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/the6th/UnityOSC-HoloLens/b0c16ecf7482f3ced8b211dc8c6723683fe1cfed/docs/doxygen/html/tab_b.png -------------------------------------------------------------------------------- /docs/doxygen/html/tab_h.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/the6th/UnityOSC-HoloLens/b0c16ecf7482f3ced8b211dc8c6723683fe1cfed/docs/doxygen/html/tab_h.png -------------------------------------------------------------------------------- /docs/doxygen/html/tab_s.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/the6th/UnityOSC-HoloLens/b0c16ecf7482f3ced8b211dc8c6723683fe1cfed/docs/doxygen/html/tab_s.png -------------------------------------------------------------------------------- /docs/doxygen/html/tabs.css: -------------------------------------------------------------------------------- 1 | .tabs, .tabs2, .tabs3 { 2 | background-image: url('tab_b.png'); 3 | width: 100%; 4 | z-index: 101; 5 | font-size: 13px; 6 | } 7 | 8 | .tabs2 { 9 | font-size: 10px; 10 | } 11 | .tabs3 { 12 | font-size: 9px; 13 | } 14 | 15 | .tablist { 16 | margin: 0; 17 | padding: 0; 18 | display: table; 19 | } 20 | 21 | .tablist li { 22 | float: left; 23 | display: table-cell; 24 | background-image: url('tab_b.png'); 25 | line-height: 36px; 26 | list-style: none; 27 | } 28 | 29 | .tablist a { 30 | display: block; 31 | padding: 0 20px; 32 | font-weight: bold; 33 | background-image:url('tab_s.png'); 34 | background-repeat:no-repeat; 35 | background-position:right; 36 | color: #364B4F; 37 | text-shadow: 0px 1px 1px rgba(255, 255, 255, 0.9); 38 | text-decoration: none; 39 | outline: none; 40 | } 41 | 42 | .tabs3 .tablist a { 43 | padding: 0 10px; 44 | } 45 | 46 | .tablist a:hover { 47 | background-image: url('tab_h.png'); 48 | background-repeat:repeat-x; 49 | color: #fff; 50 | text-shadow: 0px 1px 1px rgba(0, 0, 0, 1.0); 51 | text-decoration: none; 52 | } 53 | 54 | .tablist li.current a { 55 | background-image: url('tab_a.png'); 56 | background-repeat:repeat-x; 57 | color: #fff; 58 | text-shadow: 0px 1px 1px rgba(0, 0, 0, 1.0); 59 | } 60 | -------------------------------------------------------------------------------- /src/Editor/OSCHelper.cs: -------------------------------------------------------------------------------- 1 | // 2 | // UnityOSC - Open Sound Control interface for the Unity3d game engine 3 | // 4 | // Copyright (c) 2012 Jorge Garcia Martin 5 | // 6 | // Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated 7 | // documentation files (the "Software"), to deal in the Software without restriction, including without limitation 8 | // the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, 9 | // and to permit persons to whom the Software is furnished to do so, subject to the following conditions: 10 | // 11 | // The above copyright notice and this permission notice shall be included in all copies or substantial portions 12 | // of the Software. 13 | // 14 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED 15 | // TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL 16 | // THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF 17 | // CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS 18 | // IN THE SOFTWARE. 19 | // 20 | 21 | using UnityEngine; 22 | using UnityEditor; 23 | using UnityOSC; 24 | 25 | using System; 26 | using System.Collections.Generic; 27 | 28 | /// 29 | /// Helper to monitor incoming at outgoing OSC messages from the Unity Editor. 30 | /// You should have this script placed at the /Editor folder. 31 | /// Show the panel helper by selecting "Window->OSC Helper" from the Unity menu. 32 | /// 33 | public class OSCHelper : EditorWindow 34 | { 35 | #region Member variables 36 | private string _status = ""; 37 | private string _selected = "none"; 38 | private List _output = new List(); 39 | private int _portselected = 0; 40 | 41 | private Dictionary _clients = new Dictionary(); 42 | private Dictionary _servers = new Dictionary(); 43 | #endregion 44 | 45 | /// 46 | /// Initializes the OSC Helper and creates an entry in the Unity menu. 47 | /// 48 | [MenuItem("Window/OSC Helper")] 49 | static void Init () 50 | { 51 | OSCHelper window = (OSCHelper)EditorWindow.GetWindow (typeof(OSCHelper)); 52 | window.Show(); 53 | } 54 | 55 | /// 56 | /// Executes OnGUI in the panel within the Unity Editor 57 | /// 58 | void OnGUI () 59 | { 60 | if(EditorApplication.isPlaying) 61 | { 62 | _status = ""; 63 | GUILayout.Label(_status, EditorStyles.boldLabel); 64 | GUILayout.Label(String.Concat("SELECTED: ", _selected)); 65 | 66 | _clients = OSCHandler.Instance.Clients;//Get the clients 67 | _servers = OSCHandler.Instance.Servers;//Get the servers 68 | 69 | foreach(KeyValuePair pair in _clients) 70 | { 71 | if(GUILayout.Button(String.Format("Client '{0}' port: {1}", pair.Key, pair.Value.client.Port))) 72 | { 73 | _selected = pair.Key; 74 | _portselected = pair.Value.client.Port; 75 | } 76 | } 77 | 78 | foreach(KeyValuePair pair in _servers) 79 | { 80 | if(GUILayout.Button(String.Format("Server '{0}' port: {1}", pair.Key, pair.Value.server.LocalPort))) 81 | { 82 | _selected = pair.Key; 83 | _portselected = pair.Value.server.LocalPort; 84 | } 85 | } 86 | 87 | GUILayout.TextArea(FromListToString(_output)); 88 | } 89 | else 90 | { 91 | _status = "\n Enter the play mode in the Editor to see \n running clients and servers"; 92 | GUILayout.Label(_status, EditorStyles.boldLabel); 93 | } 94 | } 95 | 96 | /// 97 | /// Updates the logs of the running clients and servers. 98 | /// 99 | void Update() 100 | { 101 | if(EditorApplication.isPlaying) 102 | { 103 | OSCHandler.Instance.UpdateLogs(); 104 | 105 | if(_clients.ContainsKey(_selected) && _clients[_selected].client.Port == _portselected) 106 | { 107 | _output = _clients[_selected].log; 108 | } 109 | else if(_servers.ContainsKey(_selected) && _servers[_selected].server.LocalPort == _portselected) 110 | { 111 | _output = _servers[_selected].log; 112 | } 113 | 114 | Repaint(); 115 | } 116 | } 117 | 118 | /// 119 | /// Formats a collection of strings to a single concatenated string. 120 | /// 121 | /// 122 | /// A 123 | /// 124 | /// 125 | /// A 126 | /// 127 | private string FromListToString(List input) 128 | { 129 | string output = ""; 130 | 131 | foreach(string value in input) 132 | { 133 | output += value; 134 | } 135 | 136 | return output; 137 | } 138 | } -------------------------------------------------------------------------------- /src/OSC/OSCBundle.cs: -------------------------------------------------------------------------------- 1 | // 2 | // UnityOSC - Open Sound Control interface for the Unity3d game engine 3 | // 4 | // Copyright (c) 2012 Jorge Garcia Martin 5 | // 6 | // Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated 7 | // documentation files (the "Software"), to deal in the Software without restriction, including without limitation 8 | // the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, 9 | // and to permit persons to whom the Software is furnished to do so, subject to the following conditions: 10 | // 11 | // The above copyright notice and this permission notice shall be included in all copies or substantial portions 12 | // of the Software. 13 | // 14 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED 15 | // TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL 16 | // THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF 17 | // CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS 18 | // IN THE SOFTWARE. 19 | // 20 | 21 | using System; 22 | using System.Net; 23 | using System.Text; 24 | using System.Collections.Generic; 25 | using System.Diagnostics; 26 | 27 | namespace UnityOSC 28 | { 29 | /// 30 | /// Models a Bundle of the OSC protocol. 31 | /// Derived from a OSC Packet over a OSC Stream. 32 | /// 33 | public sealed class OSCBundle : OSCPacket 34 | { 35 | 36 | #region Constructors 37 | public OSCBundle() 38 | { 39 | _address = BUNDLE; 40 | } 41 | 42 | public OSCBundle(long timestamp) 43 | { 44 | _address = BUNDLE; 45 | _timeStamp = timestamp; 46 | } 47 | #endregion 48 | 49 | #region Member Variables 50 | private const string BUNDLE = "#bundle"; 51 | 52 | #endregion 53 | 54 | #region Properties 55 | #endregion 56 | 57 | #region Methods 58 | 59 | /// 60 | /// Specifies if the packet is an OSC bundle. 61 | /// 62 | override public bool IsBundle() { return true; } 63 | 64 | /// 65 | /// Packs a bundle to be transported over an OSC stream. 66 | /// 67 | override public void Pack() 68 | { 69 | // TODO: Pack bundle with timestamp in NTP format 70 | 71 | throw new NotImplementedException("OSCBundle.Pack() : Not implemented method."); 72 | } 73 | 74 | /// 75 | /// Unpacks an OSC bundle from a data stream. 76 | /// 77 | /// 78 | /// A 79 | /// 80 | /// 81 | /// A 82 | /// 83 | /// 84 | /// A 85 | /// 86 | /// 87 | /// A 88 | /// 89 | public new static OSCBundle Unpack(byte[] data, ref int start, int end) 90 | { 91 | string address = OSCPacket.UnpackValue(data, ref start); 92 | 93 | #if !NETFX_CORE 94 | Trace.Assert(address == BUNDLE); 95 | #endif 96 | 97 | long timeStamp = OSCPacket.UnpackValue(data, ref start); 98 | OSCBundle bundle = new OSCBundle(timeStamp); 99 | 100 | while(start < end) 101 | { 102 | int length = OSCPacket.UnpackValue(data, ref start); 103 | int packetEnd = start + length; 104 | bundle.Append(OSCPacket.Unpack(data, ref start, packetEnd)); 105 | } 106 | 107 | return bundle; 108 | } 109 | 110 | /// 111 | /// Appends an OSC message to a bundle. 112 | /// 113 | /// 114 | /// A 115 | /// 116 | public override void Append (T msgvalue) 117 | { 118 | #if !NETFX_CORE 119 | Trace.Assert(msgvalue is OSCMessage); 120 | #endif 121 | _data.Add(msgvalue); 122 | } 123 | #endregion 124 | } 125 | } 126 | -------------------------------------------------------------------------------- /src/OSC/OSCClient.cs: -------------------------------------------------------------------------------- 1 | // 2 | // UnityOSC - Open Sound Control interface for the Unity3d game engine 3 | // 4 | // Copyright (c) 2012 Jorge Garcia Martin 5 | // 6 | // Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated 7 | // documentation files (the "Software"), to deal in the Software without restriction, including without limitation 8 | // the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, 9 | // and to permit persons to whom the Software is furnished to do so, subject to the following conditions: 10 | // 11 | // The above copyright notice and this permission notice shall be included in all copies or substantial portions 12 | // of the Software. 13 | // 14 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED 15 | // TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL 16 | // THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF 17 | // CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS 18 | // IN THE SOFTWARE. 19 | // 20 | 21 | using System; 22 | using System.Net; 23 | using UnityEngine; 24 | 25 | #if NETFX_CORE 26 | using Windows.Networking; 27 | using Windows.Networking.Sockets; 28 | using Windows.Storage.Streams; 29 | #else 30 | using System.Net.Sockets; 31 | #endif 32 | 33 | 34 | 35 | namespace UnityOSC 36 | { 37 | /// 38 | /// Dispatches OSC messages to the specified destination address and port. 39 | /// 40 | 41 | public class OSCClient 42 | { 43 | #region Constructors 44 | public OSCClient (IPAddress address, int port) 45 | { 46 | _ipAddress = address; 47 | _port = port; 48 | Connect(); 49 | } 50 | #endregion 51 | 52 | #region Member Variables 53 | private IPAddress _ipAddress; 54 | private int _port; 55 | #if NETFX_CORE 56 | DatagramSocket socket; 57 | HostName _hostname; 58 | #else 59 | private UdpClient _udpClient; 60 | #endif 61 | #endregion 62 | 63 | #region Properties 64 | public IPAddress ClientIPAddress 65 | { 66 | get 67 | { 68 | return _ipAddress; 69 | } 70 | } 71 | 72 | public int Port 73 | { 74 | get 75 | { 76 | return _port; 77 | } 78 | } 79 | #endregion 80 | 81 | #region Methods 82 | /// 83 | /// Connects the client to a given remote address and port. 84 | /// 85 | public void Connect() 86 | { 87 | #if NETFX_CORE 88 | Debug.Log("OSCClient Connect start..."); 89 | _hostname = new HostName(_ipAddress.ToString()); 90 | socket = new DatagramSocket(); 91 | 92 | Debug.Log("exit start:"+_ipAddress.ToString()); 93 | #else 94 | if(_udpClient != null) Close(); 95 | _udpClient = new UdpClient(); 96 | try 97 | { 98 | _udpClient.Connect(_ipAddress, _port); 99 | } 100 | catch 101 | { 102 | throw new Exception(String.Format("Can't create client at IP address {0} and port {1}.", _ipAddress,_port)); 103 | } 104 | #endif 105 | } 106 | 107 | /// 108 | /// Closes the client. 109 | /// 110 | public void Close() 111 | { 112 | #if NETFX_CORE 113 | socket.Dispose(); 114 | Debug.Log("OSC CLIENT UWP CLOSE"); 115 | #else 116 | _udpClient.Close(); 117 | _udpClient = null; 118 | #endif 119 | } 120 | 121 | /// 122 | /// Sends an OSC packet to the defined destination and address of the client. 123 | /// 124 | /// 125 | /// A 126 | /// 127 | #if NETFX_CORE 128 | public async void Send(OSCPacket packet) 129 | { 130 | byte[] data = packet.BinaryData; 131 | //Debug.Log("OSCCLIENT-SEND:" + System.Text.Encoding.ASCII.GetString(data)); 132 | 133 | using (var writer = new DataWriter(await socket.GetOutputStreamAsync(_hostname, _port.ToString()))){ 134 | try 135 | { 136 | writer.WriteBytes(data); 137 | await writer.StoreAsync(); 138 | 139 | } 140 | catch 141 | { 142 | throw new Exception(String.Format("Can't send OSC packet to client {0} : {1}:Length{2}", _ipAddress, _port,data.Length)); 143 | } 144 | 145 | 146 | } 147 | 148 | } 149 | #else 150 | public void Send(OSCPacket packet) 151 | { 152 | byte[] data = packet.BinaryData; 153 | try 154 | { 155 | _udpClient.Send(data, data.Length); 156 | } 157 | catch 158 | { 159 | throw new Exception(String.Format("Can't send OSC packet to client {0} : {1}", _ipAddress, _port)); 160 | } 161 | } 162 | #endif 163 | #endregion 164 | } 165 | } 166 | 167 | -------------------------------------------------------------------------------- /src/OSC/OSCMessage.cs: -------------------------------------------------------------------------------- 1 | // 2 | // UnityOSC - Open Sound Control interface for the Unity3d game engine 3 | // 4 | // Copyright (c) 2012 Jorge Garcia Martin 5 | // 6 | // Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated 7 | // documentation files (the "Software"), to deal in the Software without restriction, including without limitation 8 | // the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, 9 | // and to permit persons to whom the Software is furnished to do so, subject to the following conditions: 10 | // 11 | // The above copyright notice and this permission notice shall be included in all copies or substantial portions 12 | // of the Software. 13 | // 14 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED 15 | // TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL 16 | // THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF 17 | // CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS 18 | // IN THE SOFTWARE. 19 | // 20 | 21 | using System; 22 | using System.Collections.Generic; 23 | using System.Net; 24 | using System.Text; 25 | 26 | namespace UnityOSC 27 | { 28 | public sealed class OSCMessage : OSCPacket 29 | { 30 | #region Constructors 31 | public OSCMessage (string address) 32 | { 33 | _typeTag = DEFAULT.ToString(); 34 | this.Address = address; 35 | } 36 | 37 | public OSCMessage (string address, object msgvalue) 38 | { 39 | _typeTag = DEFAULT.ToString(); 40 | this.Address = address; 41 | Append(msgvalue); 42 | } 43 | #endregion 44 | 45 | #region Member Variables 46 | private const char INTEGER = 'i'; 47 | private const char FLOAT = 'f'; 48 | private const char LONG = 'h'; 49 | private const char DOUBLE = 'd'; 50 | private const char STRING = 's'; 51 | private const char BYTE = 'b'; 52 | private const char DEFAULT = ','; 53 | 54 | private string _typeTag; 55 | 56 | #endregion 57 | 58 | #region Properties 59 | #endregion 60 | 61 | #region Methods 62 | 63 | /// 64 | /// Specifies if the message is an OSC bundle. 65 | /// 66 | /// 67 | /// A 68 | /// 69 | override public bool IsBundle() { return false; } 70 | 71 | /// 72 | /// Packs the OSC message to binary data. 73 | /// 74 | override public void Pack() 75 | { 76 | List data = new List(); 77 | 78 | data.AddRange(OSCPacket.PackValue(_address)); 79 | OSCPacket.PadNull(data); 80 | 81 | data.AddRange(OSCPacket.PackValue(_typeTag)); 82 | OSCPacket.PadNull(data); 83 | 84 | foreach (object value in _data) 85 | { 86 | data.AddRange(OSCPacket.PackValue(value)); 87 | if (value is string || value is byte[]) 88 | { 89 | OSCPacket.PadNull(data); 90 | } 91 | } 92 | 93 | this._binaryData = data.ToArray(); 94 | } 95 | 96 | /// 97 | /// Unpacks an OSC message. 98 | /// 99 | /// 100 | /// A 101 | /// 102 | /// 103 | /// A 104 | /// 105 | /// 106 | /// A 107 | /// 108 | public new static OSCMessage Unpack(byte[] data, ref int start) 109 | { 110 | string address = OSCPacket.UnpackValue(data, ref start); 111 | OSCMessage message = new OSCMessage(address); 112 | 113 | char[] tags = OSCPacket.UnpackValue(data, ref start).ToCharArray(); 114 | foreach (char tag in tags) 115 | { 116 | object value; 117 | switch (tag) 118 | { 119 | case DEFAULT: 120 | continue; 121 | 122 | case INTEGER: 123 | value = OSCPacket.UnpackValue(data, ref start); 124 | break; 125 | 126 | case LONG: 127 | value = OSCPacket.UnpackValue(data, ref start); 128 | break; 129 | 130 | case FLOAT: 131 | value = OSCPacket.UnpackValue(data, ref start); 132 | break; 133 | 134 | case DOUBLE: 135 | value = OSCPacket.UnpackValue(data, ref start); 136 | break; 137 | 138 | case STRING: 139 | value = OSCPacket.UnpackValue(data, ref start); 140 | break; 141 | 142 | case BYTE: 143 | value = OSCPacket.UnpackValue(data, ref start); 144 | break; 145 | 146 | default: 147 | #if !NETFX_CORE 148 | Console.WriteLine("Unknown tag: " + tag); 149 | #endif 150 | continue; 151 | } 152 | 153 | message.Append(value); 154 | } 155 | 156 | if(message.TimeStamp == 0) 157 | { 158 | message.TimeStamp = DateTime.Now.Ticks; 159 | } 160 | 161 | return message; 162 | } 163 | 164 | /// 165 | /// Appends a value to an OSC message. 166 | /// 167 | /// 168 | /// A 169 | /// 170 | //@see https://github.com/jorgegarcia/UnityOSC/issues/8 171 | //changed by littlewing 172 | //addaptive for iOS 173 | 174 | public override void Append(T value) 175 | { 176 | char typeTag = DEFAULT; 177 | 178 | if (value is int) 179 | { 180 | typeTag = INTEGER; 181 | } 182 | else if (value is long) 183 | { 184 | typeTag = LONG; 185 | } 186 | else if (value is float) 187 | { 188 | typeTag = FLOAT; 189 | } 190 | else if (value is double) 191 | { 192 | typeTag = DOUBLE; 193 | } 194 | else if (value is string) 195 | { 196 | typeTag = STRING; 197 | } 198 | else if (value is byte[]) 199 | { 200 | typeTag = BYTE; 201 | } 202 | else 203 | { 204 | throw new Exception("Unsupported data type."); 205 | } 206 | 207 | _typeTag += typeTag; 208 | _data.Add(value); 209 | 210 | 211 | 212 | } 213 | #endregion 214 | } 215 | } -------------------------------------------------------------------------------- /src/OSC/OSCPacket.cs: -------------------------------------------------------------------------------- 1 | // 2 | // UnityOSC - Open Sound Control interface for the Unity3d game engine 3 | // 4 | // Copyright (c) 2012 Jorge Garcia Martin 5 | // 6 | // Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated 7 | // documentation files (the "Software"), to deal in the Software without restriction, including without limitation 8 | // the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, 9 | // and to permit persons to whom the Software is furnished to do so, subject to the following conditions: 10 | // 11 | // The above copyright notice and this permission notice shall be included in all copies or substantial portions 12 | // of the Software. 13 | // 14 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED 15 | // TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL 16 | // THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF 17 | // CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS 18 | // IN THE SOFTWARE. 19 | // 20 | 21 | using System; 22 | using System.Diagnostics; 23 | using System.Collections.Generic; 24 | using System.Text; 25 | 26 | namespace UnityOSC 27 | { 28 | /// 29 | /// Models a OSC Packet over an OSC stream. 30 | /// 31 | abstract public class OSCPacket 32 | { 33 | #region Member Variables 34 | protected List _data; 35 | protected byte[] _binaryData; 36 | protected string _address; 37 | protected long _timeStamp; 38 | #endregion 39 | 40 | #region Properties 41 | public string Address 42 | { 43 | get 44 | { 45 | return _address; 46 | } 47 | set 48 | { 49 | #if !NETFX_CORE 50 | Trace.Assert(string.IsNullOrEmpty(_address) == false); 51 | #endif 52 | _address = value; 53 | } 54 | } 55 | 56 | public List Data 57 | { 58 | get 59 | { 60 | return _data; 61 | } 62 | } 63 | 64 | public byte[] BinaryData 65 | { 66 | get 67 | { 68 | Pack(); 69 | return _binaryData; 70 | } 71 | } 72 | 73 | public long TimeStamp 74 | { 75 | get 76 | { 77 | return _timeStamp; 78 | } 79 | set 80 | { 81 | _timeStamp = value; 82 | } 83 | } 84 | #endregion 85 | 86 | #region Methods 87 | abstract public bool IsBundle(); 88 | abstract public void Pack(); 89 | abstract public void Append(T msgvalue); 90 | 91 | /// 92 | /// OSC Packet initialization. 93 | /// 94 | public OSCPacket () 95 | { 96 | this._data = new List(); 97 | } 98 | 99 | /// 100 | /// Swap endianess given a data set. 101 | /// 102 | /// 103 | /// A 104 | /// 105 | /// 106 | /// A 107 | /// 108 | protected static byte[] SwapEndian(byte[] data) 109 | { 110 | byte[] swapped = new byte[data.Length]; 111 | for(int i = data.Length - 1, j = 0 ; i >= 0 ; i--, j++) 112 | { 113 | swapped[j] = data[i]; 114 | } 115 | return swapped; 116 | } 117 | 118 | /// 119 | /// Packs a value in a byte stream. Accepted types: Int32, Int64, Single, Double, String and Byte[]. 120 | /// 121 | /// 122 | /// A 123 | /// 124 | /// 125 | /// A 126 | /// 127 | //@see https://github.com/jorgegarcia/UnityOSC/issues/8 128 | //changed by littlewing 129 | //addaptive for iOS 130 | protected static byte[] PackValue(T value) 131 | { 132 | object valueObject = value; 133 | byte[] data = null; 134 | 135 | if (value is int) 136 | { 137 | data = BitConverter.GetBytes((int)valueObject); 138 | if (BitConverter.IsLittleEndian) data = SwapEndian(data); 139 | } 140 | else if (value is long) 141 | { 142 | data = BitConverter.GetBytes((long)valueObject); 143 | if (BitConverter.IsLittleEndian) data = SwapEndian(data); 144 | } 145 | else if (value is float) 146 | { 147 | data = BitConverter.GetBytes((float)valueObject); 148 | if (BitConverter.IsLittleEndian) data = SwapEndian(data); 149 | } 150 | else if (value is double) 151 | { 152 | data = BitConverter.GetBytes((double)valueObject); 153 | if (BitConverter.IsLittleEndian) data = SwapEndian(data); 154 | } 155 | else if (value is string) 156 | { 157 | data = Encoding.ASCII.GetBytes((string)valueObject); 158 | } 159 | else if (value is byte[]) 160 | { 161 | byte[] valueData = ((byte[])valueObject); 162 | List bytes = new List(); 163 | bytes.AddRange(PackValue(valueData.Length)); 164 | bytes.AddRange(valueData); 165 | data = bytes.ToArray(); 166 | } 167 | else 168 | { 169 | throw new Exception("Unsupported data type."); 170 | } 171 | return data; 172 | } 173 | 174 | /// 175 | /// Unpacks a value from a byte stream. Accepted types: Int32, Int64, Single, Double, String and Byte[]. 176 | /// 177 | /// 178 | /// A 179 | /// 180 | /// 181 | /// A 182 | /// 183 | /// 184 | /// A 185 | /// 186 | protected static T UnpackValue(byte[] data, ref int start) 187 | { 188 | object msgvalue; //msgvalue is casted and returned by the function 189 | Type type = typeof(T); 190 | byte[] buffername; 191 | 192 | if (type.Name == "String") 193 | { 194 | int count = 0; 195 | for (int index = start; data[index] != 0; index++) count++; 196 | 197 | msgvalue = Encoding.ASCII.GetString(data, start, count); 198 | start += count + 1; 199 | start = ((start + 3) / 4) * 4; 200 | } 201 | else if (type.Name == "Byte[]") 202 | { 203 | int length = UnpackValue(data, ref start); 204 | byte[] buffer = new byte[length]; 205 | Array.Copy(data, start, buffer, 0, buffer.Length); 206 | start += buffer.Length; 207 | start = ((start + 3) / 4) * 4; 208 | 209 | msgvalue = buffer; 210 | } 211 | else 212 | { 213 | switch (type.Name) 214 | { 215 | case "Int32": 216 | case "Single"://this also serves for float numbers 217 | buffername = new byte[4]; 218 | break; 219 | 220 | case "Int64": 221 | case "Double": 222 | buffername = new byte[8]; 223 | break; 224 | 225 | default: 226 | throw new Exception("Unsupported data type."); 227 | } 228 | 229 | Array.Copy(data, start, buffername, 0, buffername.Length); 230 | start += buffername.Length; 231 | 232 | if (BitConverter.IsLittleEndian) 233 | { 234 | buffername = SwapEndian(buffername); 235 | } 236 | 237 | switch (type.Name) 238 | { 239 | case "Int32": 240 | msgvalue = BitConverter.ToInt32(buffername, 0); 241 | break; 242 | 243 | case "Int64": 244 | msgvalue = BitConverter.ToInt64(buffername, 0); 245 | break; 246 | 247 | case "Single": 248 | msgvalue = BitConverter.ToSingle(buffername, 0); 249 | break; 250 | 251 | case "Double": 252 | msgvalue = BitConverter.ToDouble(buffername, 0); 253 | break; 254 | 255 | default: 256 | throw new Exception("Unsupported data type."); 257 | } 258 | } 259 | 260 | return (T)msgvalue; 261 | } 262 | 263 | /// 264 | /// Unpacks an array of binary data. 265 | /// 266 | /// 267 | /// A 268 | /// 269 | /// 270 | /// A 271 | /// 272 | public static OSCPacket Unpack(byte[] data) 273 | { 274 | int start = 0; 275 | return Unpack(data, ref start, data.Length); 276 | } 277 | 278 | /// 279 | /// Unpacks an array of binary data given reference start and end pointers. 280 | /// 281 | /// 282 | /// A 283 | /// 284 | /// 285 | /// A 286 | /// 287 | /// 288 | /// A 289 | /// 290 | /// 291 | /// A 292 | /// 293 | public static OSCPacket Unpack(byte[] data, ref int start, int end) 294 | { 295 | if (data[start] == '#') 296 | { 297 | return OSCBundle.Unpack(data, ref start, end); 298 | } 299 | 300 | else return OSCMessage.Unpack(data, ref start); 301 | } 302 | 303 | /// 304 | /// Pads null a list of bytes. 305 | /// 306 | /// 307 | /// A 308 | /// 309 | protected static void PadNull(List data) 310 | { 311 | byte nullvalue = 0; 312 | int pad = 4 - (data.Count % 4); 313 | for(int i = 0; i < pad; i++) 314 | data.Add(nullvalue); 315 | } 316 | 317 | #endregion 318 | } 319 | } 320 | -------------------------------------------------------------------------------- /src/OSC/OSCServer.cs: -------------------------------------------------------------------------------- 1 | // 2 | // UnityOSC - Open Sound Control interface for the Unity3d game engine 3 | // 4 | // Copyright (c) 2012 Jorge Garcia Martin 5 | // 6 | // Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated 7 | // documentation files (the "Software"), to deal in the Software without restriction, including without limitation 8 | // the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, 9 | // and to permit persons to whom the Software is furnished to do so, subject to the following conditions: 10 | // 11 | // The above copyright notice and this permission notice shall be included in all copies or substantial portions 12 | // of the Software. 13 | // 14 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED 15 | // TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL 16 | // THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF 17 | // CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS 18 | // IN THE SOFTWARE. 19 | // 20 | 21 | using UnityEngine; 22 | using System; 23 | using System.IO; 24 | using System.Net; 25 | using System.Collections.Generic; 26 | 27 | #if NETFX_CORE 28 | using Windows.Networking.Sockets; 29 | #else 30 | using System.Net.Sockets; 31 | using System.Threading; 32 | #endif 33 | 34 | 35 | 36 | namespace UnityOSC 37 | { 38 | public delegate void PacketReceivedEventHandler(OSCServer sender, OSCPacket packet); 39 | 40 | /// 41 | /// Receives incoming OSC messages 42 | /// 43 | public class OSCServer 44 | { 45 | #region Delegates 46 | public event PacketReceivedEventHandler PacketReceivedEvent; 47 | #endregion 48 | 49 | #region Constructors 50 | public OSCServer (int localPort) 51 | { 52 | PacketReceivedEvent += delegate(OSCServer s, OSCPacket p) { }; 53 | 54 | _localPort = localPort; 55 | Connect(); 56 | } 57 | #endregion 58 | 59 | #region Member Variables 60 | 61 | #if NETFX_CORE 62 | DatagramSocket socket; 63 | private OSCPacket _lastReceivedPacket; 64 | #else 65 | private UdpClient _udpClient; 66 | private Thread _receiverThread; 67 | private OSCPacket _lastReceivedPacket; 68 | #endif 69 | private int _localPort; 70 | private int _sleepMilliseconds = 10; 71 | #endregion 72 | 73 | #region Properties 74 | #if NETFX_CORE 75 | private async void Socket_MessageReceived(Windows.Networking.Sockets.DatagramSocket sender, 76 | Windows.Networking.Sockets.DatagramSocketMessageReceivedEventArgs args) 77 | { 78 | 79 | 80 | // lock multi event 81 | socket.MessageReceived -= Socket_MessageReceived; 82 | 83 | //Debug.Log("OSCSERVER UWP Socket_MessageReceived"); 84 | 85 | //Read the message that was received from the UDP echo client. 86 | Stream streamIn = args.GetDataStream().AsStreamForRead(); 87 | 88 | StreamReader reader = new StreamReader(streamIn); 89 | byte[] bytes = reader.CurrentEncoding.GetBytes(reader.ReadToEnd()); 90 | 91 | streamIn.Dispose(); 92 | reader.Dispose(); 93 | 94 | OSCPacket packet = OSCPacket.Unpack(bytes); 95 | _lastReceivedPacket = packet; 96 | 97 | PacketReceivedEvent(this, _lastReceivedPacket); 98 | 99 | // unlock multi event 100 | socket.MessageReceived += Socket_MessageReceived; 101 | } 102 | 103 | #else 104 | public UdpClient UDPClient 105 | { 106 | get 107 | { 108 | return _udpClient; 109 | } 110 | set 111 | { 112 | _udpClient = value; 113 | } 114 | } 115 | #endif 116 | 117 | public int LocalPort 118 | { 119 | get 120 | { 121 | return _localPort; 122 | } 123 | set 124 | { 125 | _localPort = value; 126 | } 127 | } 128 | 129 | public OSCPacket LastReceivedPacket 130 | { 131 | get 132 | { 133 | return _lastReceivedPacket; 134 | } 135 | } 136 | 137 | /// 138 | /// "Osc Receive Loop" sleep duration per message. 139 | /// 140 | /// The sleep milliseconds. 141 | public int SleepMilliseconds 142 | { 143 | get 144 | { 145 | return _sleepMilliseconds; 146 | } 147 | set 148 | { 149 | _sleepMilliseconds = value; 150 | } 151 | } 152 | #endregion 153 | 154 | #region Methods 155 | 156 | /// 157 | /// Opens the server at the given port and starts the listener thread. 158 | /// 159 | /// 160 | #if NETFX_CORE 161 | public async void Connect() 162 | { 163 | Debug.Log("Waiting for a connection..."); 164 | socket = new DatagramSocket(); 165 | socket.MessageReceived += Socket_MessageReceived; 166 | 167 | try 168 | { 169 | await socket.BindEndpointAsync(null, _localPort.ToString()); 170 | 171 | } 172 | catch (Exception e) 173 | { 174 | Debug.Log(e.ToString()); 175 | Debug.Log(SocketError.GetStatus(e.HResult).ToString()); 176 | return; 177 | } 178 | 179 | } 180 | #else 181 | public void Connect() 182 | { 183 | if(this._udpClient != null) Close(); 184 | try 185 | { 186 | _udpClient = new UdpClient(_localPort); 187 | _receiverThread = new Thread(new ThreadStart(this.ReceivePool)); 188 | _receiverThread.Start(); 189 | } 190 | catch(Exception e) 191 | { 192 | throw e; 193 | } 194 | } 195 | #endif 196 | 197 | 198 | /// 199 | /// Closes the server and terminates its listener thread. 200 | /// 201 | public void Close() 202 | { 203 | #if NETFX_CORE 204 | socket.Dispose(); 205 | #else 206 | if(_receiverThread !=null) _receiverThread.Abort(); 207 | _receiverThread = null; 208 | _udpClient.Close(); 209 | _udpClient = null; 210 | #endif 211 | } 212 | 213 | #if !NETFX_CORE 214 | /// 215 | /// Receives and unpacks an OSC packet. 216 | /// A 217 | /// 218 | private void Receive() 219 | { 220 | IPEndPoint ip = null; 221 | 222 | try 223 | { 224 | byte[] bytes = _udpClient.Receive(ref ip); 225 | 226 | if(bytes != null && bytes.Length > 0) 227 | { 228 | OSCPacket packet = OSCPacket.Unpack(bytes); 229 | 230 | _lastReceivedPacket = packet; 231 | 232 | PacketReceivedEvent(this, _lastReceivedPacket); 233 | } 234 | } 235 | catch{ 236 | throw new Exception(String.Format("Can't create server at port {0}", _localPort)); 237 | } 238 | } 239 | 240 | /// 241 | /// Thread pool that receives upcoming messages. 242 | /// 243 | private void ReceivePool() 244 | { 245 | while( true ) 246 | { 247 | Receive(); 248 | 249 | Thread.Sleep(_sleepMilliseconds); 250 | } 251 | } 252 | #endif 253 | #endregion 254 | } 255 | } 256 | 257 | -------------------------------------------------------------------------------- /tests/touchosc_integration/Assets/TestScene.unity.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 070ed2da704e60641a92addb94b9d252 3 | timeCreated: 1439862359 4 | licenseType: Free 5 | DefaultImporter: 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /tests/touchosc_integration/Assets/WSATestCertificate.pfx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/the6th/UnityOSC-HoloLens/b0c16ecf7482f3ced8b211dc8c6723683fe1cfed/tests/touchosc_integration/Assets/WSATestCertificate.pfx -------------------------------------------------------------------------------- /tests/touchosc_integration/Assets/WSATestCertificate.pfx.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 61749355481748845b88f072c3f5d75d 3 | timeCreated: 1489212721 4 | licenseType: Free 5 | DefaultImporter: 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /tests/touchosc_integration/Assets/oscControl.cs: -------------------------------------------------------------------------------- 1 | // 2 | // UnityOSC - Example of usage for OSC receiver 3 | // 4 | // Copyright (c) 2012 Jorge Garcia Martin 5 | // 6 | // Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated 7 | // documentation files (the "Software"), to deal in the Software without restriction, including without limitation 8 | // the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, 9 | // and to permit persons to whom the Software is furnished to do so, subject to the following conditions: 10 | // 11 | // The above copyright notice and this permission notice shall be included in all copies or substantial portions 12 | // of the Software. 13 | // 14 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED 15 | // TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL 16 | // THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF 17 | // CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS 18 | // IN THE SOFTWARE. 19 | // 20 | 21 | using UnityEngine; 22 | using System; 23 | using System.Collections; 24 | using System.Collections.Generic; 25 | using System.Text; 26 | using UnityOSC; 27 | 28 | public class oscControl : MonoBehaviour { 29 | 30 | public string TargetAddr; 31 | public int OutGoingPort; 32 | public int InComingPort; 33 | 34 | 35 | private Dictionary servers; 36 | private Dictionary clients; 37 | private float randVal=0f; 38 | public GameObject cube; 39 | private String msg=""; 40 | 41 | 42 | // Script initialization 43 | void Start() { 44 | //OSCHandler.Instance.Init(); //init OSC 45 | OSCHandler.Instance.Init("TouchOSC Bridge", TargetAddr, OutGoingPort,InComingPort); 46 | servers = new Dictionary(); 47 | clients = new Dictionary (); 48 | cube = GameObject.Find ("Cube"); 49 | } 50 | 51 | // NOTE: The received messages at each server are updated here 52 | // Hence, this update depends on your application architecture 53 | // How many frames per second or Update() calls per frame? 54 | void Update() { 55 | 56 | OSCHandler.Instance.UpdateLogs(); 57 | 58 | msg="0.1544944"; 59 | byte[] val = new byte[]{176,8,0}; 60 | 61 | servers = OSCHandler.Instance.Servers; 62 | clients = OSCHandler.Instance.Clients; 63 | if (UnityEngine.Random.value < 0.01f) { 64 | randVal = UnityEngine.Random.Range (0f, 0.7f); 65 | OSCHandler.Instance.SendMessageToClient ("TouchOSC Bridge", "/1/fader1", randVal); 66 | OSCHandler.Instance.SendMessageToClient ("TouchOSC Bridge", "/1/fader2", randVal); 67 | OSCHandler.Instance.SendMessageToClient ("TouchOSC Bridge", "/1/fader3", randVal); 68 | OSCHandler.Instance.SendMessageToClient ("TouchOSC Bridge", "/1/fader4", randVal); 69 | } 70 | OSCHandler.Instance.UpdateLogs(); 71 | 72 | foreach (KeyValuePair item in servers) { 73 | // If we have received at least one packet, 74 | // show the last received from the log in the Debug console 75 | if (item.Value.log.Count > 0) { 76 | int lastPacketIndex = item.Value.packets.Count - 1; 77 | 78 | UnityEngine.Debug.Log(String.Format("RECIVE: {0} ADDRESS: {1} VALUE : {2}", 79 | item.Key, // Server name 80 | item.Value.packets[lastPacketIndex].Address, // OSC address 81 | (item.Value.packets[lastPacketIndex].Data.Count > 0 ? item.Value.packets[lastPacketIndex].Data[0].ToString() : "null") 82 | ) 83 | ); //First data value 84 | 85 | //converts the values into MIDI to scale the cube 86 | 87 | if (item.Value.packets[lastPacketIndex].Data.Count > 1) 88 | { 89 | 90 | try 91 | { 92 | float tempVal = float.Parse(item.Value.packets[lastPacketIndex].Data[0].ToString()); 93 | cube.transform.localScale = new Vector3(tempVal, tempVal, tempVal); 94 | } 95 | catch 96 | { 97 | Debug.Log("value of " + item.Value.packets[lastPacketIndex].Address + " is not float value"); 98 | } 99 | 100 | } 101 | 102 | } 103 | } 104 | 105 | 106 | foreach( KeyValuePair item in clients ) 107 | { 108 | // If we have sent at least one message, 109 | // show the last sent message from the log in the Debug console 110 | if(item.Value.log.Count > 0) 111 | { 112 | int lastMessageIndex = item.Value.messages.Count- 1; 113 | 114 | UnityEngine.Debug.Log(String.Format("SEND: {0} ADDRESS: {1} VALUE 0: {2}", 115 | item.Key, // Server name 116 | item.Value.messages[lastMessageIndex].Address, // OSC address 117 | item.Value.messages[lastMessageIndex].Data[0].ToString())); //First data value 118 | 119 | } 120 | 121 | } 122 | } 123 | } -------------------------------------------------------------------------------- /tests/touchosc_integration/Assets/oscControl.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 4868cdbbe832cec469001ea5e37cbda0 3 | timeCreated: 1439862047 4 | licenseType: Free 5 | MonoImporter: 6 | serializedVersion: 2 7 | defaultReferences: [] 8 | executionOrder: 0 9 | icon: {instanceID: 0} 10 | userData: 11 | assetBundleName: 12 | assetBundleVariant: 13 | -------------------------------------------------------------------------------- /tests/touchosc_integration/ProjectSettings/AudioManager.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!11 &1 4 | AudioManager: 5 | m_ObjectHideFlags: 0 6 | m_Volume: 1 7 | Rolloff Scale: 1 8 | Doppler Factor: 1 9 | Default Speaker Mode: 2 10 | m_SampleRate: 0 11 | m_DSPBufferSize: 0 12 | m_VirtualVoiceCount: 512 13 | m_RealVoiceCount: 32 14 | m_DisableAudio: 0 15 | -------------------------------------------------------------------------------- /tests/touchosc_integration/ProjectSettings/ClusterInputManager.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!236 &1 4 | ClusterInputManager: 5 | m_ObjectHideFlags: 0 6 | m_Inputs: [] 7 | -------------------------------------------------------------------------------- /tests/touchosc_integration/ProjectSettings/DynamicsManager.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!55 &1 4 | PhysicsManager: 5 | m_ObjectHideFlags: 0 6 | m_Gravity: {x: 0, y: -9.81000042, z: 0} 7 | m_DefaultMaterial: {fileID: 0} 8 | m_BounceThreshold: 2 9 | m_SleepThreshold: .00499999989 10 | m_DefaultContactOffset: .00999999978 11 | m_SolverIterationCount: 6 12 | m_RaycastsHitTriggers: 1 13 | m_EnableAdaptiveForce: 0 14 | m_LayerCollisionMatrix: ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff 15 | -------------------------------------------------------------------------------- /tests/touchosc_integration/ProjectSettings/EditorBuildSettings.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!1045 &1 4 | EditorBuildSettings: 5 | m_ObjectHideFlags: 0 6 | serializedVersion: 2 7 | m_Scenes: 8 | - enabled: 1 9 | path: Assets/TestScene.unity 10 | -------------------------------------------------------------------------------- /tests/touchosc_integration/ProjectSettings/EditorSettings.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!159 &1 4 | EditorSettings: 5 | m_ObjectHideFlags: 0 6 | serializedVersion: 3 7 | m_ExternalVersionControlSupport: Visible Meta Files 8 | m_SerializationMode: 2 9 | m_WebSecurityEmulationEnabled: 0 10 | m_WebSecurityEmulationHostUrl: http://www.mydomain.com/mygame.unity3d 11 | m_DefaultBehaviorMode: 0 12 | m_SpritePackerMode: 2 13 | m_SpritePackerPaddingPower: 1 14 | -------------------------------------------------------------------------------- /tests/touchosc_integration/ProjectSettings/GraphicsSettings.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!30 &1 4 | GraphicsSettings: 5 | m_ObjectHideFlags: 0 6 | serializedVersion: 9 7 | m_Deferred: 8 | m_Mode: 1 9 | m_Shader: {fileID: 69, guid: 0000000000000000f000000000000000, type: 0} 10 | m_DeferredReflections: 11 | m_Mode: 1 12 | m_Shader: {fileID: 74, guid: 0000000000000000f000000000000000, type: 0} 13 | m_ScreenSpaceShadows: 14 | m_Mode: 1 15 | m_Shader: {fileID: 64, guid: 0000000000000000f000000000000000, type: 0} 16 | m_LegacyDeferred: 17 | m_Mode: 1 18 | m_Shader: {fileID: 63, guid: 0000000000000000f000000000000000, type: 0} 19 | m_DepthNormals: 20 | m_Mode: 1 21 | m_Shader: {fileID: 62, guid: 0000000000000000f000000000000000, type: 0} 22 | m_MotionVectors: 23 | m_Mode: 1 24 | m_Shader: {fileID: 75, guid: 0000000000000000f000000000000000, type: 0} 25 | m_LightHalo: 26 | m_Mode: 1 27 | m_Shader: {fileID: 105, guid: 0000000000000000f000000000000000, type: 0} 28 | m_LensFlare: 29 | m_Mode: 1 30 | m_Shader: {fileID: 102, guid: 0000000000000000f000000000000000, type: 0} 31 | m_AlwaysIncludedShaders: 32 | - {fileID: 7, guid: 0000000000000000f000000000000000, type: 0} 33 | - {fileID: 15104, guid: 0000000000000000f000000000000000, type: 0} 34 | - {fileID: 15105, guid: 0000000000000000f000000000000000, type: 0} 35 | - {fileID: 15106, guid: 0000000000000000f000000000000000, type: 0} 36 | - {fileID: 10770, guid: 0000000000000000f000000000000000, type: 0} 37 | - {fileID: 10782, guid: 0000000000000000f000000000000000, type: 0} 38 | m_PreloadedShaders: [] 39 | m_SpritesDefaultMaterial: {fileID: 10754, guid: 0000000000000000f000000000000000, 40 | type: 0} 41 | m_TierSettings_Tier1: 42 | renderingPath: 1 43 | useCascadedShadowMaps: 0 44 | m_TierSettings_Tier2: 45 | renderingPath: 1 46 | useCascadedShadowMaps: 1 47 | m_TierSettings_Tier3: 48 | renderingPath: 1 49 | useCascadedShadowMaps: 1 50 | m_DefaultRenderingPath: 1 51 | m_DefaultMobileRenderingPath: 1 52 | m_TierSettings: [] 53 | m_LightmapStripping: 0 54 | m_FogStripping: 0 55 | m_LightmapKeepPlain: 1 56 | m_LightmapKeepDirCombined: 1 57 | m_LightmapKeepDirSeparate: 1 58 | m_LightmapKeepDynamicPlain: 1 59 | m_LightmapKeepDynamicDirCombined: 1 60 | m_LightmapKeepDynamicDirSeparate: 1 61 | m_FogKeepLinear: 1 62 | m_FogKeepExp: 1 63 | m_FogKeepExp2: 1 64 | -------------------------------------------------------------------------------- /tests/touchosc_integration/ProjectSettings/InputManager.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!13 &1 4 | InputManager: 5 | m_ObjectHideFlags: 0 6 | serializedVersion: 2 7 | m_Axes: 8 | - serializedVersion: 3 9 | m_Name: Horizontal 10 | descriptiveName: 11 | descriptiveNegativeName: 12 | negativeButton: left 13 | positiveButton: right 14 | altNegativeButton: a 15 | altPositiveButton: d 16 | gravity: 3 17 | dead: .00100000005 18 | sensitivity: 3 19 | snap: 1 20 | invert: 0 21 | type: 0 22 | axis: 0 23 | joyNum: 0 24 | - serializedVersion: 3 25 | m_Name: Vertical 26 | descriptiveName: 27 | descriptiveNegativeName: 28 | negativeButton: down 29 | positiveButton: up 30 | altNegativeButton: s 31 | altPositiveButton: w 32 | gravity: 3 33 | dead: .00100000005 34 | sensitivity: 3 35 | snap: 1 36 | invert: 0 37 | type: 0 38 | axis: 0 39 | joyNum: 0 40 | - serializedVersion: 3 41 | m_Name: Fire1 42 | descriptiveName: 43 | descriptiveNegativeName: 44 | negativeButton: 45 | positiveButton: left ctrl 46 | altNegativeButton: 47 | altPositiveButton: mouse 0 48 | gravity: 1000 49 | dead: .00100000005 50 | sensitivity: 1000 51 | snap: 0 52 | invert: 0 53 | type: 0 54 | axis: 0 55 | joyNum: 0 56 | - serializedVersion: 3 57 | m_Name: Fire2 58 | descriptiveName: 59 | descriptiveNegativeName: 60 | negativeButton: 61 | positiveButton: left alt 62 | altNegativeButton: 63 | altPositiveButton: mouse 1 64 | gravity: 1000 65 | dead: .00100000005 66 | sensitivity: 1000 67 | snap: 0 68 | invert: 0 69 | type: 0 70 | axis: 0 71 | joyNum: 0 72 | - serializedVersion: 3 73 | m_Name: Fire3 74 | descriptiveName: 75 | descriptiveNegativeName: 76 | negativeButton: 77 | positiveButton: left shift 78 | altNegativeButton: 79 | altPositiveButton: mouse 2 80 | gravity: 1000 81 | dead: .00100000005 82 | sensitivity: 1000 83 | snap: 0 84 | invert: 0 85 | type: 0 86 | axis: 0 87 | joyNum: 0 88 | - serializedVersion: 3 89 | m_Name: Jump 90 | descriptiveName: 91 | descriptiveNegativeName: 92 | negativeButton: 93 | positiveButton: space 94 | altNegativeButton: 95 | altPositiveButton: 96 | gravity: 1000 97 | dead: .00100000005 98 | sensitivity: 1000 99 | snap: 0 100 | invert: 0 101 | type: 0 102 | axis: 0 103 | joyNum: 0 104 | - serializedVersion: 3 105 | m_Name: Mouse X 106 | descriptiveName: 107 | descriptiveNegativeName: 108 | negativeButton: 109 | positiveButton: 110 | altNegativeButton: 111 | altPositiveButton: 112 | gravity: 0 113 | dead: 0 114 | sensitivity: .100000001 115 | snap: 0 116 | invert: 0 117 | type: 1 118 | axis: 0 119 | joyNum: 0 120 | - serializedVersion: 3 121 | m_Name: Mouse Y 122 | descriptiveName: 123 | descriptiveNegativeName: 124 | negativeButton: 125 | positiveButton: 126 | altNegativeButton: 127 | altPositiveButton: 128 | gravity: 0 129 | dead: 0 130 | sensitivity: .100000001 131 | snap: 0 132 | invert: 0 133 | type: 1 134 | axis: 1 135 | joyNum: 0 136 | - serializedVersion: 3 137 | m_Name: Mouse ScrollWheel 138 | descriptiveName: 139 | descriptiveNegativeName: 140 | negativeButton: 141 | positiveButton: 142 | altNegativeButton: 143 | altPositiveButton: 144 | gravity: 0 145 | dead: 0 146 | sensitivity: .100000001 147 | snap: 0 148 | invert: 0 149 | type: 1 150 | axis: 2 151 | joyNum: 0 152 | - serializedVersion: 3 153 | m_Name: Horizontal 154 | descriptiveName: 155 | descriptiveNegativeName: 156 | negativeButton: 157 | positiveButton: 158 | altNegativeButton: 159 | altPositiveButton: 160 | gravity: 0 161 | dead: .189999998 162 | sensitivity: 1 163 | snap: 0 164 | invert: 0 165 | type: 2 166 | axis: 0 167 | joyNum: 0 168 | - serializedVersion: 3 169 | m_Name: Vertical 170 | descriptiveName: 171 | descriptiveNegativeName: 172 | negativeButton: 173 | positiveButton: 174 | altNegativeButton: 175 | altPositiveButton: 176 | gravity: 0 177 | dead: .189999998 178 | sensitivity: 1 179 | snap: 0 180 | invert: 1 181 | type: 2 182 | axis: 1 183 | joyNum: 0 184 | - serializedVersion: 3 185 | m_Name: Fire1 186 | descriptiveName: 187 | descriptiveNegativeName: 188 | negativeButton: 189 | positiveButton: joystick button 0 190 | altNegativeButton: 191 | altPositiveButton: 192 | gravity: 1000 193 | dead: .00100000005 194 | sensitivity: 1000 195 | snap: 0 196 | invert: 0 197 | type: 0 198 | axis: 0 199 | joyNum: 0 200 | - serializedVersion: 3 201 | m_Name: Fire2 202 | descriptiveName: 203 | descriptiveNegativeName: 204 | negativeButton: 205 | positiveButton: joystick button 1 206 | altNegativeButton: 207 | altPositiveButton: 208 | gravity: 1000 209 | dead: .00100000005 210 | sensitivity: 1000 211 | snap: 0 212 | invert: 0 213 | type: 0 214 | axis: 0 215 | joyNum: 0 216 | - serializedVersion: 3 217 | m_Name: Fire3 218 | descriptiveName: 219 | descriptiveNegativeName: 220 | negativeButton: 221 | positiveButton: joystick button 2 222 | altNegativeButton: 223 | altPositiveButton: 224 | gravity: 1000 225 | dead: .00100000005 226 | sensitivity: 1000 227 | snap: 0 228 | invert: 0 229 | type: 0 230 | axis: 0 231 | joyNum: 0 232 | - serializedVersion: 3 233 | m_Name: Jump 234 | descriptiveName: 235 | descriptiveNegativeName: 236 | negativeButton: 237 | positiveButton: joystick button 3 238 | altNegativeButton: 239 | altPositiveButton: 240 | gravity: 1000 241 | dead: .00100000005 242 | sensitivity: 1000 243 | snap: 0 244 | invert: 0 245 | type: 0 246 | axis: 0 247 | joyNum: 0 248 | - serializedVersion: 3 249 | m_Name: Submit 250 | descriptiveName: 251 | descriptiveNegativeName: 252 | negativeButton: 253 | positiveButton: return 254 | altNegativeButton: 255 | altPositiveButton: joystick button 0 256 | gravity: 1000 257 | dead: .00100000005 258 | sensitivity: 1000 259 | snap: 0 260 | invert: 0 261 | type: 0 262 | axis: 0 263 | joyNum: 0 264 | - serializedVersion: 3 265 | m_Name: Submit 266 | descriptiveName: 267 | descriptiveNegativeName: 268 | negativeButton: 269 | positiveButton: enter 270 | altNegativeButton: 271 | altPositiveButton: space 272 | gravity: 1000 273 | dead: .00100000005 274 | sensitivity: 1000 275 | snap: 0 276 | invert: 0 277 | type: 0 278 | axis: 0 279 | joyNum: 0 280 | - serializedVersion: 3 281 | m_Name: Cancel 282 | descriptiveName: 283 | descriptiveNegativeName: 284 | negativeButton: 285 | positiveButton: escape 286 | altNegativeButton: 287 | altPositiveButton: joystick button 1 288 | gravity: 1000 289 | dead: .00100000005 290 | sensitivity: 1000 291 | snap: 0 292 | invert: 0 293 | type: 0 294 | axis: 0 295 | joyNum: 0 296 | -------------------------------------------------------------------------------- /tests/touchosc_integration/ProjectSettings/NavMeshAreas.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!126 &1 4 | NavMeshAreas: 5 | m_ObjectHideFlags: 0 6 | serializedVersion: 2 7 | areas: 8 | - name: Walkable 9 | cost: 1 10 | - name: Not Walkable 11 | cost: 1 12 | - name: Jump 13 | cost: 2 14 | - name: 15 | cost: 1 16 | - name: 17 | cost: 1 18 | - name: 19 | cost: 1 20 | - name: 21 | cost: 1 22 | - name: 23 | cost: 1 24 | - name: 25 | cost: 1 26 | - name: 27 | cost: 1 28 | - name: 29 | cost: 1 30 | - name: 31 | cost: 1 32 | - name: 33 | cost: 1 34 | - name: 35 | cost: 1 36 | - name: 37 | cost: 1 38 | - name: 39 | cost: 1 40 | - name: 41 | cost: 1 42 | - name: 43 | cost: 1 44 | - name: 45 | cost: 1 46 | - name: 47 | cost: 1 48 | - name: 49 | cost: 1 50 | - name: 51 | cost: 1 52 | - name: 53 | cost: 1 54 | - name: 55 | cost: 1 56 | - name: 57 | cost: 1 58 | - name: 59 | cost: 1 60 | - name: 61 | cost: 1 62 | - name: 63 | cost: 1 64 | - name: 65 | cost: 1 66 | - name: 67 | cost: 1 68 | - name: 69 | cost: 1 70 | - name: 71 | cost: 1 72 | -------------------------------------------------------------------------------- /tests/touchosc_integration/ProjectSettings/NetworkManager.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!149 &1 4 | NetworkManager: 5 | m_ObjectHideFlags: 0 6 | m_DebugLevel: 0 7 | m_Sendrate: 15 8 | m_AssetToPrefab: {} 9 | -------------------------------------------------------------------------------- /tests/touchosc_integration/ProjectSettings/Physics2DSettings.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!19 &1 4 | Physics2DSettings: 5 | m_ObjectHideFlags: 0 6 | m_Gravity: {x: 0, y: -9.81000042} 7 | m_DefaultMaterial: {fileID: 0} 8 | m_VelocityIterations: 8 9 | m_PositionIterations: 3 10 | m_VelocityThreshold: 1 11 | m_MaxLinearCorrection: .200000003 12 | m_MaxAngularCorrection: 8 13 | m_MaxTranslationSpeed: 100 14 | m_MaxRotationSpeed: 360 15 | m_MinPenetrationForPenalty: .00999999978 16 | m_BaumgarteScale: .200000003 17 | m_BaumgarteTimeOfImpactScale: .75 18 | m_TimeToSleep: .5 19 | m_LinearSleepTolerance: .00999999978 20 | m_AngularSleepTolerance: 2 21 | m_RaycastsHitTriggers: 1 22 | m_RaycastsStartInColliders: 1 23 | m_ChangeStopsCallbacks: 0 24 | m_LayerCollisionMatrix: ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff 25 | -------------------------------------------------------------------------------- /tests/touchosc_integration/ProjectSettings/ProjectVersion.txt: -------------------------------------------------------------------------------- 1 | m_EditorVersion: 5.5.0f3 2 | -------------------------------------------------------------------------------- /tests/touchosc_integration/ProjectSettings/QualitySettings.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!47 &1 4 | QualitySettings: 5 | m_ObjectHideFlags: 0 6 | serializedVersion: 5 7 | m_CurrentQuality: 0 8 | m_QualitySettings: 9 | - serializedVersion: 2 10 | name: Fastest 11 | pixelLightCount: 0 12 | shadows: 0 13 | shadowResolution: 0 14 | shadowProjection: 1 15 | shadowCascades: 1 16 | shadowDistance: 15 17 | shadowNearPlaneOffset: 3 18 | shadowCascade2Split: 0.33333334 19 | shadowCascade4Split: {x: 0.06666667, y: 0.2, z: 0.46666667} 20 | blendWeights: 1 21 | textureQuality: 1 22 | anisotropicTextures: 0 23 | antiAliasing: 0 24 | softParticles: 0 25 | softVegetation: 0 26 | realtimeReflectionProbes: 0 27 | billboardsFaceCameraPosition: 0 28 | vSyncCount: 0 29 | lodBias: 0.3 30 | maximumLODLevel: 0 31 | particleRaycastBudget: 4 32 | asyncUploadTimeSlice: 2 33 | asyncUploadBufferSize: 4 34 | excludedTargetPlatforms: [] 35 | - serializedVersion: 2 36 | name: Fast 37 | pixelLightCount: 0 38 | shadows: 0 39 | shadowResolution: 0 40 | shadowProjection: 1 41 | shadowCascades: 1 42 | shadowDistance: 20 43 | shadowNearPlaneOffset: 3 44 | shadowCascade2Split: 0.33333334 45 | shadowCascade4Split: {x: 0.06666667, y: 0.2, z: 0.46666667} 46 | blendWeights: 2 47 | textureQuality: 0 48 | anisotropicTextures: 0 49 | antiAliasing: 0 50 | softParticles: 0 51 | softVegetation: 0 52 | realtimeReflectionProbes: 0 53 | billboardsFaceCameraPosition: 0 54 | vSyncCount: 0 55 | lodBias: 0.4 56 | maximumLODLevel: 0 57 | particleRaycastBudget: 16 58 | asyncUploadTimeSlice: 2 59 | asyncUploadBufferSize: 4 60 | excludedTargetPlatforms: [] 61 | - serializedVersion: 2 62 | name: Simple 63 | pixelLightCount: 1 64 | shadows: 1 65 | shadowResolution: 0 66 | shadowProjection: 1 67 | shadowCascades: 1 68 | shadowDistance: 20 69 | shadowNearPlaneOffset: 3 70 | shadowCascade2Split: 0.33333334 71 | shadowCascade4Split: {x: 0.06666667, y: 0.2, z: 0.46666667} 72 | blendWeights: 2 73 | textureQuality: 0 74 | anisotropicTextures: 1 75 | antiAliasing: 0 76 | softParticles: 0 77 | softVegetation: 0 78 | realtimeReflectionProbes: 0 79 | billboardsFaceCameraPosition: 0 80 | vSyncCount: 0 81 | lodBias: 0.7 82 | maximumLODLevel: 0 83 | particleRaycastBudget: 64 84 | asyncUploadTimeSlice: 2 85 | asyncUploadBufferSize: 4 86 | excludedTargetPlatforms: [] 87 | - serializedVersion: 2 88 | name: Good 89 | pixelLightCount: 2 90 | shadows: 2 91 | shadowResolution: 1 92 | shadowProjection: 1 93 | shadowCascades: 2 94 | shadowDistance: 40 95 | shadowNearPlaneOffset: 3 96 | shadowCascade2Split: 0.33333334 97 | shadowCascade4Split: {x: 0.06666667, y: 0.2, z: 0.46666667} 98 | blendWeights: 2 99 | textureQuality: 0 100 | anisotropicTextures: 1 101 | antiAliasing: 0 102 | softParticles: 0 103 | softVegetation: 1 104 | realtimeReflectionProbes: 1 105 | billboardsFaceCameraPosition: 1 106 | vSyncCount: 1 107 | lodBias: 1 108 | maximumLODLevel: 0 109 | particleRaycastBudget: 256 110 | asyncUploadTimeSlice: 2 111 | asyncUploadBufferSize: 4 112 | excludedTargetPlatforms: [] 113 | - serializedVersion: 2 114 | name: Beautiful 115 | pixelLightCount: 3 116 | shadows: 2 117 | shadowResolution: 2 118 | shadowProjection: 1 119 | shadowCascades: 2 120 | shadowDistance: 70 121 | shadowNearPlaneOffset: 3 122 | shadowCascade2Split: 0.33333334 123 | shadowCascade4Split: {x: 0.06666667, y: 0.2, z: 0.46666667} 124 | blendWeights: 4 125 | textureQuality: 0 126 | anisotropicTextures: 2 127 | antiAliasing: 2 128 | softParticles: 1 129 | softVegetation: 1 130 | realtimeReflectionProbes: 1 131 | billboardsFaceCameraPosition: 1 132 | vSyncCount: 1 133 | lodBias: 1.5 134 | maximumLODLevel: 0 135 | particleRaycastBudget: 1024 136 | asyncUploadTimeSlice: 2 137 | asyncUploadBufferSize: 4 138 | excludedTargetPlatforms: [] 139 | - serializedVersion: 2 140 | name: Fantastic 141 | pixelLightCount: 4 142 | shadows: 2 143 | shadowResolution: 2 144 | shadowProjection: 1 145 | shadowCascades: 4 146 | shadowDistance: 150 147 | shadowNearPlaneOffset: 3 148 | shadowCascade2Split: 0.33333334 149 | shadowCascade4Split: {x: 0.06666667, y: 0.2, z: 0.46666667} 150 | blendWeights: 4 151 | textureQuality: 0 152 | anisotropicTextures: 2 153 | antiAliasing: 2 154 | softParticles: 1 155 | softVegetation: 1 156 | realtimeReflectionProbes: 1 157 | billboardsFaceCameraPosition: 1 158 | vSyncCount: 1 159 | lodBias: 2 160 | maximumLODLevel: 0 161 | particleRaycastBudget: 4096 162 | asyncUploadTimeSlice: 2 163 | asyncUploadBufferSize: 4 164 | excludedTargetPlatforms: [] 165 | m_PerPlatformDefaultQuality: 166 | Android: 0 167 | Standalone: 0 168 | WebGL: 0 169 | Windows Store Apps: 0 170 | -------------------------------------------------------------------------------- /tests/touchosc_integration/ProjectSettings/TagManager.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!78 &1 4 | TagManager: 5 | serializedVersion: 2 6 | tags: [] 7 | layers: 8 | - Default 9 | - TransparentFX 10 | - Ignore Raycast 11 | - 12 | - Water 13 | - UI 14 | - 15 | - 16 | - 17 | - 18 | - 19 | - 20 | - 21 | - 22 | - 23 | - 24 | - 25 | - 26 | - 27 | - 28 | - 29 | - 30 | - 31 | - 32 | - 33 | - 34 | - 35 | - 36 | - 37 | - 38 | - 39 | - 40 | m_SortingLayers: 41 | - name: Default 42 | uniqueID: 0 43 | locked: 0 44 | -------------------------------------------------------------------------------- /tests/touchosc_integration/ProjectSettings/TimeManager.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!5 &1 4 | TimeManager: 5 | m_ObjectHideFlags: 0 6 | Fixed Timestep: .0199999996 7 | Maximum Allowed Timestep: .333333343 8 | m_TimeScale: 1 9 | -------------------------------------------------------------------------------- /tests/touchosc_integration/ProjectSettings/UnityConnectSettings.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!310 &1 4 | UnityConnectSettings: 5 | m_ObjectHideFlags: 0 6 | m_Enabled: 0 7 | m_TestMode: 0 8 | m_TestEventUrl: 9 | m_TestConfigUrl: 10 | CrashReportingSettings: 11 | m_EventUrl: https://perf-events.cloud.unity3d.com/api/events/crashes 12 | m_Enabled: 0 13 | m_CaptureEditorExceptions: 1 14 | UnityPurchasingSettings: 15 | m_Enabled: 0 16 | m_TestMode: 0 17 | UnityAnalyticsSettings: 18 | m_Enabled: 0 19 | m_InitializeOnStartup: 1 20 | m_TestMode: 0 21 | m_TestEventUrl: 22 | m_TestConfigUrl: 23 | UnityAdsSettings: 24 | m_Enabled: 0 25 | m_InitializeOnStartup: 1 26 | m_TestMode: 0 27 | m_EnabledPlatforms: 4294967295 28 | m_IosGameId: 29 | m_AndroidGameId: 30 | --------------------------------------------------------------------------------