├── .gitignore ├── Assets ├── HoloToolkit.meta ├── Prefabs.meta ├── Prefabs │ ├── UDPCommunication.prefab │ ├── UDPCommunication.prefab.meta │ ├── UDPGenerator.prefab │ ├── UDPGenerator.prefab.meta │ ├── UDPResponder.prefab │ └── UDPResponder.prefab.meta ├── Scenes.meta ├── Scenes │ ├── Test.unity │ └── Test.unity.meta ├── Scripts.meta ├── Scripts │ ├── UDPCommunication.cs │ ├── UDPCommunication.cs.meta │ ├── UDPGeneration.cs │ ├── UDPGeneration.cs.meta │ ├── UDPResponse.cs │ └── UDPResponse.cs.meta ├── WSATestCertificate.pfx └── WSATestCertificate.pfx.meta ├── LICENSE ├── 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 └── README.md /.gitignore: -------------------------------------------------------------------------------- 1 | /Assets/HoloToolkit/ 2 | /WindowsStoreApp/ 3 | /UWP/ 4 | 5 | /[Ll]ibrary/ 6 | /[Tt]emp/ 7 | /[Oo]bj/ 8 | /[Bb]uild/ 9 | /[Bb]uilds/ 10 | /Assets/AssetStoreTools* 11 | 12 | # Visual Studio 2015 cache directory 13 | /.vs/ 14 | 15 | # Autogenerated VS/MD/Consulo solution and project files 16 | ExportedObj/ 17 | .consulo/ 18 | *.csproj 19 | *.unityproj 20 | *.sln 21 | *.suo 22 | *.tmp 23 | *.user 24 | *.userprefs 25 | *.pidb 26 | *.booproj 27 | *.svd 28 | *.pdb 29 | 30 | # Unity3D generated meta files 31 | *.pidb.meta 32 | 33 | # Unity3D Generated File On Crash Reports 34 | sysinfo.txt 35 | 36 | # Builds 37 | *.apk 38 | *.unitypackage 39 | 40 | # OS generated 41 | .DS_Store 42 | .DS_Store? 43 | ._* 44 | .Spotlight-V100 45 | .Trashes 46 | ehthumbs.db 47 | Thumbs.db 48 | -------------------------------------------------------------------------------- /Assets/HoloToolkit.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: d01260aec2b98b549acc5a49d4a4c47b 3 | folderAsset: yes 4 | timeCreated: 1455735874 5 | licenseType: Pro 6 | DefaultImporter: 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /Assets/Prefabs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: b002a875ff4a0924492374ea8c8c681f 3 | folderAsset: yes 4 | timeCreated: 1502392359 5 | licenseType: Free 6 | DefaultImporter: 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /Assets/Prefabs/UDPCommunication.prefab: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!1001 &100100000 4 | Prefab: 5 | m_ObjectHideFlags: 1 6 | serializedVersion: 2 7 | m_Modification: 8 | m_TransformParent: {fileID: 0} 9 | m_Modifications: [] 10 | m_RemovedComponents: [] 11 | m_ParentPrefab: {fileID: 0} 12 | m_RootGameObject: {fileID: 1161752430673876} 13 | m_IsPrefabParent: 1 14 | --- !u!1 &1161752430673876 15 | GameObject: 16 | m_ObjectHideFlags: 0 17 | m_PrefabParentObject: {fileID: 0} 18 | m_PrefabInternal: {fileID: 100100000} 19 | serializedVersion: 5 20 | m_Component: 21 | - component: {fileID: 4143569445316468} 22 | - component: {fileID: 114381507436461726} 23 | m_Layer: 0 24 | m_Name: UDPCommunication 25 | m_TagString: Untagged 26 | m_Icon: {fileID: 0} 27 | m_NavMeshLayer: 0 28 | m_StaticEditorFlags: 0 29 | m_IsActive: 1 30 | --- !u!4 &4143569445316468 31 | Transform: 32 | m_ObjectHideFlags: 1 33 | m_PrefabParentObject: {fileID: 0} 34 | m_PrefabInternal: {fileID: 100100000} 35 | m_GameObject: {fileID: 1161752430673876} 36 | m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} 37 | m_LocalPosition: {x: 0, y: 0, z: 0} 38 | m_LocalScale: {x: 1, y: 1, z: 1} 39 | m_Children: [] 40 | m_Father: {fileID: 0} 41 | m_RootOrder: 0 42 | m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} 43 | --- !u!114 &114381507436461726 44 | MonoBehaviour: 45 | m_ObjectHideFlags: 1 46 | m_PrefabParentObject: {fileID: 0} 47 | m_PrefabInternal: {fileID: 100100000} 48 | m_GameObject: {fileID: 1161752430673876} 49 | m_Enabled: 1 50 | m_EditorHideFlags: 0 51 | m_Script: {fileID: 11500000, guid: 3f7374f5349215a4680b769a4e52c156, type: 3} 52 | m_Name: 53 | m_EditorClassIdentifier: 54 | internalPort: 11000 55 | externalIP: 192.168.1.130 56 | externalPort: 11000 57 | sendPingAtStart: 1 58 | PingMessage: Let there be UDP. 59 | udpEvent: 60 | m_PersistentCalls: 61 | m_Calls: [] 62 | m_TypeName: UDPMessageEvent, Assembly-CSharp, Version=0.0.0.0, Culture=neutral, 63 | PublicKeyToken=null 64 | -------------------------------------------------------------------------------- /Assets/Prefabs/UDPCommunication.prefab.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: c21974804d13d6c428a6227b2f98acfd 3 | timeCreated: 1502398777 4 | licenseType: Free 5 | NativeFormatImporter: 6 | mainObjectFileID: 100100000 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /Assets/Prefabs/UDPGenerator.prefab: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!1001 &100100000 4 | Prefab: 5 | m_ObjectHideFlags: 1 6 | serializedVersion: 2 7 | m_Modification: 8 | m_TransformParent: {fileID: 0} 9 | m_Modifications: [] 10 | m_RemovedComponents: [] 11 | m_ParentPrefab: {fileID: 0} 12 | m_RootGameObject: {fileID: 1064309062893498} 13 | m_IsPrefabParent: 1 14 | --- !u!1 &1064309062893498 15 | GameObject: 16 | m_ObjectHideFlags: 0 17 | m_PrefabParentObject: {fileID: 0} 18 | m_PrefabInternal: {fileID: 100100000} 19 | serializedVersion: 5 20 | m_Component: 21 | - component: {fileID: 4203361972011750} 22 | - component: {fileID: 114160676308256930} 23 | m_Layer: 0 24 | m_Name: UDPGenerator 25 | m_TagString: Untagged 26 | m_Icon: {fileID: 0} 27 | m_NavMeshLayer: 0 28 | m_StaticEditorFlags: 0 29 | m_IsActive: 1 30 | --- !u!4 &4203361972011750 31 | Transform: 32 | m_ObjectHideFlags: 1 33 | m_PrefabParentObject: {fileID: 0} 34 | m_PrefabInternal: {fileID: 100100000} 35 | m_GameObject: {fileID: 1064309062893498} 36 | m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} 37 | m_LocalPosition: {x: 0, y: 0, z: 0} 38 | m_LocalScale: {x: 1, y: 1, z: 1} 39 | m_Children: [] 40 | m_Father: {fileID: 0} 41 | m_RootOrder: 0 42 | m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} 43 | --- !u!114 &114160676308256930 44 | MonoBehaviour: 45 | m_ObjectHideFlags: 1 46 | m_PrefabParentObject: {fileID: 0} 47 | m_PrefabInternal: {fileID: 100100000} 48 | m_GameObject: {fileID: 1064309062893498} 49 | m_Enabled: 1 50 | m_EditorHideFlags: 0 51 | m_Script: {fileID: 11500000, guid: 6c2d684afe656c94fb7c0d751b29a2e0, type: 3} 52 | m_Name: 53 | m_EditorClassIdentifier: 54 | UDPCommGameObject: {fileID: 0} 55 | DataString: UDP is real. 56 | -------------------------------------------------------------------------------- /Assets/Prefabs/UDPGenerator.prefab.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 4e947979fa4d25c4b9c9c2e295bacd59 3 | timeCreated: 1502440559 4 | licenseType: Free 5 | NativeFormatImporter: 6 | mainObjectFileID: -1 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /Assets/Prefabs/UDPResponder.prefab: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!1001 &100100000 4 | Prefab: 5 | m_ObjectHideFlags: 1 6 | serializedVersion: 2 7 | m_Modification: 8 | m_TransformParent: {fileID: 0} 9 | m_Modifications: [] 10 | m_RemovedComponents: [] 11 | m_ParentPrefab: {fileID: 0} 12 | m_RootGameObject: {fileID: 1528621085502190} 13 | m_IsPrefabParent: 1 14 | --- !u!1 &1528621085502190 15 | GameObject: 16 | m_ObjectHideFlags: 0 17 | m_PrefabParentObject: {fileID: 0} 18 | m_PrefabInternal: {fileID: 100100000} 19 | serializedVersion: 5 20 | m_Component: 21 | - component: {fileID: 4746979244701888} 22 | - component: {fileID: 114132533444920518} 23 | m_Layer: 0 24 | m_Name: UDPResponder 25 | m_TagString: Untagged 26 | m_Icon: {fileID: 0} 27 | m_NavMeshLayer: 0 28 | m_StaticEditorFlags: 0 29 | m_IsActive: 1 30 | --- !u!4 &4746979244701888 31 | Transform: 32 | m_ObjectHideFlags: 1 33 | m_PrefabParentObject: {fileID: 0} 34 | m_PrefabInternal: {fileID: 100100000} 35 | m_GameObject: {fileID: 1528621085502190} 36 | m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} 37 | m_LocalPosition: {x: 0, y: 0, z: 0} 38 | m_LocalScale: {x: 1, y: 1, z: 1} 39 | m_Children: [] 40 | m_Father: {fileID: 0} 41 | m_RootOrder: 0 42 | m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} 43 | --- !u!114 &114132533444920518 44 | MonoBehaviour: 45 | m_ObjectHideFlags: 1 46 | m_PrefabParentObject: {fileID: 0} 47 | m_PrefabInternal: {fileID: 100100000} 48 | m_GameObject: {fileID: 1528621085502190} 49 | m_Enabled: 1 50 | m_EditorHideFlags: 0 51 | m_Script: {fileID: 11500000, guid: 5e691e26db0df734b96d5516e1764044, type: 3} 52 | m_Name: 53 | m_EditorClassIdentifier: 54 | textMesh: {fileID: 0} 55 | -------------------------------------------------------------------------------- /Assets/Prefabs/UDPResponder.prefab.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 37df7db4c0f53f14eb4178827dcb0a55 3 | timeCreated: 1502398780 4 | licenseType: Free 5 | NativeFormatImporter: 6 | mainObjectFileID: 100100000 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /Assets/Scenes.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 5da125757dc591e479eba1e254b2ac9b 3 | folderAsset: yes 4 | timeCreated: 1502393772 5 | licenseType: Free 6 | DefaultImporter: 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /Assets/Scenes/Test.unity: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!29 &1 4 | OcclusionCullingSettings: 5 | m_ObjectHideFlags: 0 6 | serializedVersion: 2 7 | m_OcclusionBakeSettings: 8 | smallestOccluder: 5 9 | smallestHole: 0.25 10 | backfaceThreshold: 100 11 | m_SceneGUID: 00000000000000000000000000000000 12 | m_OcclusionCullingData: {fileID: 0} 13 | --- !u!104 &2 14 | RenderSettings: 15 | m_ObjectHideFlags: 0 16 | serializedVersion: 8 17 | m_Fog: 0 18 | m_FogColor: {r: 0.5, g: 0.5, b: 0.5, a: 1} 19 | m_FogMode: 3 20 | m_FogDensity: 0.01 21 | m_LinearFogStart: 0 22 | m_LinearFogEnd: 300 23 | m_AmbientSkyColor: {r: 0.212, g: 0.227, b: 0.259, a: 1} 24 | m_AmbientEquatorColor: {r: 0.114, g: 0.125, b: 0.133, a: 1} 25 | m_AmbientGroundColor: {r: 0.047, g: 0.043, b: 0.035, a: 1} 26 | m_AmbientIntensity: 1 27 | m_AmbientMode: 0 28 | m_SubtractiveShadowColor: {r: 0.42, g: 0.478, b: 0.627, a: 1} 29 | m_SkyboxMaterial: {fileID: 10304, guid: 0000000000000000f000000000000000, type: 0} 30 | m_HaloStrength: 0.5 31 | m_FlareStrength: 1 32 | m_FlareFadeSpeed: 3 33 | m_HaloTexture: {fileID: 0} 34 | m_SpotCookie: {fileID: 10001, guid: 0000000000000000e000000000000000, type: 0} 35 | m_DefaultReflectionMode: 0 36 | m_DefaultReflectionResolution: 128 37 | m_ReflectionBounces: 1 38 | m_ReflectionIntensity: 1 39 | m_CustomReflection: {fileID: 0} 40 | m_Sun: {fileID: 0} 41 | m_IndirectSpecularColor: {r: 0.44657826, g: 0.49641263, b: 0.57481676, a: 1} 42 | --- !u!157 &3 43 | LightmapSettings: 44 | m_ObjectHideFlags: 0 45 | serializedVersion: 9 46 | m_GIWorkflowMode: 0 47 | m_GISettings: 48 | serializedVersion: 2 49 | m_BounceScale: 1 50 | m_IndirectOutputScale: 1 51 | m_AlbedoBoost: 1 52 | m_TemporalCoherenceThreshold: 1 53 | m_EnvironmentLightingMode: 0 54 | m_EnableBakedLightmaps: 1 55 | m_EnableRealtimeLightmaps: 1 56 | m_LightmapEditorSettings: 57 | serializedVersion: 8 58 | m_Resolution: 2 59 | m_BakeResolution: 40 60 | m_TextureWidth: 1024 61 | m_TextureHeight: 1024 62 | m_AO: 0 63 | m_AOMaxDistance: 1 64 | m_CompAOExponent: 1 65 | m_CompAOExponentDirect: 0 66 | m_Padding: 2 67 | m_LightmapParameters: {fileID: 0} 68 | m_LightmapsBakeMode: 1 69 | m_TextureCompression: 1 70 | m_FinalGather: 0 71 | m_FinalGatherFiltering: 1 72 | m_FinalGatherRayCount: 256 73 | m_ReflectionCompression: 2 74 | m_MixedBakeMode: 3 75 | m_BakeBackend: 0 76 | m_PVRSampling: 1 77 | m_PVRDirectSampleCount: 32 78 | m_PVRSampleCount: 500 79 | m_PVRBounces: 2 80 | m_PVRFiltering: 0 81 | m_PVRFilteringMode: 1 82 | m_PVRCulling: 1 83 | m_PVRFilteringGaussRadiusDirect: 1 84 | m_PVRFilteringGaussRadiusIndirect: 5 85 | m_PVRFilteringGaussRadiusAO: 2 86 | m_PVRFilteringAtrousColorSigma: 1 87 | m_PVRFilteringAtrousNormalSigma: 1 88 | m_PVRFilteringAtrousPositionSigma: 1 89 | m_LightingDataAsset: {fileID: 0} 90 | m_ShadowMaskMode: 2 91 | --- !u!196 &4 92 | NavMeshSettings: 93 | serializedVersion: 2 94 | m_ObjectHideFlags: 0 95 | m_BuildSettings: 96 | serializedVersion: 2 97 | agentTypeID: 0 98 | agentRadius: 0.5 99 | agentHeight: 2 100 | agentSlope: 45 101 | agentClimb: 0.4 102 | ledgeDropHeight: 0 103 | maxJumpAcrossDistance: 0 104 | minRegionArea: 2 105 | manualCellSize: 0 106 | cellSize: 0.16666667 107 | manualTileSize: 0 108 | tileSize: 256 109 | accuratePlacement: 0 110 | m_NavMeshData: {fileID: 0} 111 | --- !u!1001 &197086359 112 | Prefab: 113 | m_ObjectHideFlags: 0 114 | serializedVersion: 2 115 | m_Modification: 116 | m_TransformParent: {fileID: 0} 117 | m_Modifications: 118 | - target: {fileID: 4203361972011750, guid: 4e947979fa4d25c4b9c9c2e295bacd59, type: 2} 119 | propertyPath: m_LocalPosition.x 120 | value: 0 121 | objectReference: {fileID: 0} 122 | - target: {fileID: 4203361972011750, guid: 4e947979fa4d25c4b9c9c2e295bacd59, type: 2} 123 | propertyPath: m_LocalPosition.y 124 | value: 0 125 | objectReference: {fileID: 0} 126 | - target: {fileID: 4203361972011750, guid: 4e947979fa4d25c4b9c9c2e295bacd59, type: 2} 127 | propertyPath: m_LocalPosition.z 128 | value: 0 129 | objectReference: {fileID: 0} 130 | - target: {fileID: 4203361972011750, guid: 4e947979fa4d25c4b9c9c2e295bacd59, type: 2} 131 | propertyPath: m_LocalRotation.x 132 | value: 0 133 | objectReference: {fileID: 0} 134 | - target: {fileID: 4203361972011750, guid: 4e947979fa4d25c4b9c9c2e295bacd59, type: 2} 135 | propertyPath: m_LocalRotation.y 136 | value: 0 137 | objectReference: {fileID: 0} 138 | - target: {fileID: 4203361972011750, guid: 4e947979fa4d25c4b9c9c2e295bacd59, type: 2} 139 | propertyPath: m_LocalRotation.z 140 | value: 0 141 | objectReference: {fileID: 0} 142 | - target: {fileID: 4203361972011750, guid: 4e947979fa4d25c4b9c9c2e295bacd59, type: 2} 143 | propertyPath: m_LocalRotation.w 144 | value: 1 145 | objectReference: {fileID: 0} 146 | - target: {fileID: 4203361972011750, guid: 4e947979fa4d25c4b9c9c2e295bacd59, type: 2} 147 | propertyPath: m_RootOrder 148 | value: 5 149 | objectReference: {fileID: 0} 150 | - target: {fileID: 114160676308256930, guid: 4e947979fa4d25c4b9c9c2e295bacd59, 151 | type: 2} 152 | propertyPath: UDPCommGameObject 153 | value: 154 | objectReference: {fileID: 259992318} 155 | - target: {fileID: 1064309062893498, guid: 4e947979fa4d25c4b9c9c2e295bacd59, type: 2} 156 | propertyPath: m_IsActive 157 | value: 1 158 | objectReference: {fileID: 0} 159 | m_RemovedComponents: [] 160 | m_ParentPrefab: {fileID: 100100000, guid: 4e947979fa4d25c4b9c9c2e295bacd59, type: 2} 161 | m_IsPrefabParent: 0 162 | --- !u!1001 &259992317 163 | Prefab: 164 | m_ObjectHideFlags: 0 165 | serializedVersion: 2 166 | m_Modification: 167 | m_TransformParent: {fileID: 0} 168 | m_Modifications: 169 | - target: {fileID: 114381507436461726, guid: c21974804d13d6c428a6227b2f98acfd, 170 | type: 2} 171 | propertyPath: udpEvent.m_PersistentCalls.m_Calls.Array.size 172 | value: 0 173 | objectReference: {fileID: 0} 174 | - target: {fileID: 4143569445316468, guid: c21974804d13d6c428a6227b2f98acfd, type: 2} 175 | propertyPath: m_LocalPosition.x 176 | value: 0 177 | objectReference: {fileID: 0} 178 | - target: {fileID: 4143569445316468, guid: c21974804d13d6c428a6227b2f98acfd, type: 2} 179 | propertyPath: m_LocalPosition.y 180 | value: 0 181 | objectReference: {fileID: 0} 182 | - target: {fileID: 4143569445316468, guid: c21974804d13d6c428a6227b2f98acfd, type: 2} 183 | propertyPath: m_LocalPosition.z 184 | value: 0 185 | objectReference: {fileID: 0} 186 | - target: {fileID: 4143569445316468, guid: c21974804d13d6c428a6227b2f98acfd, type: 2} 187 | propertyPath: m_LocalRotation.x 188 | value: 0 189 | objectReference: {fileID: 0} 190 | - target: {fileID: 4143569445316468, guid: c21974804d13d6c428a6227b2f98acfd, type: 2} 191 | propertyPath: m_LocalRotation.y 192 | value: 0 193 | objectReference: {fileID: 0} 194 | - target: {fileID: 4143569445316468, guid: c21974804d13d6c428a6227b2f98acfd, type: 2} 195 | propertyPath: m_LocalRotation.z 196 | value: 0 197 | objectReference: {fileID: 0} 198 | - target: {fileID: 4143569445316468, guid: c21974804d13d6c428a6227b2f98acfd, type: 2} 199 | propertyPath: m_LocalRotation.w 200 | value: 1 201 | objectReference: {fileID: 0} 202 | - target: {fileID: 4143569445316468, guid: c21974804d13d6c428a6227b2f98acfd, type: 2} 203 | propertyPath: m_RootOrder 204 | value: 4 205 | objectReference: {fileID: 0} 206 | - target: {fileID: 1161752430673876, guid: c21974804d13d6c428a6227b2f98acfd, type: 2} 207 | propertyPath: m_Name 208 | value: UDPCommunication_Sender 209 | objectReference: {fileID: 0} 210 | - target: {fileID: 114381507436461726, guid: c21974804d13d6c428a6227b2f98acfd, 211 | type: 2} 212 | propertyPath: sendPingAtStart 213 | value: 1 214 | objectReference: {fileID: 0} 215 | - target: {fileID: 114381507436461726, guid: c21974804d13d6c428a6227b2f98acfd, 216 | type: 2} 217 | propertyPath: udpEvent.m_PersistentCalls.m_Calls.Array.data[0].m_Mode 218 | value: 0 219 | objectReference: {fileID: 0} 220 | - target: {fileID: 114381507436461726, guid: c21974804d13d6c428a6227b2f98acfd, 221 | type: 2} 222 | propertyPath: udpEvent.m_PersistentCalls.m_Calls.Array.data[0].m_CallState 223 | value: 2 224 | objectReference: {fileID: 0} 225 | - target: {fileID: 114381507436461726, guid: c21974804d13d6c428a6227b2f98acfd, 226 | type: 2} 227 | propertyPath: internalPort 228 | value: 11001 229 | objectReference: {fileID: 0} 230 | - target: {fileID: 114381507436461726, guid: c21974804d13d6c428a6227b2f98acfd, 231 | type: 2} 232 | propertyPath: externalPort 233 | value: 11001 234 | objectReference: {fileID: 0} 235 | - target: {fileID: 114381507436461726, guid: c21974804d13d6c428a6227b2f98acfd, 236 | type: 2} 237 | propertyPath: externalIP 238 | value: 192.168.1.130 239 | objectReference: {fileID: 0} 240 | - target: {fileID: 1161752430673876, guid: c21974804d13d6c428a6227b2f98acfd, type: 2} 241 | propertyPath: m_IsActive 242 | value: 1 243 | objectReference: {fileID: 0} 244 | - target: {fileID: 114381507436461726, guid: c21974804d13d6c428a6227b2f98acfd, 245 | type: 2} 246 | propertyPath: udpEvent.m_PersistentCalls.m_Calls.Array.data[0].m_Target 247 | value: 248 | objectReference: {fileID: 563887090} 249 | - target: {fileID: 114381507436461726, guid: c21974804d13d6c428a6227b2f98acfd, 250 | type: 2} 251 | propertyPath: udpEvent.m_PersistentCalls.m_Calls.Array.data[0].m_MethodName 252 | value: ResponseToUDPPacket 253 | objectReference: {fileID: 0} 254 | - target: {fileID: 114381507436461726, guid: c21974804d13d6c428a6227b2f98acfd, 255 | type: 2} 256 | propertyPath: udpEvent.m_PersistentCalls.m_Calls.Array.data[0].m_Arguments.m_ObjectArgumentAssemblyTypeName 257 | value: UnityEngine.Object, UnityEngine 258 | objectReference: {fileID: 0} 259 | m_RemovedComponents: [] 260 | m_ParentPrefab: {fileID: 100100000, guid: c21974804d13d6c428a6227b2f98acfd, type: 2} 261 | m_IsPrefabParent: 0 262 | --- !u!1 &259992318 stripped 263 | GameObject: 264 | m_PrefabParentObject: {fileID: 1161752430673876, guid: c21974804d13d6c428a6227b2f98acfd, 265 | type: 2} 266 | m_PrefabInternal: {fileID: 259992317} 267 | --- !u!4 &272454201 stripped 268 | Transform: 269 | m_PrefabParentObject: {fileID: 4000010560871102, guid: d379ed0a5618c9f479f58bd83a2d0ad3, 270 | type: 2} 271 | m_PrefabInternal: {fileID: 720148308} 272 | --- !u!1 &392355525 273 | GameObject: 274 | m_ObjectHideFlags: 0 275 | m_PrefabParentObject: {fileID: 0} 276 | m_PrefabInternal: {fileID: 0} 277 | serializedVersion: 5 278 | m_Component: 279 | - component: {fileID: 392355527} 280 | - component: {fileID: 392355526} 281 | m_Layer: 0 282 | m_Name: Directional Light 283 | m_TagString: Untagged 284 | m_Icon: {fileID: 0} 285 | m_NavMeshLayer: 0 286 | m_StaticEditorFlags: 0 287 | m_IsActive: 1 288 | --- !u!108 &392355526 289 | Light: 290 | m_ObjectHideFlags: 0 291 | m_PrefabParentObject: {fileID: 0} 292 | m_PrefabInternal: {fileID: 0} 293 | m_GameObject: {fileID: 392355525} 294 | m_Enabled: 1 295 | serializedVersion: 8 296 | m_Type: 1 297 | m_Color: {r: 1, g: 0.95686275, b: 0.8392157, a: 1} 298 | m_Intensity: 1 299 | m_Range: 10 300 | m_SpotAngle: 30 301 | m_CookieSize: 10 302 | m_Shadows: 303 | m_Type: 2 304 | m_Resolution: -1 305 | m_CustomResolution: -1 306 | m_Strength: 1 307 | m_Bias: 0.05 308 | m_NormalBias: 0.4 309 | m_NearPlane: 0.2 310 | m_Cookie: {fileID: 0} 311 | m_DrawHalo: 0 312 | m_Flare: {fileID: 0} 313 | m_RenderMode: 0 314 | m_CullingMask: 315 | serializedVersion: 2 316 | m_Bits: 4294967295 317 | m_Lightmapping: 4 318 | m_AreaSize: {x: 1, y: 1} 319 | m_BounceIntensity: 1 320 | m_ColorTemperature: 6570 321 | m_UseColorTemperature: 0 322 | m_ShadowRadius: 0 323 | m_ShadowAngle: 0 324 | --- !u!4 &392355527 325 | Transform: 326 | m_ObjectHideFlags: 0 327 | m_PrefabParentObject: {fileID: 0} 328 | m_PrefabInternal: {fileID: 0} 329 | m_GameObject: {fileID: 392355525} 330 | m_LocalRotation: {x: 0.40821788, y: -0.23456968, z: 0.10938163, w: 0.8754261} 331 | m_LocalPosition: {x: 0, y: 3, z: 0} 332 | m_LocalScale: {x: 1, y: 1, z: 1} 333 | m_Children: [] 334 | m_Father: {fileID: 0} 335 | m_RootOrder: 1 336 | m_LocalEulerAnglesHint: {x: 50, y: -30, z: 0} 337 | --- !u!114 &563887090 stripped 338 | MonoBehaviour: 339 | m_PrefabParentObject: {fileID: 114132533444920518, guid: 37df7db4c0f53f14eb4178827dcb0a55, 340 | type: 2} 341 | m_PrefabInternal: {fileID: 952561341} 342 | m_Script: {fileID: 11500000, guid: 5e691e26db0df734b96d5516e1764044, type: 3} 343 | --- !u!1 &699202043 344 | GameObject: 345 | m_ObjectHideFlags: 0 346 | m_PrefabParentObject: {fileID: 0} 347 | m_PrefabInternal: {fileID: 0} 348 | serializedVersion: 5 349 | m_Component: 350 | - component: {fileID: 699202044} 351 | - component: {fileID: 699202046} 352 | - component: {fileID: 699202045} 353 | m_Layer: 0 354 | m_Name: UDP Console 355 | m_TagString: Untagged 356 | m_Icon: {fileID: 0} 357 | m_NavMeshLayer: 0 358 | m_StaticEditorFlags: 0 359 | m_IsActive: 1 360 | --- !u!4 &699202044 361 | Transform: 362 | m_ObjectHideFlags: 0 363 | m_PrefabParentObject: {fileID: 0} 364 | m_PrefabInternal: {fileID: 0} 365 | m_GameObject: {fileID: 699202043} 366 | m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} 367 | m_LocalPosition: {x: 0, y: 0, z: 5} 368 | m_LocalScale: {x: 0.01, y: 0.01, z: 0.01} 369 | m_Children: [] 370 | m_Father: {fileID: 272454201} 371 | m_RootOrder: 1 372 | m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} 373 | --- !u!102 &699202045 374 | TextMesh: 375 | serializedVersion: 3 376 | m_ObjectHideFlags: 0 377 | m_PrefabParentObject: {fileID: 0} 378 | m_PrefabInternal: {fileID: 0} 379 | m_GameObject: {fileID: 699202043} 380 | m_Text: UDP messages will appear here. 381 | m_OffsetZ: 0 382 | m_CharacterSize: 1 383 | m_LineSpacing: 1 384 | m_Anchor: 4 385 | m_Alignment: 0 386 | m_TabSize: 4 387 | m_FontSize: 72 388 | m_FontStyle: 0 389 | m_RichText: 1 390 | m_Font: {fileID: 10102, guid: 0000000000000000e000000000000000, type: 0} 391 | m_Color: 392 | serializedVersion: 2 393 | rgba: 4294967295 394 | --- !u!23 &699202046 395 | MeshRenderer: 396 | m_ObjectHideFlags: 0 397 | m_PrefabParentObject: {fileID: 0} 398 | m_PrefabInternal: {fileID: 0} 399 | m_GameObject: {fileID: 699202043} 400 | m_Enabled: 1 401 | m_CastShadows: 1 402 | m_ReceiveShadows: 1 403 | m_MotionVectors: 1 404 | m_LightProbeUsage: 1 405 | m_ReflectionProbeUsage: 1 406 | m_Materials: 407 | - {fileID: 10100, guid: 0000000000000000e000000000000000, type: 0} 408 | m_StaticBatchInfo: 409 | firstSubMesh: 0 410 | subMeshCount: 0 411 | m_StaticBatchRoot: {fileID: 0} 412 | m_ProbeAnchor: {fileID: 0} 413 | m_LightProbeVolumeOverride: {fileID: 0} 414 | m_ScaleInLightmap: 1 415 | m_PreserveUVs: 0 416 | m_IgnoreNormalsForChartDetection: 0 417 | m_ImportantGI: 0 418 | m_SelectedEditorRenderState: 3 419 | m_MinimumChartSize: 4 420 | m_AutoUVMaxDistance: 0.5 421 | m_AutoUVMaxAngle: 89 422 | m_LightmapParameters: {fileID: 0} 423 | m_SortingLayerID: 0 424 | m_SortingLayer: 0 425 | m_SortingOrder: 0 426 | --- !u!1001 &720148308 427 | Prefab: 428 | m_ObjectHideFlags: 0 429 | serializedVersion: 2 430 | m_Modification: 431 | m_TransformParent: {fileID: 0} 432 | m_Modifications: 433 | - target: {fileID: 4000010560871102, guid: d379ed0a5618c9f479f58bd83a2d0ad3, type: 2} 434 | propertyPath: m_LocalPosition.x 435 | value: 0 436 | objectReference: {fileID: 0} 437 | - target: {fileID: 4000010560871102, guid: d379ed0a5618c9f479f58bd83a2d0ad3, type: 2} 438 | propertyPath: m_LocalPosition.y 439 | value: 0 440 | objectReference: {fileID: 0} 441 | - target: {fileID: 4000010560871102, guid: d379ed0a5618c9f479f58bd83a2d0ad3, type: 2} 442 | propertyPath: m_LocalPosition.z 443 | value: 0 444 | objectReference: {fileID: 0} 445 | - target: {fileID: 4000010560871102, guid: d379ed0a5618c9f479f58bd83a2d0ad3, type: 2} 446 | propertyPath: m_LocalRotation.x 447 | value: 0 448 | objectReference: {fileID: 0} 449 | - target: {fileID: 4000010560871102, guid: d379ed0a5618c9f479f58bd83a2d0ad3, type: 2} 450 | propertyPath: m_LocalRotation.y 451 | value: 0 452 | objectReference: {fileID: 0} 453 | - target: {fileID: 4000010560871102, guid: d379ed0a5618c9f479f58bd83a2d0ad3, type: 2} 454 | propertyPath: m_LocalRotation.z 455 | value: 0 456 | objectReference: {fileID: 0} 457 | - target: {fileID: 4000010560871102, guid: d379ed0a5618c9f479f58bd83a2d0ad3, type: 2} 458 | propertyPath: m_LocalRotation.w 459 | value: 1 460 | objectReference: {fileID: 0} 461 | - target: {fileID: 4000010560871102, guid: d379ed0a5618c9f479f58bd83a2d0ad3, type: 2} 462 | propertyPath: m_RootOrder 463 | value: 0 464 | objectReference: {fileID: 0} 465 | m_RemovedComponents: [] 466 | m_ParentPrefab: {fileID: 100100000, guid: d379ed0a5618c9f479f58bd83a2d0ad3, type: 2} 467 | m_IsPrefabParent: 0 468 | --- !u!1001 &952561341 469 | Prefab: 470 | m_ObjectHideFlags: 0 471 | serializedVersion: 2 472 | m_Modification: 473 | m_TransformParent: {fileID: 0} 474 | m_Modifications: 475 | - target: {fileID: 4746979244701888, guid: 37df7db4c0f53f14eb4178827dcb0a55, type: 2} 476 | propertyPath: m_LocalPosition.x 477 | value: 0 478 | objectReference: {fileID: 0} 479 | - target: {fileID: 4746979244701888, guid: 37df7db4c0f53f14eb4178827dcb0a55, type: 2} 480 | propertyPath: m_LocalPosition.y 481 | value: 0 482 | objectReference: {fileID: 0} 483 | - target: {fileID: 4746979244701888, guid: 37df7db4c0f53f14eb4178827dcb0a55, type: 2} 484 | propertyPath: m_LocalPosition.z 485 | value: 0 486 | objectReference: {fileID: 0} 487 | - target: {fileID: 4746979244701888, guid: 37df7db4c0f53f14eb4178827dcb0a55, type: 2} 488 | propertyPath: m_LocalRotation.x 489 | value: -0 490 | objectReference: {fileID: 0} 491 | - target: {fileID: 4746979244701888, guid: 37df7db4c0f53f14eb4178827dcb0a55, type: 2} 492 | propertyPath: m_LocalRotation.y 493 | value: -0 494 | objectReference: {fileID: 0} 495 | - target: {fileID: 4746979244701888, guid: 37df7db4c0f53f14eb4178827dcb0a55, type: 2} 496 | propertyPath: m_LocalRotation.z 497 | value: -0 498 | objectReference: {fileID: 0} 499 | - target: {fileID: 4746979244701888, guid: 37df7db4c0f53f14eb4178827dcb0a55, type: 2} 500 | propertyPath: m_LocalRotation.w 501 | value: 1 502 | objectReference: {fileID: 0} 503 | - target: {fileID: 4746979244701888, guid: 37df7db4c0f53f14eb4178827dcb0a55, type: 2} 504 | propertyPath: m_RootOrder 505 | value: 3 506 | objectReference: {fileID: 0} 507 | - target: {fileID: 114132533444920518, guid: 37df7db4c0f53f14eb4178827dcb0a55, 508 | type: 2} 509 | propertyPath: textMesh 510 | value: 511 | objectReference: {fileID: 699202045} 512 | m_RemovedComponents: [] 513 | m_ParentPrefab: {fileID: 100100000, guid: 37df7db4c0f53f14eb4178827dcb0a55, type: 2} 514 | m_IsPrefabParent: 0 515 | --- !u!1001 &1638873472 516 | Prefab: 517 | m_ObjectHideFlags: 0 518 | serializedVersion: 2 519 | m_Modification: 520 | m_TransformParent: {fileID: 0} 521 | m_Modifications: 522 | - target: {fileID: 114381507436461726, guid: c21974804d13d6c428a6227b2f98acfd, 523 | type: 2} 524 | propertyPath: udpEvent.m_PersistentCalls.m_Calls.Array.size 525 | value: 1 526 | objectReference: {fileID: 0} 527 | - target: {fileID: 4143569445316468, guid: c21974804d13d6c428a6227b2f98acfd, type: 2} 528 | propertyPath: m_LocalPosition.x 529 | value: 0 530 | objectReference: {fileID: 0} 531 | - target: {fileID: 4143569445316468, guid: c21974804d13d6c428a6227b2f98acfd, type: 2} 532 | propertyPath: m_LocalPosition.y 533 | value: 0 534 | objectReference: {fileID: 0} 535 | - target: {fileID: 4143569445316468, guid: c21974804d13d6c428a6227b2f98acfd, type: 2} 536 | propertyPath: m_LocalPosition.z 537 | value: 0 538 | objectReference: {fileID: 0} 539 | - target: {fileID: 4143569445316468, guid: c21974804d13d6c428a6227b2f98acfd, type: 2} 540 | propertyPath: m_LocalRotation.x 541 | value: 0 542 | objectReference: {fileID: 0} 543 | - target: {fileID: 4143569445316468, guid: c21974804d13d6c428a6227b2f98acfd, type: 2} 544 | propertyPath: m_LocalRotation.y 545 | value: 0 546 | objectReference: {fileID: 0} 547 | - target: {fileID: 4143569445316468, guid: c21974804d13d6c428a6227b2f98acfd, type: 2} 548 | propertyPath: m_LocalRotation.z 549 | value: 0 550 | objectReference: {fileID: 0} 551 | - target: {fileID: 4143569445316468, guid: c21974804d13d6c428a6227b2f98acfd, type: 2} 552 | propertyPath: m_LocalRotation.w 553 | value: 1 554 | objectReference: {fileID: 0} 555 | - target: {fileID: 4143569445316468, guid: c21974804d13d6c428a6227b2f98acfd, type: 2} 556 | propertyPath: m_RootOrder 557 | value: 2 558 | objectReference: {fileID: 0} 559 | - target: {fileID: 1161752430673876, guid: c21974804d13d6c428a6227b2f98acfd, type: 2} 560 | propertyPath: m_Name 561 | value: UDPCommunication_Listener 562 | objectReference: {fileID: 0} 563 | - target: {fileID: 114381507436461726, guid: c21974804d13d6c428a6227b2f98acfd, 564 | type: 2} 565 | propertyPath: udpEvent.m_PersistentCalls.m_Calls.Array.data[0].m_Mode 566 | value: 0 567 | objectReference: {fileID: 0} 568 | - target: {fileID: 114381507436461726, guid: c21974804d13d6c428a6227b2f98acfd, 569 | type: 2} 570 | propertyPath: udpEvent.m_PersistentCalls.m_Calls.Array.data[0].m_CallState 571 | value: 2 572 | objectReference: {fileID: 0} 573 | - target: {fileID: 114381507436461726, guid: c21974804d13d6c428a6227b2f98acfd, 574 | type: 2} 575 | propertyPath: udpEvent.m_PersistentCalls.m_Calls.Array.data[0].m_Target 576 | value: 577 | objectReference: {fileID: 563887090} 578 | - target: {fileID: 114381507436461726, guid: c21974804d13d6c428a6227b2f98acfd, 579 | type: 2} 580 | propertyPath: udpEvent.m_PersistentCalls.m_Calls.Array.data[0].m_MethodName 581 | value: ResponseToUDPPacket 582 | objectReference: {fileID: 0} 583 | - target: {fileID: 114381507436461726, guid: c21974804d13d6c428a6227b2f98acfd, 584 | type: 2} 585 | propertyPath: udpEvent.m_PersistentCalls.m_Calls.Array.data[0].m_Arguments.m_ObjectArgumentAssemblyTypeName 586 | value: UnityEngine.Object, UnityEngine 587 | objectReference: {fileID: 0} 588 | m_RemovedComponents: [] 589 | m_ParentPrefab: {fileID: 100100000, guid: c21974804d13d6c428a6227b2f98acfd, type: 2} 590 | m_IsPrefabParent: 0 591 | -------------------------------------------------------------------------------- /Assets/Scenes/Test.unity.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: e4d2a269ee0364f4db9881f4a29431c9 3 | timeCreated: 1502393752 4 | licenseType: Free 5 | DefaultImporter: 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/Scripts.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 5563b264b5a33374eb80de9cb217380d 3 | folderAsset: yes 4 | timeCreated: 1502392365 5 | licenseType: Free 6 | DefaultImporter: 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /Assets/Scripts/UDPCommunication.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.IO; 3 | using System.Text; 4 | using System.Linq; 5 | using System.Collections.Generic; 6 | using UnityEngine; 7 | using UnityEngine.Events; 8 | 9 | using HoloToolkit.Unity; 10 | 11 | #if !UNITY_EDITOR 12 | using Windows.Networking.Sockets; 13 | using Windows.Networking.Connectivity; 14 | using Windows.Networking; 15 | #endif 16 | 17 | [System.Serializable] 18 | public class UDPMessageEvent : UnityEvent 19 | { 20 | 21 | } 22 | 23 | public class UDPCommunication : MonoBehaviour 24 | { 25 | [Tooltip ("Port to open on HoloLens to send or listen")] 26 | public string internalPort = "11000"; 27 | 28 | [Tooltip("IP address to send to")] 29 | public string externalIP = "192.168.1.130"; 30 | 31 | [Tooltip("Port to send to")] 32 | public string externalPort = "11000"; 33 | 34 | [Tooltip("Send a message on startup")] 35 | public bool sendPingAtStart = true; 36 | 37 | [Tooltip("Contents of the startup message")] 38 | public string PingMessage = "Let there be UDP."; 39 | 40 | [Tooltip("Functions to invoke on packet reception")] 41 | public UDPMessageEvent udpEvent = null; 42 | 43 | private readonly Queue ExecuteOnMainThread = new Queue(); 44 | 45 | 46 | #if !UNITY_EDITOR 47 | 48 | //we've got a message (data[]) from (host) in case of not assigned an event 49 | void UDPMessageReceived(string host, string port, byte[] data) 50 | { 51 | Debug.Log("UDP message from " + host + " on port " + port + ", " + data.Length.ToString() + " bytes "); 52 | } 53 | 54 | //Send a UDP-Packet 55 | public async void SendUDPMessage(string HostIP, string HostPort, byte[] data) 56 | { 57 | await _SendUDPMessage(HostIP, HostPort, data); 58 | } 59 | 60 | 61 | 62 | DatagramSocket socket; 63 | 64 | async void Start() 65 | { 66 | if (udpEvent == null) 67 | { 68 | udpEvent = new UDPMessageEvent(); 69 | udpEvent.AddListener(UDPMessageReceived); 70 | } 71 | 72 | 73 | Debug.Log("Waiting for a connection..."); 74 | 75 | socket = new DatagramSocket(); 76 | socket.MessageReceived += Socket_MessageReceived; 77 | 78 | HostName IP = null; 79 | try 80 | { 81 | var icp = NetworkInformation.GetInternetConnectionProfile(); 82 | 83 | IP = Windows.Networking.Connectivity.NetworkInformation.GetHostNames() 84 | .SingleOrDefault( 85 | hn => 86 | hn.IPInformation?.NetworkAdapter != null && hn.IPInformation.NetworkAdapter.NetworkAdapterId 87 | == icp.NetworkAdapter.NetworkAdapterId); 88 | 89 | await socket.BindEndpointAsync(IP, internalPort); 90 | } 91 | catch (Exception e) 92 | { 93 | Debug.Log(e.ToString()); 94 | Debug.Log(SocketError.GetStatus(e.HResult).ToString()); 95 | return; 96 | } 97 | 98 | if (externalIP != null && externalPort != null && sendPingAtStart) 99 | { 100 | if (PingMessage == null){ 101 | PingMessage = ""; 102 | } 103 | SendUDPMessage(externalIP, externalPort, Encoding.UTF8.GetBytes(PingMessage)); 104 | } 105 | 106 | } 107 | 108 | 109 | 110 | 111 | private async System.Threading.Tasks.Task _SendUDPMessage(string externalIP, string externalPort, byte[] data) 112 | { 113 | using (var stream = await socket.GetOutputStreamAsync(new Windows.Networking.HostName(externalIP), externalPort)) 114 | { 115 | using (var writer = new Windows.Storage.Streams.DataWriter(stream)) 116 | { 117 | writer.WriteBytes(data); 118 | await writer.StoreAsync(); 119 | 120 | } 121 | } 122 | } 123 | 124 | 125 | #else 126 | // to make Unity-Editor happy :-) 127 | void Start() 128 | { 129 | 130 | } 131 | 132 | public void SendUDPMessage(string HostIP, string HostPort, byte[] data) 133 | { 134 | 135 | } 136 | 137 | #endif 138 | 139 | 140 | static MemoryStream ToMemoryStream(Stream input) 141 | { 142 | try 143 | { // Read and write in 144 | byte[] block = new byte[0x1000]; // blocks of 4K. 145 | MemoryStream ms = new MemoryStream(); 146 | while (true) 147 | { 148 | int bytesRead = input.Read(block, 0, block.Length); 149 | if (bytesRead == 0) return ms; 150 | ms.Write(block, 0, bytesRead); 151 | } 152 | } 153 | finally { } 154 | } 155 | 156 | // Update is called once per frame 157 | void Update() 158 | { 159 | while (ExecuteOnMainThread.Count > 0) 160 | { 161 | ExecuteOnMainThread.Dequeue().Invoke(); 162 | 163 | } 164 | } 165 | 166 | #if !UNITY_EDITOR 167 | private void Socket_MessageReceived(Windows.Networking.Sockets.DatagramSocket sender, 168 | Windows.Networking.Sockets.DatagramSocketMessageReceivedEventArgs args) 169 | { 170 | Debug.Log("GOT MESSAGE FROM: " + args.RemoteAddress.DisplayName); 171 | //Read the message that was received from the UDP client. 172 | Stream streamIn = args.GetDataStream().AsStreamForRead(); 173 | MemoryStream ms = ToMemoryStream(streamIn); 174 | byte[] msgData = ms.ToArray(); 175 | 176 | 177 | if (ExecuteOnMainThread.Count == 0) 178 | { 179 | ExecuteOnMainThread.Enqueue(() => 180 | { 181 | Debug.Log("ENQEUED "); 182 | if (udpEvent != null) 183 | udpEvent.Invoke(args.RemoteAddress.DisplayName, internalPort, msgData); 184 | }); 185 | } 186 | } 187 | 188 | 189 | #endif 190 | } 191 | -------------------------------------------------------------------------------- /Assets/Scripts/UDPCommunication.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 3f7374f5349215a4680b769a4e52c156 3 | timeCreated: 1502392457 4 | licenseType: Free 5 | MonoImporter: 6 | serializedVersion: 2 7 | defaultReferences: [] 8 | executionOrder: 0 9 | icon: {instanceID: 0} 10 | userData: 11 | assetBundleName: 12 | assetBundleVariant: 13 | -------------------------------------------------------------------------------- /Assets/Scripts/UDPGeneration.cs: -------------------------------------------------------------------------------- 1 | using System.Collections; 2 | using System.Collections.Generic; 3 | using UnityEngine; 4 | 5 | public class UDPGeneration : MonoBehaviour { 6 | 7 | public GameObject UDPCommGameObject; 8 | 9 | public string DataString = "UDP is real."; 10 | 11 | void Start () { 12 | if (UDPCommGameObject == null) { 13 | Debug.Log ("ERR UDPGEN: UDPSender is required. Self-destructing."); 14 | Destroy (this); 15 | } 16 | } 17 | 18 | void Update () { 19 | if (DataString != null) { 20 | // UTF-8 is real 21 | var dataBytes = System.Text.Encoding.UTF8.GetBytes(DataString); 22 | UDPCommunication comm = UDPCommGameObject.GetComponent (); 23 | 24 | // #if is required because SendUDPMessage() is async 25 | #if !UNITY_EDITOR 26 | comm.SendUDPMessage(comm.externalIP, comm.externalPort, dataBytes); 27 | #endif 28 | } 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /Assets/Scripts/UDPGeneration.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 6c2d684afe656c94fb7c0d751b29a2e0 3 | timeCreated: 1502394701 4 | licenseType: Free 5 | MonoImporter: 6 | serializedVersion: 2 7 | defaultReferences: [] 8 | executionOrder: 0 9 | icon: {instanceID: 0} 10 | userData: 11 | assetBundleName: 12 | assetBundleVariant: 13 | -------------------------------------------------------------------------------- /Assets/Scripts/UDPResponse.cs: -------------------------------------------------------------------------------- 1 | using System.Collections; 2 | using System.Collections.Generic; 3 | using UnityEngine; 4 | 5 | public class UDPResponse : MonoBehaviour { 6 | 7 | public TextMesh textMesh = null; 8 | 9 | void Start () { 10 | 11 | } 12 | 13 | void Update () { 14 | 15 | } 16 | 17 | public void ResponseToUDPPacket(string fromIP, string fromPort, byte[] data) 18 | { 19 | string dataString = System.Text.Encoding.UTF8.GetString (data); 20 | 21 | if (textMesh != null) { 22 | textMesh.text = dataString; 23 | } 24 | } 25 | } -------------------------------------------------------------------------------- /Assets/Scripts/UDPResponse.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 5e691e26db0df734b96d5516e1764044 3 | timeCreated: 1502393540 4 | licenseType: Free 5 | MonoImporter: 6 | serializedVersion: 2 7 | defaultReferences: [] 8 | executionOrder: 0 9 | icon: {instanceID: 0} 10 | userData: 11 | assetBundleName: 12 | assetBundleVariant: 13 | -------------------------------------------------------------------------------- /Assets/WSATestCertificate.pfx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mbaytas/HoloLensUDP/47eef5d65b9f6a0ba25b6d87f9a7c465699c1328/Assets/WSATestCertificate.pfx -------------------------------------------------------------------------------- /Assets/WSATestCertificate.pfx.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 0025a9b1d11f301419794a73c01bacf0 3 | timeCreated: 1502447785 4 | licenseType: Free 5 | DefaultImporter: 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2017 Mehmet Aydın Baytaş 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /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_SpatializerPlugin: 15 | m_DisableAudio: 0 16 | m_VirtualizeEffects: 1 17 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /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 | serializedVersion: 3 7 | m_Gravity: {x: 0, y: -9.81, z: 0} 8 | m_DefaultMaterial: {fileID: 0} 9 | m_BounceThreshold: 2 10 | m_SleepThreshold: 0.005 11 | m_DefaultContactOffset: 0.01 12 | m_DefaultSolverIterations: 6 13 | m_DefaultSolverVelocityIterations: 1 14 | m_QueriesHitBackfaces: 0 15 | m_QueriesHitTriggers: 1 16 | m_EnableAdaptiveForce: 0 17 | m_EnablePCM: 1 18 | m_LayerCollisionMatrix: ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff 19 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /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_DefaultBehaviorMode: 0 10 | m_SpritePackerMode: 0 11 | m_SpritePackerPaddingPower: 1 12 | m_ProjectGenerationIncludedExtensions: txt;xml;fnt;cd 13 | m_ProjectGenerationRootNamespace: 14 | m_UserGeneratedProjectSuffix: 15 | -------------------------------------------------------------------------------- /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: 12 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: 10753, guid: 0000000000000000f000000000000000, type: 0} 37 | - {fileID: 10770, guid: 0000000000000000f000000000000000, type: 0} 38 | - {fileID: 16000, guid: 0000000000000000f000000000000000, type: 0} 39 | m_PreloadedShaders: [] 40 | m_SpritesDefaultMaterial: {fileID: 10754, guid: 0000000000000000f000000000000000, 41 | type: 0} 42 | m_CustomRenderPipeline: {fileID: 0} 43 | m_TransparencySortMode: 0 44 | m_TransparencySortAxis: {x: 0, y: 0, z: 1} 45 | m_DefaultRenderingPath: 1 46 | m_DefaultMobileRenderingPath: 1 47 | m_TierSettings: [] 48 | m_LightmapStripping: 0 49 | m_FogStripping: 0 50 | m_InstancingStripping: 0 51 | m_LightmapKeepPlain: 1 52 | m_LightmapKeepDirCombined: 1 53 | m_LightmapKeepDynamicPlain: 1 54 | m_LightmapKeepDynamicDirCombined: 1 55 | m_LightmapKeepShadowMask: 1 56 | m_LightmapKeepSubtractive: 1 57 | m_FogKeepLinear: 1 58 | m_FogKeepExp: 1 59 | m_FogKeepExp2: 1 60 | m_AlbedoSwatchInfos: [] 61 | m_LightsUseLinearIntensity: 0 62 | m_LightsUseColorTemperature: 0 63 | -------------------------------------------------------------------------------- /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: 0.001 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: 0.001 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: 0.001 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: 0.001 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: 0.001 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: 0.001 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: 0.1 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: 0.1 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: 0.1 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: 0.19 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: 0.19 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: 0.001 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: 0.001 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: 0.001 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: 0.001 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: 0.001 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: 0.001 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: 0.001 290 | sensitivity: 1000 291 | snap: 0 292 | invert: 0 293 | type: 0 294 | axis: 0 295 | joyNum: 0 296 | -------------------------------------------------------------------------------- /ProjectSettings/NavMeshAreas.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!126 &1 4 | NavMeshProjectSettings: 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 | m_LastAgentTypeID: -887442657 73 | m_Settings: 74 | - serializedVersion: 2 75 | agentTypeID: 0 76 | agentRadius: 0.5 77 | agentHeight: 2 78 | agentSlope: 45 79 | agentClimb: 0.75 80 | ledgeDropHeight: 0 81 | maxJumpAcrossDistance: 0 82 | minRegionArea: 2 83 | manualCellSize: 0 84 | cellSize: 0.16666667 85 | manualTileSize: 0 86 | tileSize: 256 87 | accuratePlacement: 0 88 | m_SettingNames: 89 | - Humanoid 90 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /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 | serializedVersion: 3 7 | m_Gravity: {x: 0, y: -9.81} 8 | m_DefaultMaterial: {fileID: 0} 9 | m_VelocityIterations: 8 10 | m_PositionIterations: 3 11 | m_VelocityThreshold: 1 12 | m_MaxLinearCorrection: 0.2 13 | m_MaxAngularCorrection: 8 14 | m_MaxTranslationSpeed: 100 15 | m_MaxRotationSpeed: 360 16 | m_BaumgarteScale: 0.2 17 | m_BaumgarteTimeOfImpactScale: 0.75 18 | m_TimeToSleep: 0.5 19 | m_LinearSleepTolerance: 0.01 20 | m_AngularSleepTolerance: 2 21 | m_DefaultContactOffset: 0.01 22 | m_QueriesHitTriggers: 1 23 | m_QueriesStartInColliders: 1 24 | m_ChangeStopsCallbacks: 0 25 | m_CallbacksOnDisable: 1 26 | m_AlwaysShowColliders: 0 27 | m_ShowColliderSleep: 1 28 | m_ShowColliderContacts: 0 29 | m_ShowColliderAABB: 0 30 | m_ContactArrowScale: 0.2 31 | m_ColliderAwakeColor: {r: 0.5686275, g: 0.95686275, b: 0.54509807, a: 0.7529412} 32 | m_ColliderAsleepColor: {r: 0.5686275, g: 0.95686275, b: 0.54509807, a: 0.36078432} 33 | m_ColliderContactColor: {r: 1, g: 0, b: 1, a: 0.6862745} 34 | m_ColliderAABBColor: {r: 1, g: 1, b: 0, a: 0.2509804} 35 | m_LayerCollisionMatrix: ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff 36 | -------------------------------------------------------------------------------- /ProjectSettings/ProjectSettings.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!129 &1 4 | PlayerSettings: 5 | m_ObjectHideFlags: 0 6 | serializedVersion: 11 7 | productGUID: 0bc6a866ec1a50a438dc8af5359f2fa6 8 | AndroidProfiler: 0 9 | defaultScreenOrientation: 4 10 | targetDevice: 2 11 | useOnDemandResources: 0 12 | accelerometerFrequency: 60 13 | companyName: DefaultCompany 14 | productName: HololensUDP 15 | defaultCursor: {fileID: 0} 16 | cursorHotspot: {x: 0, y: 0} 17 | m_SplashScreenBackgroundColor: {r: 0.13333334, g: 0.17254902, b: 0.21176471, a: 1} 18 | m_ShowUnitySplashScreen: 1 19 | m_ShowUnitySplashLogo: 1 20 | m_SplashScreenOverlayOpacity: 1 21 | m_SplashScreenAnimation: 1 22 | m_SplashScreenLogoStyle: 1 23 | m_SplashScreenDrawMode: 0 24 | m_SplashScreenBackgroundAnimationZoom: 1 25 | m_SplashScreenLogoAnimationZoom: 1 26 | m_SplashScreenBackgroundLandscapeAspect: 1 27 | m_SplashScreenBackgroundPortraitAspect: 1 28 | m_SplashScreenBackgroundLandscapeUvs: 29 | serializedVersion: 2 30 | x: 0 31 | y: 0 32 | width: 1 33 | height: 1 34 | m_SplashScreenBackgroundPortraitUvs: 35 | serializedVersion: 2 36 | x: 0 37 | y: 0 38 | width: 1 39 | height: 1 40 | m_SplashScreenLogos: [] 41 | m_SplashScreenBackgroundLandscape: {fileID: 0} 42 | m_SplashScreenBackgroundPortrait: {fileID: 0} 43 | m_VirtualRealitySplashScreen: {fileID: 0} 44 | m_HolographicTrackingLossScreen: {fileID: 0} 45 | defaultScreenWidth: 1024 46 | defaultScreenHeight: 768 47 | defaultScreenWidthWeb: 960 48 | defaultScreenHeightWeb: 600 49 | m_StereoRenderingPath: 0 50 | m_ActiveColorSpace: 0 51 | m_MTRendering: 1 52 | m_MobileMTRendering: 0 53 | m_StackTraceTypes: 010000000100000001000000010000000100000001000000 54 | iosShowActivityIndicatorOnLoading: -1 55 | androidShowActivityIndicatorOnLoading: -1 56 | tizenShowActivityIndicatorOnLoading: -1 57 | iosAppInBackgroundBehavior: 0 58 | displayResolutionDialog: 1 59 | iosAllowHTTPDownload: 1 60 | allowedAutorotateToPortrait: 1 61 | allowedAutorotateToPortraitUpsideDown: 1 62 | allowedAutorotateToLandscapeRight: 1 63 | allowedAutorotateToLandscapeLeft: 1 64 | useOSAutorotation: 1 65 | use32BitDisplayBuffer: 1 66 | disableDepthAndStencilBuffers: 0 67 | defaultIsFullScreen: 1 68 | defaultIsNativeResolution: 1 69 | runInBackground: 0 70 | captureSingleScreen: 0 71 | muteOtherAudioSources: 0 72 | Prepare IOS For Recording: 0 73 | submitAnalytics: 1 74 | usePlayerLog: 1 75 | bakeCollisionMeshes: 0 76 | forceSingleInstance: 0 77 | resizableWindow: 0 78 | useMacAppStoreValidation: 0 79 | macAppStoreCategory: public.app-category.games 80 | gpuSkinning: 0 81 | graphicsJobs: 0 82 | xboxPIXTextureCapture: 0 83 | xboxEnableAvatar: 0 84 | xboxEnableKinect: 0 85 | xboxEnableKinectAutoTracking: 0 86 | xboxEnableFitness: 0 87 | visibleInBackground: 0 88 | allowFullscreenSwitch: 1 89 | graphicsJobMode: 0 90 | macFullscreenMode: 2 91 | d3d9FullscreenMode: 1 92 | d3d11FullscreenMode: 1 93 | xboxSpeechDB: 0 94 | xboxEnableHeadOrientation: 0 95 | xboxEnableGuest: 0 96 | xboxEnablePIXSampling: 0 97 | n3dsDisableStereoscopicView: 0 98 | n3dsEnableSharedListOpt: 1 99 | n3dsEnableVSync: 0 100 | ignoreAlphaClear: 0 101 | xboxOneResolution: 0 102 | xboxOneMonoLoggingLevel: 0 103 | xboxOneLoggingLevel: 1 104 | videoMemoryForVertexBuffers: 0 105 | psp2PowerMode: 0 106 | psp2AcquireBGM: 1 107 | wiiUTVResolution: 0 108 | wiiUGamePadMSAA: 1 109 | wiiUSupportsNunchuk: 0 110 | wiiUSupportsClassicController: 0 111 | wiiUSupportsBalanceBoard: 0 112 | wiiUSupportsMotionPlus: 0 113 | wiiUSupportsProController: 0 114 | wiiUAllowScreenCapture: 1 115 | wiiUControllerCount: 0 116 | m_SupportedAspectRatios: 117 | 4:3: 1 118 | 5:4: 1 119 | 16:10: 1 120 | 16:9: 1 121 | Others: 1 122 | bundleVersion: 1.0 123 | preloadedAssets: [] 124 | metroInputSource: 0 125 | m_HolographicPauseOnTrackingLoss: 1 126 | xboxOneDisableKinectGpuReservation: 0 127 | xboxOneEnable7thCore: 0 128 | vrSettings: 129 | cardboard: 130 | depthFormat: 0 131 | enableTransitionView: 0 132 | daydream: 133 | depthFormat: 0 134 | useSustainedPerformanceMode: 0 135 | hololens: 136 | depthFormat: 1 137 | protectGraphicsMemory: 0 138 | useHDRDisplay: 0 139 | applicationIdentifier: {} 140 | buildNumber: {} 141 | AndroidBundleVersionCode: 1 142 | AndroidMinSdkVersion: 16 143 | AndroidTargetSdkVersion: 0 144 | AndroidPreferredInstallLocation: 1 145 | aotOptions: 146 | stripEngineCode: 1 147 | iPhoneStrippingLevel: 0 148 | iPhoneScriptCallOptimization: 0 149 | ForceInternetPermission: 0 150 | ForceSDCardPermission: 0 151 | CreateWallpaper: 0 152 | APKExpansionFiles: 0 153 | keepLoadedShadersAlive: 0 154 | StripUnusedMeshComponents: 0 155 | VertexChannelCompressionMask: 156 | serializedVersion: 2 157 | m_Bits: 238 158 | iPhoneSdkVersion: 988 159 | iOSTargetOSVersionString: 160 | tvOSSdkVersion: 0 161 | tvOSRequireExtendedGameController: 0 162 | tvOSTargetOSVersionString: 163 | uIPrerenderedIcon: 0 164 | uIRequiresPersistentWiFi: 0 165 | uIRequiresFullScreen: 1 166 | uIStatusBarHidden: 1 167 | uIExitOnSuspend: 0 168 | uIStatusBarStyle: 0 169 | iPhoneSplashScreen: {fileID: 0} 170 | iPhoneHighResSplashScreen: {fileID: 0} 171 | iPhoneTallHighResSplashScreen: {fileID: 0} 172 | iPhone47inSplashScreen: {fileID: 0} 173 | iPhone55inPortraitSplashScreen: {fileID: 0} 174 | iPhone55inLandscapeSplashScreen: {fileID: 0} 175 | iPadPortraitSplashScreen: {fileID: 0} 176 | iPadHighResPortraitSplashScreen: {fileID: 0} 177 | iPadLandscapeSplashScreen: {fileID: 0} 178 | iPadHighResLandscapeSplashScreen: {fileID: 0} 179 | appleTVSplashScreen: {fileID: 0} 180 | tvOSSmallIconLayers: [] 181 | tvOSLargeIconLayers: [] 182 | tvOSTopShelfImageLayers: [] 183 | tvOSTopShelfImageWideLayers: [] 184 | iOSLaunchScreenType: 0 185 | iOSLaunchScreenPortrait: {fileID: 0} 186 | iOSLaunchScreenLandscape: {fileID: 0} 187 | iOSLaunchScreenBackgroundColor: 188 | serializedVersion: 2 189 | rgba: 0 190 | iOSLaunchScreenFillPct: 100 191 | iOSLaunchScreenSize: 100 192 | iOSLaunchScreenCustomXibPath: 193 | iOSLaunchScreeniPadType: 0 194 | iOSLaunchScreeniPadImage: {fileID: 0} 195 | iOSLaunchScreeniPadBackgroundColor: 196 | serializedVersion: 2 197 | rgba: 0 198 | iOSLaunchScreeniPadFillPct: 100 199 | iOSLaunchScreeniPadSize: 100 200 | iOSLaunchScreeniPadCustomXibPath: 201 | iOSDeviceRequirements: [] 202 | iOSURLSchemes: [] 203 | iOSBackgroundModes: 0 204 | iOSMetalForceHardShadows: 0 205 | metalEditorSupport: 1 206 | metalAPIValidation: 1 207 | iOSRenderExtraFrameOnPause: 0 208 | appleDeveloperTeamID: 209 | iOSManualSigningProvisioningProfileID: 210 | tvOSManualSigningProvisioningProfileID: 211 | appleEnableAutomaticSigning: 0 212 | AndroidTargetDevice: 0 213 | AndroidSplashScreenScale: 0 214 | androidSplashScreen: {fileID: 0} 215 | AndroidKeystoreName: 216 | AndroidKeyaliasName: 217 | AndroidTVCompatibility: 1 218 | AndroidIsGame: 1 219 | androidEnableBanner: 1 220 | m_AndroidBanners: 221 | - width: 320 222 | height: 180 223 | banner: {fileID: 0} 224 | androidGamepadSupportLevel: 0 225 | resolutionDialogBanner: {fileID: 0} 226 | m_BuildTargetIcons: [] 227 | m_BuildTargetBatching: [] 228 | m_BuildTargetGraphicsAPIs: [] 229 | m_BuildTargetVRSettings: 230 | - m_BuildTarget: Metro 231 | m_Enabled: 1 232 | m_Devices: 233 | - HoloLens 234 | openGLRequireES31: 0 235 | openGLRequireES31AEP: 0 236 | webPlayerTemplate: APPLICATION:Default 237 | m_TemplateCustomTags: {} 238 | wiiUTitleID: 0005000011000000 239 | wiiUGroupID: 00010000 240 | wiiUCommonSaveSize: 4096 241 | wiiUAccountSaveSize: 2048 242 | wiiUOlvAccessKey: 0 243 | wiiUTinCode: 0 244 | wiiUJoinGameId: 0 245 | wiiUJoinGameModeMask: 0000000000000000 246 | wiiUCommonBossSize: 0 247 | wiiUAccountBossSize: 0 248 | wiiUAddOnUniqueIDs: [] 249 | wiiUMainThreadStackSize: 3072 250 | wiiULoaderThreadStackSize: 1024 251 | wiiUSystemHeapSize: 128 252 | wiiUTVStartupScreen: {fileID: 0} 253 | wiiUGamePadStartupScreen: {fileID: 0} 254 | wiiUDrcBufferDisabled: 0 255 | wiiUProfilerLibPath: 256 | playModeTestRunnerEnabled: 0 257 | actionOnDotNetUnhandledException: 1 258 | enableInternalProfiler: 0 259 | logObjCUncaughtExceptions: 1 260 | enableCrashReportAPI: 0 261 | cameraUsageDescription: 262 | locationUsageDescription: 263 | microphoneUsageDescription: 264 | switchNetLibKey: 265 | switchSocketMemoryPoolSize: 6144 266 | switchSocketAllocatorPoolSize: 128 267 | switchSocketConcurrencyLimit: 14 268 | switchUseCPUProfiler: 0 269 | switchApplicationID: 0x0005000C10000001 270 | switchNSODependencies: 271 | switchTitleNames_0: 272 | switchTitleNames_1: 273 | switchTitleNames_2: 274 | switchTitleNames_3: 275 | switchTitleNames_4: 276 | switchTitleNames_5: 277 | switchTitleNames_6: 278 | switchTitleNames_7: 279 | switchTitleNames_8: 280 | switchTitleNames_9: 281 | switchTitleNames_10: 282 | switchTitleNames_11: 283 | switchTitleNames_12: 284 | switchTitleNames_13: 285 | switchTitleNames_14: 286 | switchPublisherNames_0: 287 | switchPublisherNames_1: 288 | switchPublisherNames_2: 289 | switchPublisherNames_3: 290 | switchPublisherNames_4: 291 | switchPublisherNames_5: 292 | switchPublisherNames_6: 293 | switchPublisherNames_7: 294 | switchPublisherNames_8: 295 | switchPublisherNames_9: 296 | switchPublisherNames_10: 297 | switchPublisherNames_11: 298 | switchPublisherNames_12: 299 | switchPublisherNames_13: 300 | switchPublisherNames_14: 301 | switchIcons_0: {fileID: 0} 302 | switchIcons_1: {fileID: 0} 303 | switchIcons_2: {fileID: 0} 304 | switchIcons_3: {fileID: 0} 305 | switchIcons_4: {fileID: 0} 306 | switchIcons_5: {fileID: 0} 307 | switchIcons_6: {fileID: 0} 308 | switchIcons_7: {fileID: 0} 309 | switchIcons_8: {fileID: 0} 310 | switchIcons_9: {fileID: 0} 311 | switchIcons_10: {fileID: 0} 312 | switchIcons_11: {fileID: 0} 313 | switchIcons_12: {fileID: 0} 314 | switchIcons_13: {fileID: 0} 315 | switchIcons_14: {fileID: 0} 316 | switchSmallIcons_0: {fileID: 0} 317 | switchSmallIcons_1: {fileID: 0} 318 | switchSmallIcons_2: {fileID: 0} 319 | switchSmallIcons_3: {fileID: 0} 320 | switchSmallIcons_4: {fileID: 0} 321 | switchSmallIcons_5: {fileID: 0} 322 | switchSmallIcons_6: {fileID: 0} 323 | switchSmallIcons_7: {fileID: 0} 324 | switchSmallIcons_8: {fileID: 0} 325 | switchSmallIcons_9: {fileID: 0} 326 | switchSmallIcons_10: {fileID: 0} 327 | switchSmallIcons_11: {fileID: 0} 328 | switchSmallIcons_12: {fileID: 0} 329 | switchSmallIcons_13: {fileID: 0} 330 | switchSmallIcons_14: {fileID: 0} 331 | switchManualHTML: 332 | switchAccessibleURLs: 333 | switchLegalInformation: 334 | switchMainThreadStackSize: 1048576 335 | switchPresenceGroupId: 0x0005000C10000001 336 | switchLogoHandling: 0 337 | switchReleaseVersion: 0 338 | switchDisplayVersion: 1.0.0 339 | switchStartupUserAccount: 0 340 | switchTouchScreenUsage: 0 341 | switchSupportedLanguagesMask: 0 342 | switchLogoType: 0 343 | switchApplicationErrorCodeCategory: 344 | switchUserAccountSaveDataSize: 0 345 | switchUserAccountSaveDataJournalSize: 0 346 | switchAttribute: 0 347 | switchCardSpecSize: 4 348 | switchCardSpecClock: 25 349 | switchRatingsMask: 0 350 | switchRatingsInt_0: 0 351 | switchRatingsInt_1: 0 352 | switchRatingsInt_2: 0 353 | switchRatingsInt_3: 0 354 | switchRatingsInt_4: 0 355 | switchRatingsInt_5: 0 356 | switchRatingsInt_6: 0 357 | switchRatingsInt_7: 0 358 | switchRatingsInt_8: 0 359 | switchRatingsInt_9: 0 360 | switchRatingsInt_10: 0 361 | switchRatingsInt_11: 0 362 | switchLocalCommunicationIds_0: 0x0005000C10000001 363 | switchLocalCommunicationIds_1: 364 | switchLocalCommunicationIds_2: 365 | switchLocalCommunicationIds_3: 366 | switchLocalCommunicationIds_4: 367 | switchLocalCommunicationIds_5: 368 | switchLocalCommunicationIds_6: 369 | switchLocalCommunicationIds_7: 370 | switchParentalControl: 0 371 | switchAllowsScreenshot: 1 372 | switchDataLossConfirmation: 0 373 | ps4NPAgeRating: 12 374 | ps4NPTitleSecret: 375 | ps4NPTrophyPackPath: 376 | ps4ParentalLevel: 1 377 | ps4ContentID: ED1633-NPXX51362_00-0000000000000000 378 | ps4Category: 0 379 | ps4MasterVersion: 01.00 380 | ps4AppVersion: 01.00 381 | ps4AppType: 0 382 | ps4ParamSfxPath: 383 | ps4VideoOutPixelFormat: 0 384 | ps4VideoOutInitialWidth: 1920 385 | ps4VideoOutBaseModeInitialWidth: 1920 386 | ps4VideoOutReprojectionRate: 120 387 | ps4PronunciationXMLPath: 388 | ps4PronunciationSIGPath: 389 | ps4BackgroundImagePath: 390 | ps4StartupImagePath: 391 | ps4SaveDataImagePath: 392 | ps4SdkOverride: 393 | ps4BGMPath: 394 | ps4ShareFilePath: 395 | ps4ShareOverlayImagePath: 396 | ps4PrivacyGuardImagePath: 397 | ps4NPtitleDatPath: 398 | ps4RemotePlayKeyAssignment: -1 399 | ps4RemotePlayKeyMappingDir: 400 | ps4PlayTogetherPlayerCount: 0 401 | ps4EnterButtonAssignment: 1 402 | ps4ApplicationParam1: 0 403 | ps4ApplicationParam2: 0 404 | ps4ApplicationParam3: 0 405 | ps4ApplicationParam4: 0 406 | ps4DownloadDataSize: 0 407 | ps4GarlicHeapSize: 2048 408 | ps4ProGarlicHeapSize: 2560 409 | ps4Passcode: frAQBc8Wsa1xVPfvJcrgRYwTiizs2trQ 410 | ps4UseDebugIl2cppLibs: 0 411 | ps4pnSessions: 1 412 | ps4pnPresence: 1 413 | ps4pnFriends: 1 414 | ps4pnGameCustomData: 1 415 | playerPrefsSupport: 0 416 | restrictedAudioUsageRights: 0 417 | ps4UseResolutionFallback: 0 418 | ps4ReprojectionSupport: 0 419 | ps4UseAudio3dBackend: 0 420 | ps4SocialScreenEnabled: 0 421 | ps4ScriptOptimizationLevel: 3 422 | ps4Audio3dVirtualSpeakerCount: 14 423 | ps4attribCpuUsage: 0 424 | ps4PatchPkgPath: 425 | ps4PatchLatestPkgPath: 426 | ps4PatchChangeinfoPath: 427 | ps4PatchDayOne: 0 428 | ps4attribUserManagement: 0 429 | ps4attribMoveSupport: 0 430 | ps4attrib3DSupport: 0 431 | ps4attribShareSupport: 0 432 | ps4attribExclusiveVR: 0 433 | ps4disableAutoHideSplash: 0 434 | ps4videoRecordingFeaturesUsed: 0 435 | ps4contentSearchFeaturesUsed: 0 436 | ps4attribEyeToEyeDistanceSettingVR: 0 437 | ps4IncludedModules: [] 438 | monoEnv: 439 | psp2Splashimage: {fileID: 0} 440 | psp2NPTrophyPackPath: 441 | psp2NPSupportGBMorGJP: 0 442 | psp2NPAgeRating: 12 443 | psp2NPTitleDatPath: 444 | psp2NPCommsID: 445 | psp2NPCommunicationsID: 446 | psp2NPCommsPassphrase: 447 | psp2NPCommsSig: 448 | psp2ParamSfxPath: 449 | psp2ManualPath: 450 | psp2LiveAreaGatePath: 451 | psp2LiveAreaBackroundPath: 452 | psp2LiveAreaPath: 453 | psp2LiveAreaTrialPath: 454 | psp2PatchChangeInfoPath: 455 | psp2PatchOriginalPackage: 456 | psp2PackagePassword: F69AzBlax3CF3EDNhm3soLBPh71Yexui 457 | psp2KeystoneFile: 458 | psp2MemoryExpansionMode: 0 459 | psp2DRMType: 0 460 | psp2StorageType: 0 461 | psp2MediaCapacity: 0 462 | psp2DLCConfigPath: 463 | psp2ThumbnailPath: 464 | psp2BackgroundPath: 465 | psp2SoundPath: 466 | psp2TrophyCommId: 467 | psp2TrophyPackagePath: 468 | psp2PackagedResourcesPath: 469 | psp2SaveDataQuota: 10240 470 | psp2ParentalLevel: 1 471 | psp2ShortTitle: Not Set 472 | psp2ContentID: IV0000-ABCD12345_00-0123456789ABCDEF 473 | psp2Category: 0 474 | psp2MasterVersion: 01.00 475 | psp2AppVersion: 01.00 476 | psp2TVBootMode: 0 477 | psp2EnterButtonAssignment: 2 478 | psp2TVDisableEmu: 0 479 | psp2AllowTwitterDialog: 1 480 | psp2Upgradable: 0 481 | psp2HealthWarning: 0 482 | psp2UseLibLocation: 0 483 | psp2InfoBarOnStartup: 0 484 | psp2InfoBarColor: 0 485 | psp2UseDebugIl2cppLibs: 0 486 | psmSplashimage: {fileID: 0} 487 | splashScreenBackgroundSourceLandscape: {fileID: 0} 488 | splashScreenBackgroundSourcePortrait: {fileID: 0} 489 | spritePackerPolicy: 490 | webGLMemorySize: 256 491 | webGLExceptionSupport: 1 492 | webGLNameFilesAsHashes: 0 493 | webGLDataCaching: 0 494 | webGLDebugSymbols: 0 495 | webGLEmscriptenArgs: 496 | webGLModulesDirectory: 497 | webGLTemplate: APPLICATION:Default 498 | webGLAnalyzeBuildSize: 0 499 | webGLUseEmbeddedResources: 0 500 | webGLUseWasm: 0 501 | webGLCompressionFormat: 1 502 | scriptingDefineSymbols: 503 | 14: 504 | platformArchitecture: {} 505 | scriptingBackend: {} 506 | incrementalIl2cppBuild: {} 507 | additionalIl2CppArgs: 508 | apiCompatibilityLevelPerPlatform: {} 509 | m_RenderingPath: 1 510 | m_MobileRenderingPath: 1 511 | metroPackageName: HololensUDP 512 | metroPackageVersion: 513 | metroCertificatePath: Assets\WSATestCertificate.pfx 514 | metroCertificatePassword: 515 | metroCertificateSubject: DefaultCompany 516 | metroCertificateIssuer: DefaultCompany 517 | metroCertificateNotAfter: 800acf719131d401 518 | metroApplicationDescription: HololensUDP 519 | wsaImages: {} 520 | metroTileShortName: 521 | metroCommandLineArgsFile: 522 | metroTileShowName: 0 523 | metroMediumTileShowName: 0 524 | metroLargeTileShowName: 0 525 | metroWideTileShowName: 0 526 | metroDefaultTileSize: 1 527 | metroTileForegroundText: 2 528 | metroTileBackgroundColor: {r: 0.13333334, g: 0.17254902, b: 0.21568628, a: 0} 529 | metroSplashScreenBackgroundColor: {r: 0.12941177, g: 0.17254902, b: 0.21568628, 530 | a: 1} 531 | metroSplashScreenUseBackgroundColor: 0 532 | platformCapabilities: 533 | WindowsStoreApps: 534 | InternetClient: True 535 | Microphone: False 536 | SpatialPerception: False 537 | WebCam: False 538 | metroFTAName: 539 | metroFTAFileTypes: [] 540 | metroProtocolName: 541 | metroCompilationOverrides: 1 542 | tizenProductDescription: 543 | tizenProductURL: 544 | tizenSigningProfileName: 545 | tizenGPSPermissions: 0 546 | tizenMicrophonePermissions: 0 547 | tizenDeploymentTarget: 548 | tizenDeploymentTargetType: -1 549 | tizenMinOSVersion: 1 550 | n3dsUseExtSaveData: 0 551 | n3dsCompressStaticMem: 1 552 | n3dsExtSaveDataNumber: 0x12345 553 | n3dsStackSize: 131072 554 | n3dsTargetPlatform: 2 555 | n3dsRegion: 7 556 | n3dsMediaSize: 0 557 | n3dsLogoStyle: 3 558 | n3dsTitle: GameName 559 | n3dsProductCode: 560 | n3dsApplicationId: 0xFF3FF 561 | stvDeviceAddress: 562 | stvProductDescription: 563 | stvProductAuthor: 564 | stvProductAuthorEmail: 565 | stvProductLink: 566 | stvProductCategory: 0 567 | XboxOneProductId: 568 | XboxOneUpdateKey: 569 | XboxOneSandboxId: 570 | XboxOneContentId: 571 | XboxOneTitleId: 572 | XboxOneSCId: 573 | XboxOneGameOsOverridePath: 574 | XboxOnePackagingOverridePath: 575 | XboxOneAppManifestOverridePath: 576 | XboxOnePackageEncryption: 0 577 | XboxOnePackageUpdateGranularity: 2 578 | XboxOneDescription: 579 | XboxOneLanguage: 580 | - enus 581 | XboxOneCapability: [] 582 | XboxOneGameRating: {} 583 | XboxOneIsContentPackage: 0 584 | XboxOneEnableGPUVariability: 0 585 | XboxOneSockets: {} 586 | XboxOneSplashScreen: {fileID: 0} 587 | XboxOneAllowedProductIds: [] 588 | XboxOnePersistentLocalStorageSize: 0 589 | xboxOneScriptCompiler: 0 590 | vrEditorSettings: 591 | daydream: 592 | daydreamIconForeground: {fileID: 0} 593 | daydreamIconBackground: {fileID: 0} 594 | cloudServicesEnabled: 595 | UNet: 1 596 | facebookSdkVersion: 7.9.1 597 | apiCompatibilityLevel: 2 598 | cloudProjectId: 8f828cb3-75dc-4141-8abe-95798c669fe9 599 | projectName: HololensUDP 600 | organizationId: mbaytas 601 | cloudEnabled: 0 602 | enableNewInputSystem: 0 603 | -------------------------------------------------------------------------------- /ProjectSettings/ProjectVersion.txt: -------------------------------------------------------------------------------- 1 | m_EditorVersion: 5.6.1f1 2 | -------------------------------------------------------------------------------- /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: 5 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: 1 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: 2 167 | Nintendo 3DS: 5 168 | PS4: 5 169 | PSM: 5 170 | PSP2: 2 171 | Samsung TV: 2 172 | Standalone: 5 173 | Tizen: 2 174 | Web: 5 175 | WebGL: 3 176 | WiiU: 5 177 | Windows Store Apps: 0 178 | XboxOne: 5 179 | iPhone: 2 180 | tvOS: 2 181 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /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: 0.02 7 | Maximum Allowed Timestep: 0.33333334 8 | m_TimeScale: 1 9 | Maximum Particle Timestep: 0.03 10 | -------------------------------------------------------------------------------- /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 | m_TestInitMode: 0 11 | CrashReportingSettings: 12 | m_EventUrl: https://perf-events.cloud.unity3d.com/api/events/crashes 13 | m_Enabled: 0 14 | m_CaptureEditorExceptions: 1 15 | UnityPurchasingSettings: 16 | m_Enabled: 0 17 | m_TestMode: 0 18 | UnityAnalyticsSettings: 19 | m_Enabled: 1 20 | m_InitializeOnStartup: 1 21 | m_TestMode: 0 22 | m_TestEventUrl: 23 | m_TestConfigUrl: 24 | UnityAdsSettings: 25 | m_Enabled: 0 26 | m_InitializeOnStartup: 1 27 | m_TestMode: 0 28 | m_EnabledPlatforms: 4294967295 29 | m_IosGameId: 30 | m_AndroidGameId: 31 | PerformanceReportingSettings: 32 | m_Enabled: 0 33 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # HoloLensUDP 2 | 3 | [![unstable](http://badges.github.io/stability-badges/dist/unstable.svg)](http://github.com/badges/stability-badges) 4 | 5 | Unity prefabs and scripts for UDP communication between Microsoft HoloLens and arbitrary machines. 6 | 7 | - **Prefabs** 8 | - **UDPCommunication**: Foundation prefab that does most of the work. You must have this in the scene and set it up correctly. For most purposes you can get away without modifying this at all. 9 | - **UDPResponder**: Prefab with UDPResponse script, for responding to incoming messages. 10 | - **UDPGenerator**: Prefab with UDPGeneration script, for sending messages. 11 | - **Scripts** 12 | - **UDPCommunication**: Implements UDP communication functionality. For most purposes you shouldn't have to modify this. 13 | - **UDPResponse**: Implements example behavior for sending UDP messages on each Update. You can modify this, but you can also set its the DataString property externally. 14 | - **UDPGeneration**: Implements example behavior for responding to incoming UDP messages. You will probably have to modify this. 15 | - **Scenes** 16 | - **Test**: Test/demo scene that shows how it all comes together. 17 | 18 | Derived from [this post by DrNeurosurg on the Windows Mixed Reality Developer Forum](https://forums.hololens.com/discussion/7980/udp-communication-solved). 19 | 20 | This is only Unity assets for one HoloLens. You're going to need to have someone else to talk to. Check out [QualisysUDP](https://github.com/mbaytas/QualisysUDP) for talking to a motion capture system, and [MyoUDP](https://github.com/mbaytas/MyoUDP) for talking to Myo armbands. 21 | 22 | **These assets do not work inside the Unity editor / HoloLens emulator. They must be deployed on HoloLens device to function.** This is because the HoloLens uses the asynchronous programming features in UWP, which Unity currently does not support, so a lot of functionality comes inside '#if !UNITY_EDITOR' blocks. 23 | 24 | ## Dependencies 25 | 26 | Requires [HoloToolkit-Unity](https://github.com/Microsoft/HoloToolkit-Unity) (v1.5.7), because I can't live without its Build Window. 27 | 28 | ## Instructions 29 | 30 | ### ...for People Who Know What They Are Doing 31 | 32 | 1) Drop in the UDPCommunication prefab. This can be configured as a sender, listener, or both. (I found it preferable to have different instances and set different port numbers for sending and listening.) Listeners and senders will both need an Internal Port number, an External IP, and an External Port, as well as the Send Ping property set to true. Only the listener requires a UDP Event. 33 | 34 | 2) Drop in a UDPResponder or UDPGenerator prefab. The UDPResponder needs to be hooked up using the UDPEvent property on the UDPCommunication prefab; then you can modify the UDPResponse script to change behavior. The UDPGenerator has a UDPCommGameObject property to hook it up, and a string property you can set; or you could modify its code. 35 | 36 | ### ...for N00bs 37 | 38 | 1) Clone/download and copy into own project. 39 | 40 | 2) Import [HoloToolkit-Unity](https://github.com/Microsoft/HoloToolkit-Unity). If this is the first time you have done this, feel enlightened. 41 | 42 | 3) Open up the scene called Test.. 43 | 44 | 3) Observe that there are four important game objects in the scene: UDPCommunication_Listener, UDPResponder, UDPCommunication_Sender, and UDPGenerator. 45 | 46 | 4) Observe that UDPCommunication_Listener and UDPCommunication_Sender are instances of the same UDPCommunication prefab. 47 | 48 | 5) Read and try to make sense of the previous section. If you fail, Google the following: Unity tutorials, UDP communication. 49 | 50 | 6) Deploy on device. It will not work inside the Unity editor / HoloLens emulator. 51 | 52 | ## Notes 53 | 54 | - I found it preferable to set up different listeners and senders for different concerns/streams, rather than having only one of each to handle everything. 55 | 56 | - You might get non-specific errors when building for the device. These sometimes happen randomly. Just try again. 57 | 58 | --- 59 | 60 | This is derived from my work with [Qualisys AB](http://www.qualisys.com/), the [HAPPERN research group at Koç University](https://happern.ku.edu.tr/), and the [t2i Interaction Laboratory at Chalmers University of Technology](http://t2i.se/). 61 | --------------------------------------------------------------------------------