├── .gitignore ├── LICENSE ├── NativeSpoutPlugin ├── bin │ ├── x64 │ │ └── NativeSpoutPlugin.dll │ └── x86 │ │ └── NativeSpoutPlugin.dll ├── dependencies │ ├── x64 │ │ ├── msvcp110.dll │ │ └── msvcr110.dll │ └── x86 │ │ ├── msvcp110.dll │ │ └── msvcr110.dll └── src │ ├── NativeSpoutPlugin.cpp │ ├── NativeSpoutPlugin.sdf │ ├── NativeSpoutPlugin.sln │ ├── NativeSpoutPlugin.suo │ ├── NativeSpoutPlugin.userprefs │ ├── NativeSpoutPlugin.v11.suo │ ├── NativeSpoutPlugin.vcxproj │ ├── NativeSpoutPlugin.vcxproj.filters │ ├── NativeSpoutPlugin.vcxproj.user │ ├── NativeSpoutPlugin_old.cpp │ ├── ReadMe.txt │ ├── SpoutHelpers.h │ ├── UnityDXGLBase.cpp │ ├── UnityPluginInterface.h │ ├── dllmain.cpp │ ├── ipch │ └── nativespoutplugin-82fd5ce │ │ ├── nativespoutplugin-1954ecb5.ipch │ │ └── nativespoutplugin-da1bc1b7.ipch │ ├── stdafx.h │ └── targetver.h ├── README.md └── UnitySpoutDemo ├── .gitignore ├── Assets ├── Editor.meta ├── Plugins.meta ├── Plugins │ ├── x64.meta │ ├── x64 │ │ ├── NativeSpoutPlugin.dll │ │ └── NativeSpoutPlugin.dll.meta │ ├── x86.meta │ └── x86 │ │ ├── NativeSpoutPlugin.dll │ │ └── NativeSpoutPlugin.dll.meta ├── ReadMe.txt ├── ReadMe.txt.meta ├── Spout.meta └── Spout │ ├── Editor.meta │ ├── Editor │ ├── SpoutReceiverEditor.cs │ └── SpoutReceiverEditor.cs.meta │ ├── Materials.meta │ ├── Materials │ ├── New Render Texture.mat │ ├── New Render Texture.mat.meta │ ├── Unlit.0.mat │ ├── Unlit.0.mat.meta │ ├── Unlit.1.mat │ ├── Unlit.1.mat.meta │ ├── Unlit.2.mat │ ├── Unlit.2.mat.meta │ ├── uvmap.mat │ └── uvmap.mat.meta │ ├── Resources.meta │ ├── Resources │ ├── New Font.fontsettings │ ├── New Font.fontsettings.meta │ ├── SPOUT Post-processing Profile.asset │ └── SPOUT Post-processing Profile.asset.meta │ ├── Scenes.meta │ ├── Scenes │ ├── SimpleSender.unity │ ├── SimpleSender.unity.meta │ ├── Spout2 Receiver.Quad.unity │ ├── Spout2 Receiver.Quad.unity.meta │ ├── Spout2 Receiver.unity │ ├── Spout2 Receiver.unity.meta │ ├── Spout2 Sender.and.Receiver.unity │ ├── Spout2 Sender.and.Receiver.unity.meta │ ├── Spout2 Sender.unity │ └── Spout2 Sender.unity.meta │ ├── Scripts.meta │ ├── Scripts │ ├── CameraSettingsSynchronizer.cs │ ├── CameraSettingsSynchronizer.cs.meta │ ├── InvertCamera.cs │ ├── InvertCamera.cs.meta │ ├── MouseOrbitImproved.cs │ ├── MouseOrbitImproved.cs.meta │ ├── Spout.cs │ ├── Spout.cs.meta │ ├── SpoutReceiver.cs │ ├── SpoutReceiver.cs.meta │ ├── SpoutSender.cs │ ├── SpoutSender.cs.meta │ ├── TextureInfo.cs │ └── TextureInfo.cs.meta │ ├── Textures.meta │ └── Textures │ ├── SpoutRenderTexture.0.renderTexture │ ├── SpoutRenderTexture.0.renderTexture.meta │ ├── SpoutRenderTexture.1.renderTexture │ ├── SpoutRenderTexture.1.renderTexture.meta │ ├── SpoutRenderTexture.2.renderTexture │ ├── SpoutRenderTexture.2.renderTexture.meta │ ├── SpoutRenderTexture.3.renderTexture │ ├── SpoutRenderTexture.3.renderTexture.meta │ ├── temp.texture.png │ ├── temp.texture.png.meta │ ├── uv_map_reference.jpg │ ├── uv_map_reference.jpg.meta │ ├── uvmap.jpg │ └── uvmap.jpg.meta ├── Packages └── manifest.json └── ProjectSettings ├── AudioManager.asset ├── ClusterInputManager.asset ├── DynamicsManager.asset ├── EditorBuildSettings.asset ├── EditorSettings.asset ├── GraphicsSettings.asset ├── InputManager.asset ├── NavMeshAreas.asset ├── NavMeshLayers.asset ├── NetworkManager.asset ├── Physics2DSettings.asset ├── PresetManager.asset ├── ProjectSettings.asset ├── ProjectVersion.txt ├── QualitySettings.asset ├── TagManager.asset ├── TimeManager.asset ├── UnityConnectSettings.asset └── VFXManager.asset /.gitignore: -------------------------------------------------------------------------------- 1 | NativeSpoutPlugin/src/x64/ 2 | NativeSpoutPlugin/src/Release/ 3 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | Copyright (c) 2014-2015, Benjamin Kuperberg 2 | Copyright (c) 2015, Stefan Schlupek 3 | All rights reserved. 4 | 5 | Redistribution and use in source and binary forms, with or without 6 | modification, are permitted provided that the following conditions are met: 7 | 8 | * Redistributions of source code must retain the above copyright notice, this 9 | list of conditions and the following disclaimer. 10 | 11 | * Redistributions in binary form must reproduce the above copyright notice, 12 | this list of conditions and the following disclaimer in the documentation 13 | and/or other materials provided with the distribution. 14 | 15 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 16 | AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 17 | IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 18 | DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE 19 | FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 20 | DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR 21 | SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER 22 | CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, 23 | OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 24 | OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 25 | 26 | -------------------------------------------------------------------------------- /NativeSpoutPlugin/bin/x64/NativeSpoutPlugin.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sloopidoopi/Spout4Unity/5cb448f30b807aa08d98269fef04d59547c201bd/NativeSpoutPlugin/bin/x64/NativeSpoutPlugin.dll -------------------------------------------------------------------------------- /NativeSpoutPlugin/bin/x86/NativeSpoutPlugin.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sloopidoopi/Spout4Unity/5cb448f30b807aa08d98269fef04d59547c201bd/NativeSpoutPlugin/bin/x86/NativeSpoutPlugin.dll -------------------------------------------------------------------------------- /NativeSpoutPlugin/dependencies/x64/msvcp110.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sloopidoopi/Spout4Unity/5cb448f30b807aa08d98269fef04d59547c201bd/NativeSpoutPlugin/dependencies/x64/msvcp110.dll -------------------------------------------------------------------------------- /NativeSpoutPlugin/dependencies/x64/msvcr110.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sloopidoopi/Spout4Unity/5cb448f30b807aa08d98269fef04d59547c201bd/NativeSpoutPlugin/dependencies/x64/msvcr110.dll -------------------------------------------------------------------------------- /NativeSpoutPlugin/dependencies/x86/msvcp110.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sloopidoopi/Spout4Unity/5cb448f30b807aa08d98269fef04d59547c201bd/NativeSpoutPlugin/dependencies/x86/msvcp110.dll -------------------------------------------------------------------------------- /NativeSpoutPlugin/dependencies/x86/msvcr110.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sloopidoopi/Spout4Unity/5cb448f30b807aa08d98269fef04d59547c201bd/NativeSpoutPlugin/dependencies/x86/msvcr110.dll -------------------------------------------------------------------------------- /NativeSpoutPlugin/src/NativeSpoutPlugin.cpp: -------------------------------------------------------------------------------- 1 | #define _CRT_SECURE_NO_WARNINGS 2 | 3 | #include "UnityPluginInterface.h" 4 | //#include "pthread.h" 5 | 6 | #include "Spout.h" 7 | /*#include "spoutDirectX.h" 8 | #include "spoutGLDXinterop.h" 9 | #include "spoutSenderNames.h" 10 | */ 11 | using namespace std; 12 | 13 | HWND hWnd; 14 | 15 | spoutSenderNames * sender; 16 | spoutGLDXinterop * interop; 17 | spoutDirectX * sdx; 18 | 19 | 20 | //DX11 21 | //DXGI_FORMAT texFormat = DXGI_FORMAT_R8G8B8A8_UNORM; 22 | 23 | vector activeTextures; 24 | vector activeHandles; 25 | vector activeNames; 26 | int numActiveSenders; 27 | 28 | //DX9 29 | D3DFORMAT d9TexFormat = D3DFMT_A8R8G8B8; 30 | 31 | vector spoutSendersD9; 32 | vector activeTexturesD9; 33 | vectoractiveSurfacesD9; 34 | vector activeHandlesD9; 35 | vector activeNamesD9; 36 | int numActiveSendersD9; 37 | 38 | extern "C" void EXPORT_API initDebugConsole() 39 | { 40 | AllocConsole(); 41 | freopen("CONIN$", "r", stdin); 42 | freopen("CONOUT$", "w", stdout); 43 | freopen("CONOUT$", "w", stderr); 44 | } 45 | 46 | 47 | // ************** UTILS ********************* // 48 | /* 49 | HANDLE getSharedHandleForTexture(ID3D11Texture2D * texToShare) 50 | { 51 | HANDLE sharedHandle; 52 | 53 | IDXGIResource* pOtherResource(NULL); 54 | texToShare->QueryInterface( __uuidof(IDXGIResource), (void**)&pOtherResource ); 55 | pOtherResource->GetSharedHandle(&sharedHandle); 56 | pOtherResource->Release(); 57 | 58 | delete pOtherResource; 59 | 60 | return sharedHandle; 61 | } 62 | */ 63 | 64 | 65 | BOOL CALLBACK EnumProc(HWND hwnd, LPARAM lParam) 66 | { 67 | DWORD windowID; 68 | GetWindowThreadProcessId(hwnd, &windowID); 69 | 70 | if (windowID == lParam) 71 | { 72 | printf("Found HWND !\n"); 73 | hWnd = hwnd; 74 | 75 | return false; 76 | } 77 | 78 | return true; 79 | } 80 | 81 | 82 | 83 | //OpenGL for DX9-GL-DX9 conversion 84 | bool bOpenGL; 85 | HGLRC m_hRC; 86 | HDC m_hdc; 87 | HGLRC m_hSharedRC; 88 | HWND m_hwnd; 89 | 90 | // OpenGL setup function - tests for current context first 91 | 92 | // Spout OpenGL initialization function 93 | bool InitOpenGL() 94 | { 95 | char windowtitle[512]; 96 | 97 | // We only need an OpenGL context with no window 98 | m_hwnd = GetForegroundWindow(); // Any window will do - we don't render to it 99 | if(!m_hwnd) { printf("InitOpenGL error 1\n"); MessageBoxA(NULL, "Error 1\n", "InitOpenGL", MB_OK); return false; } 100 | m_hdc = GetDC(m_hwnd); 101 | if(!m_hdc) { printf("InitOpenGL error 2\n"); MessageBoxA(NULL, "Error 2\n", "InitOpenGL", MB_OK); return false; } 102 | GetWindowTextA(m_hwnd, windowtitle, 256); // debug 103 | 104 | PIXELFORMATDESCRIPTOR pfd; 105 | ZeroMemory( &pfd, sizeof( pfd ) ); 106 | pfd.nSize = sizeof( pfd ); 107 | pfd.nVersion = 1; 108 | pfd.dwFlags = PFD_DRAW_TO_WINDOW | PFD_SUPPORT_OPENGL | PFD_DOUBLEBUFFER; 109 | pfd.iPixelType = PFD_TYPE_RGBA; 110 | pfd.cColorBits = 32; 111 | pfd.cDepthBits = 16; 112 | pfd.iLayerType = PFD_MAIN_PLANE; 113 | 114 | int iFormat = ChoosePixelFormat(m_hdc, &pfd); 115 | if(!iFormat) { printf("InitOpenGL error 3\n"); MessageBoxA(NULL, "Error 3\n", "InitOpenGL", MB_OK); return false; } 116 | 117 | if(!SetPixelFormat(m_hdc, iFormat, &pfd)) { printf("InitOpenGL error 4\n"); MessageBoxA(NULL, "Error 4\n", "InitOpenGL", MB_OK); return false; } 118 | 119 | m_hRC = wglCreateContext(m_hdc); 120 | if(!m_hRC) { printf("InitOpenGL error 5\n"); MessageBoxA(NULL, "Error 5\n", "InitOpenGL", MB_OK); return false; } 121 | 122 | wglMakeCurrent(m_hdc, m_hRC); 123 | if(wglGetCurrentContext() == NULL) { printf("InitOpenGL error 6\n"); MessageBoxA(NULL, "Error 6\n", "InitOpenGL", MB_OK); return false; } 124 | 125 | // spoutreceiver.SetDX9(true); // DirectX 11 is the default 126 | 127 | // Set up a shared context 128 | if(!m_hSharedRC) m_hSharedRC = wglCreateContext(m_hdc); 129 | if(!m_hSharedRC) { printf("InitOpenGL shared context not created\n"); } 130 | if(!wglShareLists(m_hSharedRC, m_hRC)) { printf("wglShareLists failed\n"); } 131 | 132 | // Drop through to return true 133 | // printf("InitOpenGL : hwnd = %x (%s), hdc = %x, context = %x\n", m_hwnd, windowtitle, m_hdc, m_hRC); 134 | 135 | // int nCurAvailMemoryInKB = 0; 136 | // glGetIntegerv(0x9049, &nCurAvailMemoryInKB); 137 | // printf("Memory available [%i]\n", nCurAvailMemoryInKB); 138 | 139 | return true; 140 | 141 | } 142 | 143 | 144 | bool StartOpenGL() 145 | { 146 | HGLRC hrc = NULL; 147 | 148 | // Check to see if a context has already been created 149 | if(bOpenGL && m_hdc && m_hRC) { 150 | // Switch back to the primary context to check it 151 | if(!wglMakeCurrent(m_hdc, m_hRC)) { 152 | // Not current so start again 153 | wglMakeCurrent(NULL, NULL); 154 | wglDeleteContext(m_hSharedRC); 155 | wglDeleteContext(m_hRC); 156 | m_hdc = NULL; 157 | m_hRC = NULL; 158 | m_hSharedRC = NULL; 159 | // restart opengl 160 | bOpenGL = InitOpenGL(); 161 | } 162 | } 163 | else { 164 | bOpenGL = InitOpenGL(); 165 | } 166 | 167 | return bOpenGL; 168 | } 169 | 170 | 171 | 172 | 173 | 174 | 175 | // INIT // 176 | 177 | extern "C" bool EXPORT_API init() 178 | { 179 | 180 | //Temp 181 | /* 182 | AllocConsole(); 183 | freopen("CONIN$", "r", stdin); 184 | freopen("CONOUT$", "w", stdout); 185 | freopen("CONOUT$", "w", stderr); 186 | 187 | printf("Spout Init, deviceType = %i\n",g_DeviceType); 188 | */ 189 | 190 | DWORD processID = GetCurrentProcessId(); 191 | EnumWindows(EnumProc, processID); 192 | 193 | if(hWnd == NULL) 194 | { 195 | printf("SpoutNative :: HWND NULL\n"); 196 | return false; 197 | } 198 | 199 | 200 | 201 | sender = new spoutSenderNames; 202 | interop = new spoutGLDXinterop; 203 | sdx = new spoutDirectX; 204 | 205 | if(g_DeviceType == 1) //DX9 206 | { 207 | 208 | 209 | /* 210 | m_hwnd = NULL; 211 | m_hdc = NULL; 212 | m_hRC = NULL; // rendering context 213 | m_hSharedRC = NULL; // shared context 214 | */ 215 | 216 | bOpenGL = StartOpenGL(); 217 | printf("openGL init %i\n",bOpenGL); 218 | } 219 | 220 | numActiveSenders = 0; 221 | 222 | return true; 223 | } 224 | 225 | int getIndexForSenderName(char * senderName) 226 | { 227 | 228 | if(g_DeviceType == 2) //DX11 229 | { 230 | //printf("Get Index For Name %s (%i active Senders) :\n",senderName,numActiveSenders); 231 | for(int i=0;i %s\n",activeNames[i].c_str()); 234 | if(strcmp(senderName,activeNames[i].c_str()) == 0) return i; 235 | } 236 | }else if(g_DeviceType == 1) //DX9 237 | { 238 | for(int i=0;iGetDesc(&desc); 282 | ID3D11Texture2D * sendingTexture; 283 | 284 | /* 285 | HRESULT res = d3d11->CreateTexture2D(&desc, NULL,&sendingTexture); 286 | printf("CreateTexture2D MANUAL TEST : [0x%x]\n", res); 287 | */ 288 | printf("texFormatIndex : %i\n",texFormatIndex); 289 | DXGI_FORMAT texFormat = DXGI_FORMAT_R32G32B32A32_FLOAT;//DXGI_FORMAT_B8G8R8A8_UNORM; 290 | switch(texFormatIndex) 291 | { 292 | case 2: 293 | texFormat = DXGI_FORMAT_R32G32B32A32_FLOAT; 294 | break; 295 | case 24: 296 | texFormat = DXGI_FORMAT_R10G10B10A2_UNORM; 297 | break; 298 | case 28: 299 | texFormat = DXGI_FORMAT_R8G8B8A8_UNORM; 300 | break; 301 | case 87: 302 | texFormat = DXGI_FORMAT_B8G8R8A8_UNORM; 303 | break; 304 | } 305 | 306 | texResult = sdx->CreateSharedDX11Texture(g_D3D11Device,desc.Width,desc.Height,texFormat,&sendingTexture,sharedSendingHandle); 307 | printf(">> Create shared Texture with SDX : %i\n",texResult); 308 | 309 | if(!texResult) 310 | { 311 | printf("# SharedDX11Texture creation failed, stop here.\n"); 312 | return 0; 313 | } 314 | 315 | 316 | senderResult = sender->CreateSender(senderName,desc.Width,desc.Height,sharedSendingHandle,texFormat); 317 | printf(">> Create sender DX11 with sender names : %i\n",senderResult); 318 | 319 | g_pImmediateContext->CopyResource(sendingTexture,(ID3D11Texture2D *)texturePointer); 320 | g_pImmediateContext->Flush(); 321 | 322 | updateResult = sender->UpdateSender(senderName,desc.Width,desc.Height,sharedSendingHandle); 323 | 324 | activeTextures.push_back(sendingTexture); 325 | activeNames.push_back(sName); 326 | activeHandles.push_back(sharedSendingHandle); 327 | numActiveSenders++; 328 | 329 | }else if(g_DeviceType == 1) //DX9 330 | { 331 | printf("We are here\n"); 332 | 333 | D3DSURFACE_DESC desc; 334 | IDirect3DTexture9 * srcTex = (IDirect3DTexture9*)texturePointer; 335 | srcTex->GetLevelDesc(0,&desc); 336 | 337 | printf("Desc width/height %i %i\n",desc.Width,desc.Height); 338 | 339 | 340 | 341 | SpoutSender * spoutSender = new SpoutSender(); 342 | spoutSender->SetDX9(); 343 | 344 | senderResult = spoutSender->CreateSender(senderName,desc.Width,desc.Height,desc.Format); 345 | printf(">> Create sender DX9 with sender names : %i\n",senderResult); 346 | 347 | //activeTexturesD9.push_back(srcTex); 348 | IDirect3DSurface9 * surf = NULL; 349 | activeNamesD9.push_back(sName); 350 | activeSurfacesD9.push_back(surf); 351 | spoutSendersD9.push_back(spoutSender); 352 | numActiveSendersD9++; 353 | 354 | //if(!bOpenGL) bOpenGL = StartOpenGL(); 355 | } 356 | 357 | 358 | int senderIndex = getIndexForSenderName(senderName); 359 | printf("Index search test > %i\n",senderIndex); 360 | 361 | return senderResult; 362 | } 363 | 364 | 365 | 366 | extern "C" bool EXPORT_API updateSender(char* senderName, void * texturePointer) 367 | { 368 | int senderIndex = getIndexForSenderName(senderName); 369 | //printf("Update sender : %s, sender index is %i\n",senderName,senderIndex); 370 | 371 | if(senderIndex == -1) 372 | { 373 | printf("Sender is not known, creating one.\n"); 374 | createSender(senderName,texturePointer); 375 | return false; 376 | } 377 | 378 | 379 | 380 | 381 | bool result = false; 382 | if(g_DeviceType == 2)//DX11 383 | { 384 | if(activeTextures[senderIndex] == nullptr) 385 | { 386 | printf("activeTextures[%i] is null (badly created ?)\n",senderIndex); 387 | return false; 388 | } 389 | 390 | HANDLE targetHandle = activeHandles[senderIndex]; 391 | 392 | ID3D11Texture2D * targetTex = activeTextures[senderIndex]; 393 | 394 | g_pImmediateContext->CopyResource(targetTex,(ID3D11Texture2D*)texturePointer); 395 | g_pImmediateContext->Flush(); 396 | 397 | D3D11_TEXTURE2D_DESC td; 398 | ((ID3D11Texture2D *)texturePointer)->GetDesc(&td); 399 | //printf("update texFormat %i %i\n",texFormat,td.Format); 400 | 401 | 402 | result = sender->UpdateSender(senderName,td.Width,td.Height,targetHandle); 403 | //printf("updateSender result : %i\n",result); 404 | 405 | 406 | }else if(g_DeviceType == 1) //DX9 407 | { 408 | 409 | if(!bOpenGL) 410 | { 411 | printf("[updateSender] bOpenGL false, openGL not init\n"); 412 | 413 | return false; 414 | } 415 | 416 | // Activate the shared context for draw 417 | if(!wglMakeCurrent(m_hdc, m_hSharedRC)) { 418 | bOpenGL = false; 419 | printf("############################### Draw - no context - hdc = %x, ctx = %x\n", m_hdc, m_hSharedRC); 420 | // It will start again if the start button is toggled 421 | return false; 422 | } 423 | 424 | 425 | //HANDLE targetHandle = activeHandlesD9[senderIndex]; 426 | //IDirect3DTexture9 * targetTex = activeTexturesD9[senderIndex]; 427 | 428 | D3DSURFACE_DESC desc; 429 | SpoutSender * spoutSender = spoutSendersD9[senderIndex]; 430 | IDirect3DTexture9 * srcTex = (IDirect3DTexture9*)texturePointer; 431 | srcTex->GetLevelDesc(0,&desc); 432 | 433 | IDirect3DSurface9 * targetSurf = NULL;//activeSurfacesD9[senderIndex]; 434 | IDirect3DSurface9 * srcSurf = NULL; 435 | 436 | D3DLOCKED_RECT d3dlr; 437 | 438 | 439 | HRESULT hr = g_D3D9Device->CreateOffscreenPlainSurface(desc.Width, desc.Height, desc.Format, D3DPOOL_SYSTEMMEM, &targetSurf, NULL); 440 | 441 | //printf("Create offscreen plain surface :%i\n",hr); 442 | 443 | if(SUCCEEDED(hr)) { 444 | // Get Texture Surface 445 | hr = srcTex->GetSurfaceLevel(0, &srcSurf); 446 | if(SUCCEEDED(hr)) { 447 | //printf("Get renderTarget data\n"); 448 | // Copy Surface to Surface 449 | hr = g_D3D9Device->GetRenderTargetData(srcSurf, targetSurf); 450 | if(SUCCEEDED(hr)) { 451 | //printf("Lock rect\n"); 452 | // Lock the source surface using some flags for optimization 453 | hr = targetSurf->LockRect(&d3dlr, NULL, D3DLOCK_NO_DIRTY_UPDATE | D3DLOCK_READONLY); 454 | 455 | 456 | if(SUCCEEDED(hr)) { 457 | //printf("Rect is locked, drawing\n"); 458 | D3DSURFACE_DESC targetDesc; 459 | targetSurf->GetDesc(&targetDesc); 460 | 461 | 462 | //printf("Desc format / src format :%i / %i\n",desc.Format,targetDesc); 463 | //printf("Desc width / height %i /%i :: %i / %i\n",desc.Width,desc.Height,targetDesc.Width,targetDesc.Height); 464 | 465 | if(targetDesc.Width != desc.Width || targetDesc.Height != desc.Height) { 466 | 467 | // Update the sender 468 | printf("Update sender size changed !\n"); 469 | spoutSender->UpdateSender(senderName, desc.Width, desc.Height); 470 | 471 | } 472 | 473 | result = spoutSender->SendImage((unsigned char *)d3dlr.pBits, desc.Width, desc.Height, GL_BGRA_EXT,true,false); 474 | //printf("sender updateImage : %i\n",result); 475 | //} 476 | srcSurf->UnlockRect(); 477 | } 478 | } 479 | } 480 | } 481 | 482 | 483 | if(targetSurf) targetSurf->Release(); 484 | if(srcSurf) srcSurf->Release(); 485 | targetSurf = NULL; 486 | srcSurf = NULL; 487 | 488 | } 489 | 490 | 491 | return result; 492 | } 493 | 494 | 495 | 496 | 497 | extern "C" void EXPORT_API closeSender(char * senderName) 498 | { 499 | int senderIndex = getIndexForSenderName(senderName); 500 | 501 | printf("Close Sender : %s\n",senderName); 502 | //sender->CloseSender(senderName); 503 | 504 | if(senderIndex != -1) 505 | { 506 | if(g_DeviceType == 2) //DX11 507 | { 508 | sender->ReleaseSenderName(senderName); 509 | 510 | activeNames.erase(activeNames.begin()+senderIndex); 511 | activeHandles.erase(activeHandles.begin()+senderIndex); 512 | activeTextures.erase(activeTextures.begin()+senderIndex); 513 | numActiveSenders--; 514 | }else if(g_DeviceType == 1) //DX9 515 | { 516 | spoutSendersD9[senderIndex]->ReleaseSender(); 517 | spoutSendersD9.erase(spoutSendersD9.begin()+senderIndex); 518 | activeNamesD9.erase(activeNamesD9.begin()+senderIndex); 519 | activeSurfacesD9.erase(activeSurfacesD9.begin()+senderIndex); 520 | //activeHandlesD9.erase(activeHandlesD9.begin()+senderIndex); 521 | //activeTexturesD9.erase(activeTexturesD9.begin()+senderIndex); 522 | numActiveSendersD9--; 523 | 524 | } 525 | } 526 | 527 | printf("There are now %i senders remaining\n",numActiveSenders,activeNames.size()); 528 | 529 | } 530 | 531 | 532 | // *************** RECEIVING ************************ // 533 | 534 | typedef void (*SpoutSenderUpdatePtr)(int numSenders); 535 | SpoutSenderUpdatePtr UnitySenderUpdate; 536 | typedef void (*SpoutSenderStartedPtr)(char * senderName,ID3D11ShaderResourceView * resourceView ,int width,int height ); 537 | SpoutSenderStartedPtr UnitySenderStarted; 538 | typedef void (*SpoutSenderStoppedPtr)(char * senderName); 539 | SpoutSenderStoppedPtr UnitySenderStopped; 540 | 541 | 542 | extern "C" int EXPORT_API getNumSenders() 543 | { 544 | return sender->GetSenderCount(); 545 | } 546 | 547 | 548 | 549 | int lastSendersCount = 0; 550 | 551 | char (*senderNames)[256]; 552 | char (*newNames)[256]; 553 | 554 | unsigned int w; 555 | unsigned int h; 556 | HANDLE sHandle; 557 | 558 | extern "C" void EXPORT_API checkReceivers() 559 | { 560 | 561 | if(sender == nullptr) return; 562 | 563 | 564 | int numSenders = sender->GetSenderCount(); 565 | 566 | //printf("Num senders :%i\n",numSenders); 567 | 568 | if(numSenders != lastSendersCount) 569 | { 570 | printf("Num Senders changed : %i\n",numSenders); 571 | 572 | UnitySenderUpdate(numSenders); 573 | 574 | int i,j; 575 | bool found; 576 | 577 | printf("Old Sender List :\n"); 578 | for(i=0;i %s\n",senderNames[i]); 581 | } 582 | 583 | printf("\nUpdated Sender List :\n"); 584 | for(i=0;iGetSenderNameInfo(i,newNames[i],256,w,h,sHandle); 587 | printf("\t> %s\n",newNames[i]); 588 | } 589 | 590 | //NEW SENDERS DETECTION 591 | printf("\nNew Sender Detection, checking against previous sender list :\n"); 592 | for(i=0;i %s .... ",newNames[i]); 595 | 596 | found = false; 597 | for(j = 0;jGetSenderNameInfo(i,newNames[i],256,w,h,sHandle); 614 | 615 | if(g_DeviceType == 2) //DX11 616 | { 617 | ID3D11Resource * tempResource11; 618 | ID3D11ShaderResourceView * rView; 619 | 620 | HRESULT openResult = g_D3D11Device->OpenSharedResource(sHandle, __uuidof(ID3D11Resource), (void**)(&tempResource11)); 621 | g_D3D11Device->CreateShaderResourceView(tempResource11,NULL, &rView); 622 | 623 | printf("\t => Send Started Event with name : %s\n",newNames[i]); 624 | UnitySenderStarted(newNames[i],rView,w,h); 625 | }else if(g_DeviceType == 1) //DX9 626 | { 627 | printf("DX9 handle to come\n"); 628 | } 629 | } 630 | } 631 | 632 | //SENDER STOP DETECTION 633 | for(int i=0;i 2 | 3 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /NativeSpoutPlugin/src/NativeSpoutPlugin.v11.suo: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sloopidoopi/Spout4Unity/5cb448f30b807aa08d98269fef04d59547c201bd/NativeSpoutPlugin/src/NativeSpoutPlugin.v11.suo -------------------------------------------------------------------------------- /NativeSpoutPlugin/src/NativeSpoutPlugin.vcxproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | Debug 6 | Win32 7 | 8 | 9 | Debug 10 | x64 11 | 12 | 13 | Release 14 | Win32 15 | 16 | 17 | Release 18 | x64 19 | 20 | 21 | 22 | {B495A2CE-BCCE-47D4-9FB6-8876BC425F6C} 23 | Win32Proj 24 | NativeSpoutPlugin 25 | 26 | 27 | 28 | DynamicLibrary 29 | true 30 | v110 31 | Unicode 32 | 33 | 34 | DynamicLibrary 35 | true 36 | v110 37 | Unicode 38 | 39 | 40 | DynamicLibrary 41 | false 42 | v100 43 | true 44 | Unicode 45 | 46 | 47 | DynamicLibrary 48 | false 49 | v100 50 | true 51 | Unicode 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | true 71 | 72 | 73 | true 74 | 75 | 76 | false 77 | 78 | 79 | false 80 | 81 | 82 | 83 | NotUsing 84 | Level3 85 | Disabled 86 | WIN32;_DEBUG;_WINDOWS;_USRDLL;NATIVESPOUTPLUGIN_EXPORTS;%(PreprocessorDefinitions) 87 | true 88 | D:\Documents\Ressources\SDKs\Spout2SDK\SpoutSDK\Source;%(AdditionalIncludeDirectories) 89 | 90 | 91 | Windows 92 | true 93 | opengl32.lib;glu32.lib;winmm.lib;d3d9.lib;d3d11.lib;D:\Documents\Ressources\Libraries\pthread\lib\x86\pthreadVC2.lib;%(AdditionalDependencies) 94 | 95 | 96 | copy $(TargetPath) $(SolutionDir)\..\..\UnitySpoutDemo\Assets\Plugins 97 | copy $(TargetPath) $(SolutionDir)\..\bin\x86 98 | copy $(TargetPath) $(SolutionDir)\..\UnitySpoutDemo\Export\x86\SenderDemo_32bit_Data\Plugins 99 | copy $(TargetPath) $(SolutionDir)\..\UnitySpoutDemo\Export\x86\ReceiverDemo_32bit_Data\Plugins 100 | 101 | 102 | 103 | 104 | NotUsing 105 | Level3 106 | Disabled 107 | WIN32;_DEBUG;_WINDOWS;_USRDLL;NATIVESPOUTPLUGIN_EXPORTS;%(PreprocessorDefinitions) 108 | true 109 | D:\Documents\Ressources\SDKs\Spout2SDK\SpoutSDK\Source;%(AdditionalIncludeDirectories) 110 | 111 | 112 | Windows 113 | true 114 | opengl32.lib;glu32.lib;winmm.lib;d3d9.lib;d3d11.lib;D:\Documents\Ressources\Libraries\pthread\lib\x86\pthreadVC2.lib;%(AdditionalDependencies) 115 | 116 | 117 | copy $(TargetPath) $(SolutionDir)\..\..\bin\x64 118 | copy $(TargetPath) $(SolutionDir)\..\UnitySpoutDemo\Export\x64\SenderDemo_64bit_Data\Plugins 119 | copy $(TargetPath) $(SolutionDir)\..\UnitySpoutDemo\Export\x64\ReceiverDemo_64bit_Data\Plugins 120 | 121 | 122 | 123 | 124 | Level3 125 | NotUsing 126 | MaxSpeed 127 | true 128 | true 129 | WIN32;NDEBUG;_WINDOWS;_USRDLL;NATIVESPOUTPLUGIN_EXPORTS;%(PreprocessorDefinitions) 130 | true 131 | D:\Documents\Ressources\SDKs\Spout2SDK\SpoutSDK\Source;C:\Program Files %28x86%29\Spout2\SPOUTSDK\Source;%(AdditionalIncludeDirectories) 132 | 133 | 134 | Windows 135 | true 136 | true 137 | true 138 | opengl32.lib;glu32.lib;winmm.lib;d3d9.lib;d3d11.lib;%(AdditionalDependencies) 139 | 140 | 141 | copy $(TargetPath) $(SolutionDir)\..\..\UnitySpoutDemo\Assets\Plugins\x86 142 | copy $(TargetPath) $(SolutionDir)\..\bin\x86 143 | 144 | 145 | 146 | 147 | Level3 148 | NotUsing 149 | MaxSpeed 150 | true 151 | true 152 | WIN32;NDEBUG;_WINDOWS;_USRDLL;NATIVESPOUTPLUGIN_EXPORTS;%(PreprocessorDefinitions) 153 | true 154 | D:\Documents\Ressources\SDKs\Spout2SDK\SpoutSDK\Source;C:\Program Files %28x86%29\Spout2\SPOUTSDK\Source;%(AdditionalIncludeDirectories) 155 | 156 | 157 | Windows 158 | true 159 | true 160 | true 161 | opengl32.lib;glu32.lib;winmm.lib;d3d9.lib;d3d11.lib;%(AdditionalDependencies) 162 | 163 | 164 | copy $(TargetPath) $(SolutionDir)\..\bin\x64 165 | copy $(TargetPath) $(SolutionDir)\..\..\UnitySpoutDemo\Assets\Plugins\x64 166 | 167 | 168 | 169 | 170 | 171 | 172 | 173 | 174 | 175 | 176 | 177 | 178 | 179 | 180 | 181 | 182 | 183 | 184 | 185 | 186 | 187 | 188 | 189 | 190 | -------------------------------------------------------------------------------- /NativeSpoutPlugin/src/NativeSpoutPlugin.vcxproj.filters: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | {4FC737F1-C7A5-4376-A066-2A32D752A2FF} 6 | cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx 7 | 8 | 9 | {93995380-89BD-4b04-88EB-625FBE52EBFB} 10 | h;hpp;hxx;hm;inl;inc;xsd 11 | 12 | 13 | {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} 14 | rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | Header Files 23 | 24 | 25 | Header Files 26 | 27 | 28 | 29 | 30 | Source Files 31 | 32 | 33 | Source Files 34 | 35 | 36 | Source Files 37 | 38 | 39 | Source Files 40 | 41 | 42 | Source Files 43 | 44 | 45 | Source Files 46 | 47 | 48 | Source Files 49 | 50 | 51 | Source Files 52 | 53 | 54 | Source Files 55 | 56 | 57 | Source Files 58 | 59 | 60 | -------------------------------------------------------------------------------- /NativeSpoutPlugin/src/NativeSpoutPlugin.vcxproj.user: -------------------------------------------------------------------------------- 1 |  2 | 3 | -------------------------------------------------------------------------------- /NativeSpoutPlugin/src/NativeSpoutPlugin_old.cpp: -------------------------------------------------------------------------------- 1 | #define _CRT_SECURE_NO_WARNINGS 2 | 3 | #include "UnityPluginInterface.h" 4 | #include "SpoutHelpers.h" 5 | #include "pthread.h" 6 | 7 | #include "SpoutSDK.h" 8 | 9 | Spout spout; 10 | 11 | using namespace std; 12 | 13 | 14 | typedef void (*SpoutStartPtr)(char * senderName,ID3D11ShaderResourceView * resourceView ,int width,int height); 15 | typedef void (*SpoutStopPtr)(char * senderName); 16 | SpoutStartPtr UnitySharingStarted; 17 | SpoutStopPtr UnitySharingStopped; 18 | 19 | 20 | extern "C" void EXPORT_API SetSpoutHandlers( SpoutStartPtr sharingStartedHandler, SpoutStopPtr sharingStoppedHandler ) 21 | { 22 | UnitySharingStarted = sharingStartedHandler; 23 | UnitySharingStopped = sharingStoppedHandler; 24 | } 25 | 26 | 27 | // ************** SENDING ******************* // 28 | 29 | ID3D11Texture2D * sendingTexture; //todo : find a way to be able to share more than one texture 30 | 31 | extern "C" int EXPORT_API shareDX11(char * senderName, ID3D11Texture2D * texturePointer) 32 | { 33 | 34 | /* 35 | AllocConsole(); 36 | freopen("CONIN$", "r", stdin); 37 | freopen("CONOUT$", "w", stdout); 38 | freopen("CONOUT$", "w", stderr); 39 | */ 40 | 41 | // Get the description of the passed texture 42 | D3D11_TEXTURE2D_DESC td; 43 | texturePointer->GetDesc(&td); 44 | td.BindFlags |= D3D11_BIND_RENDER_TARGET; 45 | td.MiscFlags = D3D11_RESOURCE_MISC_SHARED; 46 | td.Format = DXGI_FORMAT_R8G8B8A8_UNORM; //force format 47 | 48 | // Create a new shared texture with the same properties 49 | g_D3D11Device->CreateTexture2D(&td, NULL, &sendingTexture); 50 | HANDLE sharedHandle = getSharedHandleForTexture(sendingTexture); 51 | createSenderFromSharedHandle(senderName, sharedHandle,td); 52 | 53 | 54 | 55 | //Loopback test 56 | /* 57 | ID3D11ShaderResourceView * resourceView; 58 | ID3D11Resource * tempResource11; 59 | g_D3D11Device->OpenSharedResource(sharedHandle, __uuidof(ID3D11Resource), (void**)(&tempResource11)); 60 | g_D3D11Device->CreateShaderResourceView(tempResource11,NULL, &resourceView); 61 | */ 62 | //UnitySharingStarted(0,resourceView,td.Width,td.Height); 63 | 64 | return 2; 65 | } 66 | 67 | extern "C" void EXPORT_API updateTexture(char* senderName, ID3D11Texture2D * texturePointer) 68 | { 69 | 70 | if(g_pImmediateContext == NULL) UnityLog("Immediate context is null"); 71 | if((ID3D11Resource *)texturePointer == NULL) UnityLog("Resource is null"); 72 | 73 | //UnityLog("Update in plugin"); 74 | D3D11_TEXTURE2D_DESC td; 75 | texturePointer->GetDesc(&td); 76 | 77 | // SPOUT 78 | // Check the texture against the global size used when the sender was created 79 | // and update the sender info if it has changed 80 | if(bInitialized) { 81 | if(td.Width != g_width || td.Height != g_height) { 82 | g_width = td.Width; 83 | g_height = td.Height; 84 | g_info.width = (unsigned __int32)g_width; 85 | g_info.height = (unsigned __int32)g_height; 86 | // This assumes that the sharehandle in the info structure remains 87 | // the same as the texture this could be checked as well 88 | spout.UpdateSender(senderName,g_width,g_height,g_shareHandle,g_info.format); 89 | } 90 | } 91 | 92 | g_pImmediateContext->CopyResource(sendingTexture,texturePointer); 93 | g_pImmediateContext->Flush(); 94 | } 95 | 96 | 97 | extern "C" void EXPORT_API stopSharing(char * senderName) 98 | { 99 | spout.CloseSender(senderName); 100 | } 101 | 102 | 103 | // *************** RECEIVING ************************ // 104 | 105 | typedef void (*SpoutSenderUpdatePtr)(int numSenders); 106 | SpoutSenderUpdatePtr UnitySenderUpdate; 107 | typedef void (*SpoutSenderStartedPtr)(char * senderName); 108 | SpoutSenderStartedPtr UnitySenderStarted; 109 | typedef void (*SpoutSenderStoppedPtr)(char * senderName); 110 | SpoutSenderStoppedPtr UnitySenderStopped; 111 | 112 | 113 | extern "C" int EXPORT_API getNumSenders() 114 | { 115 | spoutSenders senders; 116 | return senders.GetSenderCount(); 117 | } 118 | 119 | 120 | pthread_t receiveThread; 121 | bool doReceive; 122 | int lastSendersCount = 0; 123 | void * receiveThreadLoop(void * data) 124 | { 125 | 126 | AllocConsole(); 127 | freopen("CONIN$", "r", stdin); 128 | freopen("CONOUT$", "w", stdout); 129 | freopen("CONOUT$", "w", stderr); 130 | 131 | UnityLog("receive Thread Loop start !\n"); 132 | printf("Unity Thread loop start !\n"); 133 | 134 | char senderNames[32][256]; 135 | 136 | while(doReceive) 137 | { 138 | int numSenders = getNumSenders(); 139 | if(numSenders != lastSendersCount) 140 | { 141 | printf("Num Senders changed : %i\n",numSenders); 142 | UnitySenderUpdate(numSenders); 143 | 144 | char newNames[32][256]; 145 | int i,j; 146 | bool found; 147 | 148 | UnityLog("## Sender Update \n\n"); 149 | printf("\n\n################ SENDER UPDATE ###############\n\n"); 150 | printf("> Old senders : "); 151 | 152 | for(i=0;i New senders : "); 158 | for(i=0;i>> ",newNames[i]); 172 | found = false; 173 | for(j = 0;j>> ",senderNames[i]); 193 | for(j = 0;jOpenSharedResource(hShareHandle, __uuidof(ID3D11Resource), (void**)(&tempResource11)); 290 | g_D3D11Device->CreateShaderResourceView(tempResource11,NULL, &rView); 291 | 292 | UnitySharingStarted(senderName,rView,w,h); 293 | 294 | return true; 295 | } 296 | 297 | 298 | 299 | 300 | 301 | -------------------------------------------------------------------------------- /NativeSpoutPlugin/src/ReadMe.txt: -------------------------------------------------------------------------------- 1 | ======================================================================== 2 | DYNAMIC LINK LIBRARY : NativeSpoutPlugin Project Overview 3 | ======================================================================== 4 | 5 | AppWizard has created this NativeSpoutPlugin DLL for you. 6 | 7 | This file contains a summary of what you will find in each of the files that 8 | make up your NativeSpoutPlugin application. 9 | 10 | 11 | NativeSpoutPlugin.vcxproj 12 | This is the main project file for VC++ projects generated using an Application Wizard. 13 | It contains information about the version of Visual C++ that generated the file, and 14 | information about the platforms, configurations, and project features selected with the 15 | Application Wizard. 16 | 17 | NativeSpoutPlugin.vcxproj.filters 18 | This is the filters file for VC++ projects generated using an Application Wizard. 19 | It contains information about the association between the files in your project 20 | and the filters. This association is used in the IDE to show grouping of files with 21 | similar extensions under a specific node (for e.g. ".cpp" files are associated with the 22 | "Source Files" filter). 23 | 24 | NativeSpoutPlugin.cpp 25 | This is the main DLL source file. 26 | 27 | When created, this DLL does not export any symbols. As a result, it 28 | will not produce a .lib file when it is built. If you wish this project 29 | to be a project dependency of some other project, you will either need to 30 | add code to export some symbols from the DLL so that an export library 31 | will be produced, or you can set the Ignore Input Library property to Yes 32 | on the General propert page of the Linker folder in the project's Property 33 | Pages dialog box. 34 | 35 | ///////////////////////////////////////////////////////////////////////////// 36 | Other standard files: 37 | 38 | StdAfx.h, StdAfx.cpp 39 | These files are used to build a precompiled header (PCH) file 40 | named NativeSpoutPlugin.pch and a precompiled types file named StdAfx.obj. 41 | 42 | ///////////////////////////////////////////////////////////////////////////// 43 | Other notes: 44 | 45 | AppWizard uses "TODO:" comments to indicate parts of the source code you 46 | should add to or customize. 47 | 48 | ///////////////////////////////////////////////////////////////////////////// 49 | -------------------------------------------------------------------------------- /NativeSpoutPlugin/src/SpoutHelpers.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sloopidoopi/Spout4Unity/5cb448f30b807aa08d98269fef04d59547c201bd/NativeSpoutPlugin/src/SpoutHelpers.h -------------------------------------------------------------------------------- /NativeSpoutPlugin/src/UnityDXGLBase.cpp: -------------------------------------------------------------------------------- 1 | // Example low level rendering Unity plugin 2 | 3 | 4 | #include "UnityPluginInterface.h" 5 | 6 | #include 7 | 8 | 9 | // -------------------------------------------------------------------------- 10 | // Include headers for the graphics APIs we support 11 | 12 | #if SUPPORT_D3D9 13 | #include 14 | #endif 15 | #if SUPPORT_D3D11 16 | #include 17 | #endif 18 | #if SUPPORT_OPENGL 19 | #if UNITY_WIN 20 | #include 21 | #else 22 | #include 23 | #endif 24 | #endif 25 | 26 | 27 | 28 | // -------------------------------------------------------------------------- 29 | // Helper utilities 30 | 31 | 32 | // Prints a string 33 | static void DebugLog (const char* str) 34 | { 35 | #if UNITY_WIN 36 | OutputDebugStringA (str); 37 | #else 38 | printf ("%s", str); 39 | #endif 40 | } 41 | 42 | // COM-like Release macro 43 | #ifndef SAFE_RELEASE 44 | #define SAFE_RELEASE(a) if (a) { a->Release(); a = NULL; } 45 | #endif 46 | 47 | 48 | 49 | // -------------------------------------------------------------------------- 50 | // UnitySetGraphicsDevice 51 | 52 | static int g_DeviceType = -1; 53 | 54 | 55 | // Actual setup/teardown functions defined below 56 | #if SUPPORT_D3D9 57 | static void SetGraphicsDeviceD3D9 (IDirect3DDevice9* device, GfxDeviceEventType eventType); 58 | #endif 59 | #if SUPPORT_D3D11 60 | static void SetGraphicsDeviceD3D11 (ID3D11Device* device, GfxDeviceEventType eventType); 61 | #endif 62 | 63 | 64 | extern "C" void EXPORT_API UnitySetGraphicsDevice (void* device, int deviceType, int eventType) 65 | { 66 | // Set device type to -1, i.e. "not recognized by our plugin" 67 | g_DeviceType = -1; 68 | 69 | #if SUPPORT_D3D9 70 | // D3D9 device, remember device pointer and device type. 71 | // The pointer we get is IDirect3DDevice9. 72 | if (deviceType == kGfxRendererD3D9) 73 | { 74 | DebugLog ("Set D3D9 graphics device\n"); 75 | g_DeviceType = deviceType; 76 | SetGraphicsDeviceD3D9 ((IDirect3DDevice9*)device, (GfxDeviceEventType)eventType); 77 | } 78 | #endif 79 | 80 | #if SUPPORT_D3D11 81 | // D3D11 device, remember device pointer and device type. 82 | // The pointer we get is ID3D11Device. 83 | if (deviceType == kGfxRendererD3D11) 84 | { 85 | DebugLog ("Set D3D11 graphics device\n"); 86 | g_DeviceType = deviceType; 87 | SetGraphicsDeviceD3D11 ((ID3D11Device*)device, (GfxDeviceEventType)eventType); 88 | } 89 | #endif 90 | 91 | #if SUPPORT_OPENGL 92 | // If we've got an OpenGL device, remember device type. There's no OpenGL 93 | // "device pointer" to remember since OpenGL always operates on a currently set 94 | // global context. 95 | if (deviceType == kGfxRendererOpenGL) 96 | { 97 | DebugLog ("Set OpenGL graphics device\n"); 98 | g_DeviceType = deviceType; 99 | } 100 | #endif 101 | } 102 | 103 | 104 | 105 | // ------------------------------------------------------------------- 106 | // Direct3D 9 setup/teardown code 107 | 108 | 109 | #if SUPPORT_D3D9 110 | 111 | static IDirect3DDevice9* g_D3D9Device; 112 | 113 | static void SetGraphicsDeviceD3D9 (IDirect3DDevice9* device, GfxDeviceEventType eventType) 114 | { 115 | g_D3D9Device = device; 116 | } 117 | 118 | #endif // #if SUPPORT_D3D9 119 | 120 | 121 | 122 | // ------------------------------------------------------------------- 123 | // Direct3D 11 setup/teardown code 124 | 125 | 126 | #if SUPPORT_D3D11 127 | 128 | static ID3D11Device* g_D3D11Device; 129 | static ID3D11DeviceContext * g_D3D11DeviceContext; 130 | 131 | static void SetGraphicsDeviceD3D11 (ID3D11Device* device, GfxDeviceEventType eventType) 132 | { 133 | g_D3D11Device = device; 134 | g_D3D11Device->GetImmediateContext(&g_D3D11DeviceContext); 135 | } 136 | 137 | #endif // #if SUPPORT_D3D11 -------------------------------------------------------------------------------- /NativeSpoutPlugin/src/UnityPluginInterface.h: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | 4 | #pragma once 5 | 6 | // Which platform we are on? 7 | #if _MSC_VER 8 | #define UNITY_WIN 1 9 | #else 10 | #define UNITY_OSX 1 11 | #endif 12 | 13 | 14 | // Attribute to make function be exported from a plugin 15 | #if UNITY_WIN 16 | #define EXPORT_API __declspec(dllexport) 17 | #else 18 | #define EXPORT_API 19 | #endif 20 | 21 | 22 | // Which graphics device APIs we possibly support? 23 | #if UNITY_WIN 24 | #define SUPPORT_D3D9 1 25 | #define SUPPORT_D3D11 1 // comment this out if you don't have D3D11 header/library files 26 | #define SUPPORT_OPENGL 1 27 | #endif 28 | 29 | #if UNITY_OSX 30 | #define SUPPORT_OPENGL 1 31 | #endif 32 | 33 | 34 | // Graphics device identifiers in Unity 35 | enum GfxDeviceRenderer 36 | { 37 | kGfxRendererOpenGL = 0, // OpenGL 38 | kGfxRendererD3D9, // Direct3D 9 39 | kGfxRendererD3D11, // Direct3D 11 40 | kGfxRendererGCM, // Sony PlayStation 3 GCM 41 | kGfxRendererNull, // "null" device (used in batch mode) 42 | kGfxRendererHollywood, // Nintendo Wii 43 | kGfxRendererXenon, // Xbox 360 44 | kGfxRendererOpenGLES, // OpenGL ES 1.1 45 | kGfxRendererOpenGLES20Mobile, // OpenGL ES 2.0 mobile variant 46 | kGfxRendererMolehill, // Flash 11 Stage3D 47 | kGfxRendererOpenGLES20Desktop, // OpenGL ES 2.0 desktop variant (i.e. NaCl) 48 | kGfxRendererCount 49 | }; 50 | 51 | 52 | // Event types for UnitySetGraphicsDevice 53 | enum GfxDeviceEventType { 54 | kGfxDeviceEventInitialize = 0, 55 | kGfxDeviceEventShutdown, 56 | kGfxDeviceEventBeforeReset, 57 | kGfxDeviceEventAfterReset, 58 | }; 59 | 60 | 61 | // If exported by a plugin, this function will be called when graphics device is created, destroyed, 62 | // before it's being reset (i.e. resolution changed), after it's being reset, etc. 63 | extern "C" void EXPORT_API UnitySetGraphicsDevice (void* device, int deviceType, int eventType); 64 | 65 | // If exported by a plugin, this function will be called for GL.IssuePluginEvent script calls. 66 | // The function will be called on a rendering thread; note that when multithreaded rendering is used, 67 | // the rendering thread WILL BE DIFFERENT from the thread that all scripts & other game logic happens! 68 | // You have to ensure any synchronization with other plugin script calls is properly done by you. 69 | extern "C" void EXPORT_API UnityRenderEvent (int eventID); 70 | 71 | 72 | 73 | 74 | // -------------------------------------------------------------------------- 75 | // Include headers for the graphics APIs we support 76 | 77 | #if SUPPORT_D3D9 78 | #include 79 | #endif 80 | #if SUPPORT_D3D11 81 | #include 82 | #endif 83 | #if SUPPORT_OPENGL 84 | #if UNITY_WIN 85 | #include 86 | #else 87 | #include 88 | #endif 89 | #endif 90 | 91 | 92 | 93 | // -------------------------------------------------------------------------- 94 | // Helper utilities 95 | 96 | 97 | // Prints a string 98 | static void DebugLog (const char* str) 99 | { 100 | #if UNITY_WIN 101 | OutputDebugStringA (str); 102 | #else 103 | printf ("%s", str); 104 | #endif 105 | } 106 | 107 | //Debug in Unity Function 108 | typedef void (*FuncPtr)( const char * ); 109 | FuncPtr UnityLog; 110 | extern "C" void EXPORT_API SetDebugFunction( FuncPtr fp ) 111 | { 112 | UnityLog = fp; 113 | 114 | } 115 | 116 | // COM-like Release macro 117 | #ifndef SAFE_RELEASE 118 | #define SAFE_RELEASE(a) if (a) { a->Release(); a = NULL; } 119 | #endif 120 | 121 | 122 | 123 | // -------------------------------------------------------------------------- 124 | // UnitySetGraphicsDevice 125 | 126 | static int g_DeviceType = -1; 127 | 128 | 129 | // Actual setup/teardown functions defined below 130 | #if SUPPORT_D3D9 131 | static void SetGraphicsDeviceD3D9 (IDirect3DDevice9* device, GfxDeviceEventType eventType); 132 | #endif 133 | #if SUPPORT_D3D11 134 | static void SetGraphicsDeviceD3D11 (ID3D11Device* device, GfxDeviceEventType eventType); 135 | #endif 136 | 137 | 138 | extern "C" void EXPORT_API UnitySetGraphicsDevice (void* device, int deviceType, int eventType) 139 | { 140 | printf("Unity Set Graphics Device : Event type = %i\n",eventType); 141 | if(eventType == 1) return; 142 | 143 | // Set device type to -1, i.e. "not recognized by our plugin" 144 | g_DeviceType = -1; 145 | 146 | #if SUPPORT_D3D9 147 | // D3D9 device, remember device pointer and device type. 148 | // The pointer we get is IDirect3DDevice9. 149 | if (deviceType == kGfxRendererD3D9) 150 | { 151 | DebugLog ("Set D3D9 graphics device\n"); 152 | g_DeviceType = deviceType; 153 | SetGraphicsDeviceD3D9 ((IDirect3DDevice9*)device, (GfxDeviceEventType)eventType); 154 | } 155 | #endif 156 | 157 | #if SUPPORT_D3D11 158 | // D3D11 device, remember device pointer and device type. 159 | // The pointer we get is ID3D11Device. 160 | if (deviceType == kGfxRendererD3D11) 161 | { 162 | DebugLog ("Set D3D11 graphics device\n"); 163 | g_DeviceType = deviceType; 164 | SetGraphicsDeviceD3D11 ((ID3D11Device*)device, (GfxDeviceEventType)eventType); 165 | } 166 | #endif 167 | 168 | #if SUPPORT_OPENGL 169 | // If we've got an OpenGL device, remember device type. There's no OpenGL 170 | // "device pointer" to remember since OpenGL always operates on a currently set 171 | // global context. 172 | if (deviceType == kGfxRendererOpenGL) 173 | { 174 | DebugLog ("Set OpenGL graphics device\n"); 175 | g_DeviceType = deviceType; 176 | } 177 | #endif 178 | } 179 | 180 | 181 | 182 | // ------------------------------------------------------------------- 183 | // Direct3D 9 setup/teardown code 184 | 185 | 186 | #if SUPPORT_D3D9 187 | 188 | static IDirect3DDevice9* g_D3D9Device; 189 | //don't forget to cleanup these at the end !!! 190 | /* 191 | IDirect3D9Ex * g_pDirect3D9Ex = NULL; 192 | IDirect3DDevice9Ex * g_pDeviceD3D9ex = NULL; 193 | */ 194 | bool is64bit = ( sizeof(int*) == 8 ); 195 | 196 | static void SetGraphicsDeviceD3D9 (IDirect3DDevice9* device, GfxDeviceEventType eventType) 197 | { 198 | g_D3D9Device = device; 199 | } 200 | 201 | #endif // #if SUPPORT_D3D9 202 | 203 | 204 | 205 | // ------------------------------------------------------------------- 206 | // Direct3D 11 setup/teardown code 207 | 208 | 209 | #if SUPPORT_D3D11 210 | 211 | static ID3D11Device* g_D3D11Device; 212 | // Global Variables 213 | ID3D11DeviceContext* g_pImmediateContext = NULL; 214 | 215 | static void SetGraphicsDeviceD3D11 (ID3D11Device* device, GfxDeviceEventType eventType) 216 | { 217 | printf("Set Graphics Device D3D11 , check : %i",eventType); 218 | g_D3D11Device = device; 219 | g_D3D11Device->GetImmediateContext(&g_pImmediateContext); 220 | } 221 | 222 | #endif // #if SUPPORT_D3D11 -------------------------------------------------------------------------------- /NativeSpoutPlugin/src/dllmain.cpp: -------------------------------------------------------------------------------- 1 | // dllmain.cpp : Defines the entry point for the DLL application. 2 | #include "stdafx.h" 3 | 4 | BOOL APIENTRY DllMain( HMODULE hModule, 5 | DWORD ul_reason_for_call, 6 | LPVOID lpReserved 7 | ) 8 | { 9 | switch (ul_reason_for_call) 10 | { 11 | case DLL_PROCESS_ATTACH: 12 | case DLL_THREAD_ATTACH: 13 | case DLL_THREAD_DETACH: 14 | case DLL_PROCESS_DETACH: 15 | break; 16 | } 17 | return TRUE; 18 | } 19 | 20 | -------------------------------------------------------------------------------- /NativeSpoutPlugin/src/ipch/nativespoutplugin-82fd5ce/nativespoutplugin-1954ecb5.ipch: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sloopidoopi/Spout4Unity/5cb448f30b807aa08d98269fef04d59547c201bd/NativeSpoutPlugin/src/ipch/nativespoutplugin-82fd5ce/nativespoutplugin-1954ecb5.ipch -------------------------------------------------------------------------------- /NativeSpoutPlugin/src/ipch/nativespoutplugin-82fd5ce/nativespoutplugin-da1bc1b7.ipch: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sloopidoopi/Spout4Unity/5cb448f30b807aa08d98269fef04d59547c201bd/NativeSpoutPlugin/src/ipch/nativespoutplugin-82fd5ce/nativespoutplugin-da1bc1b7.ipch -------------------------------------------------------------------------------- /NativeSpoutPlugin/src/stdafx.h: -------------------------------------------------------------------------------- 1 | // stdafx.h : include file for standard system include files, 2 | // or project specific include files that are used frequently, but 3 | // are changed infrequently 4 | // 5 | 6 | #pragma once 7 | 8 | #include "targetver.h" 9 | 10 | #define WIN32_LEAN_AND_MEAN // Exclude rarely-used stuff from Windows headers 11 | // Windows Header Files: 12 | #include 13 | 14 | 15 | 16 | // TODO: reference additional headers your program requires here 17 | -------------------------------------------------------------------------------- /NativeSpoutPlugin/src/targetver.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | // Including SDKDDKVer.h defines the highest available Windows platform. 4 | 5 | // If you wish to build your application for a previous Windows platform, include WinSDKVer.h and 6 | // set the _WIN32_WINNT macro to the platform you wish to support before including SDKDDKVer.h. 7 | 8 | #include 9 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Spout4Unity 2 | Spout2 support for Unity3D 3 | 4 | This plugin allows Unity to receive and share textures from and to external softwares like Resolume, Adobe AIR, After Effects... 5 | It has been updated to fully supports the Spout2SDK available here : https://github.com/leadedge/Spout2 6 | 7 | This is a new repository based on the original SpoutPlugin from Benjamin Kuperberg. 8 | 9 | The components now work in play&edit mode. You can enable/disable the spout components. 10 | 11 | Known issues: 12 | 13 | If you enable/disable multiple Unity senders at the same time or in a short interval you can break the connection to the texture in an external Unity receiver. 14 | 15 | If you change the Unity scene with the 'editor enabled' option it is possible to loose the connections to the external senders and receivers. (The plugin disable and enable itself on a scene change) 16 | -------------------------------------------------------------------------------- /UnitySpoutDemo/.gitignore: -------------------------------------------------------------------------------- 1 | # OS generated files # 2 | ###################### 3 | .DS_Store 4 | .DS_Store? 5 | ._* 6 | .Spotlight-V100 7 | .Trashes 8 | ehthumbs.db 9 | Thumbs.db 10 | desktop.ini 11 | 12 | # Unity # 13 | ######### 14 | /[Ll]ibrary 15 | /[Tt]emp 16 | *.unityproj 17 | 18 | # Visual Studio # 19 | ################# 20 | /[Oo]bj 21 | *.sln 22 | *.csproj 23 | *.suo 24 | *.userprefs 25 | *.pidb 26 | *.DotSettings 27 | *.DotSettings.user 28 | *.vs 29 | 30 | # Other # 31 | ######### 32 | /Export 33 | /Built 34 | -------------------------------------------------------------------------------- /UnitySpoutDemo/Assets/Editor.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 85759f88ccb16a347b87dd31e7beea55 3 | folderAsset: yes 4 | DefaultImporter: 5 | userData: 6 | -------------------------------------------------------------------------------- /UnitySpoutDemo/Assets/Plugins.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 05a89afb32ff4cd48a0278f931aa903b 3 | -------------------------------------------------------------------------------- /UnitySpoutDemo/Assets/Plugins/x64.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 88edf2073bcf0fe48bd32e0b017c9e68 3 | folderAsset: yes 4 | DefaultImporter: 5 | userData: 6 | -------------------------------------------------------------------------------- /UnitySpoutDemo/Assets/Plugins/x64/NativeSpoutPlugin.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sloopidoopi/Spout4Unity/5cb448f30b807aa08d98269fef04d59547c201bd/UnitySpoutDemo/Assets/Plugins/x64/NativeSpoutPlugin.dll -------------------------------------------------------------------------------- /UnitySpoutDemo/Assets/Plugins/x64/NativeSpoutPlugin.dll.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 7eb64a8b18009284cad48a7abb86abf8 3 | PluginImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | iconMap: {} 7 | executionOrder: {} 8 | defineConstraints: [] 9 | isPreloaded: 0 10 | isOverridable: 0 11 | isExplicitlyReferenced: 0 12 | validateReferences: 1 13 | platformData: 14 | - first: 15 | Any: 16 | second: 17 | enabled: 1 18 | settings: {} 19 | - first: 20 | Editor: Editor 21 | second: 22 | enabled: 0 23 | settings: 24 | CPU: x86_64 25 | DefaultValueInitialized: true 26 | - first: 27 | Facebook: Win 28 | second: 29 | enabled: 0 30 | settings: 31 | CPU: None 32 | - first: 33 | Facebook: Win64 34 | second: 35 | enabled: 1 36 | settings: 37 | CPU: AnyCPU 38 | - first: 39 | Standalone: Linux 40 | second: 41 | enabled: 0 42 | settings: 43 | CPU: None 44 | - first: 45 | Standalone: Linux64 46 | second: 47 | enabled: 1 48 | settings: 49 | CPU: x86_64 50 | - first: 51 | Standalone: LinuxUniversal 52 | second: 53 | enabled: 1 54 | settings: 55 | CPU: x86_64 56 | - first: 57 | Standalone: OSXUniversal 58 | second: 59 | enabled: 0 60 | settings: 61 | CPU: x86_64 62 | - first: 63 | Standalone: Win 64 | second: 65 | enabled: 0 66 | settings: 67 | CPU: None 68 | - first: 69 | Standalone: Win64 70 | second: 71 | enabled: 1 72 | settings: 73 | CPU: AnyCPU 74 | userData: 75 | assetBundleName: 76 | assetBundleVariant: 77 | -------------------------------------------------------------------------------- /UnitySpoutDemo/Assets/Plugins/x86.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: cd92f1d1113338c4a8b6fb7a36366a15 3 | folderAsset: yes 4 | DefaultImporter: 5 | userData: 6 | -------------------------------------------------------------------------------- /UnitySpoutDemo/Assets/Plugins/x86/NativeSpoutPlugin.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sloopidoopi/Spout4Unity/5cb448f30b807aa08d98269fef04d59547c201bd/UnitySpoutDemo/Assets/Plugins/x86/NativeSpoutPlugin.dll -------------------------------------------------------------------------------- /UnitySpoutDemo/Assets/Plugins/x86/NativeSpoutPlugin.dll.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: df84cbe38de8ad2489673aa55b8512bc 3 | PluginImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | iconMap: {} 7 | executionOrder: {} 8 | defineConstraints: [] 9 | isPreloaded: 0 10 | isOverridable: 0 11 | isExplicitlyReferenced: 0 12 | validateReferences: 1 13 | platformData: 14 | - first: 15 | Any: 16 | second: 17 | enabled: 1 18 | settings: {} 19 | - first: 20 | Editor: Editor 21 | second: 22 | enabled: 0 23 | settings: 24 | CPU: x86 25 | DefaultValueInitialized: true 26 | - first: 27 | Facebook: Win 28 | second: 29 | enabled: 1 30 | settings: 31 | CPU: AnyCPU 32 | - first: 33 | Facebook: Win64 34 | second: 35 | enabled: 0 36 | settings: 37 | CPU: None 38 | - first: 39 | Standalone: Linux 40 | second: 41 | enabled: 1 42 | settings: 43 | CPU: x86 44 | - first: 45 | Standalone: Linux64 46 | second: 47 | enabled: 0 48 | settings: 49 | CPU: None 50 | - first: 51 | Standalone: LinuxUniversal 52 | second: 53 | enabled: 1 54 | settings: 55 | CPU: x86 56 | - first: 57 | Standalone: OSXUniversal 58 | second: 59 | enabled: 0 60 | settings: 61 | CPU: x86 62 | - first: 63 | Standalone: Win 64 | second: 65 | enabled: 1 66 | settings: 67 | CPU: AnyCPU 68 | - first: 69 | Standalone: Win64 70 | second: 71 | enabled: 0 72 | settings: 73 | CPU: None 74 | userData: 75 | assetBundleName: 76 | assetBundleVariant: 77 | -------------------------------------------------------------------------------- /UnitySpoutDemo/Assets/ReadMe.txt: -------------------------------------------------------------------------------- 1 | Before you can start with Spout4Unity you have to check if you installed the Spout2 infrastructure (get from https://github.com/leadedge/Spout2/releases) 2 | This Spout4Unity release is tested with https://github.com/leadedge/Spout2/releases/download/v2.002-beta/SpoutSetup_V2.002-beta.zip 3 | 4 | With the installation you get a couple of demo apps you can use for testing. Go to the Spout installation folder.In the DEMO folder you can start the SpoutReceiver.exe and the SpoutSender.exe 5 | 6 | Spout4Unity comes with a couple of demo scenes (Assets/Spout/Scenes). For testing sending&receiving start the 'Spout2 Sender.and.Receiver' scene. 7 | 8 | 9 | General Setup: 10 | Add a Spout Component to your Scene. Normally you have to enter the play mode to see the texture sharing but you can enable the 'Is Enabled in Editor' option. 11 | 12 | Receiving a Spout texture in Unity: 13 | 14 | Add the SpoutReceiver component to a Gameobject that has a Mesh Renderer and a Material attached. (The Material should not be used by other SpoutReceivers!) 15 | If you have only one external Spout texture source you can use under 'Select sender' the 'Any' option, so the first registered Spout texture is displayed. 16 | For more complex set-ups with multiple texture shares you should explicit set a name which texture you want to display. (Select sender 'Other(specify)' and enter the name of your Spout texture share name) 17 | Depending on the name you use in your external SpoutSender app you have to change the 'Sender name' property of your SpoutReceiver component in Unity.(Or use 'Any' for 'Select sender' option) 18 | 19 | 20 | Sending a Spout texture from Unity: 21 | 22 | Setup a camera in your Unity scene: Select a RenderTexture in the 'Target Texture' property to render into. 23 | Add the SpoutSender component to your Camera: 24 | Use a sharing name for your texture. (Has to be unique on your system so Spout can provide this texture to other clients under this name) 25 | Select a RenderTexture. (You have to select the RenderTexture that your Camera uses for rendering!) 26 | (RenderTexture settings: Color Format: ARGB32, Depth Buffer: No depth buffer) 27 | Depending on Unity's current DirectX mode and the graphics card of your system you have to change the Texture Format of your Spout Senders. 28 | DX9(Normal Unity rendering mode): Should work with all modes 29 | DX11: DXGI_FORMAT_R8G8B8A8_UNORM 30 | 31 | 32 | If you use the Unity PostProcessing stack you have to ensure that the "Invert Camera" script is below the PostProcessLayer Component in the Component inspector of your SpoutSender.(Otherwise the postprocessing scripts will override some camera settings and the script doesn't work as expected) 33 | https://github.com/Unity-Technologies/PostProcessing/issues/546 34 | 35 | 36 | 37 | 38 | 39 | -------------------------------------------------------------------------------- /UnitySpoutDemo/Assets/ReadMe.txt.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: a1e1bf38ce386014598ed40aedbd12e7 3 | timeCreated: 1432626875 4 | licenseType: Pro 5 | TextScriptImporter: 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /UnitySpoutDemo/Assets/Spout.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: bd82da351d1c65a43a6cb033cbfe4f25 3 | folderAsset: yes 4 | DefaultImporter: 5 | userData: 6 | -------------------------------------------------------------------------------- /UnitySpoutDemo/Assets/Spout/Editor.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: a20141a3dfa771948b4b02c7764b2398 3 | folderAsset: yes 4 | DefaultImporter: 5 | userData: 6 | -------------------------------------------------------------------------------- /UnitySpoutDemo/Assets/Spout/Editor/SpoutReceiverEditor.cs: -------------------------------------------------------------------------------- 1 | /* 2 | * Spout4Unity 3 | * Copyright © 2014-2015 Benjamin Kuperberg 4 | * Copyright © 2015 Stefan Schlupek 5 | * All rights reserved 6 | */ 7 | using UnityEngine; 8 | using System.Collections; 9 | using UnityEditor; 10 | using System; 11 | 12 | namespace Spout{ 13 | [CustomEditor(typeof(SpoutReceiver))] 14 | [CanEditMultipleObjects] 15 | [Serializable] 16 | public class SpoutReceiverEditor : Editor { 17 | 18 | SpoutReceiver receiver; 19 | 20 | [SerializeField] 21 | private int _popupIndex; 22 | 23 | string[] options; 24 | 25 | string currentName; 26 | 27 | 28 | void OnEnable() 29 | { 30 | 31 | if(receiver == null) 32 | { 33 | receiver = target as SpoutReceiver; 34 | Spout.instance.addListener(texShared,senderStopped); 35 | 36 | updateOptions(); 37 | } 38 | 39 | 40 | //Debug.Log ("Enable popup Index : "+popupIndex); 41 | } 42 | 43 | void OnDisable(){ 44 | //if(target == null)return; 45 | Spout.removeListener(texShared,senderStopped); 46 | } 47 | 48 | public void texShared(TextureInfo texInfo) 49 | { 50 | //Debug.Log ("Editor : senderStarted :"+texInfo.name); 51 | updateOptions(); 52 | } 53 | 54 | public void senderStopped(TextureInfo texInfo) 55 | { 56 | //Debug.Log ("Editor : senderStopped :"+texInfo.name); 57 | updateOptions(); 58 | } 59 | 60 | void updateOptions(bool assignNewName = true) 61 | { 62 | 63 | string oldSharingName = receiver.sharingName; 64 | int newPopupIndex = 0; 65 | 66 | bool found = false; 67 | 68 | options = new string[Spout.instance.activeSenders.Count+2]; 69 | options[0] = "Any"; 70 | 71 | for(int i=0;i m_cams; 21 | 22 | // Start is called before the first frame update 23 | void Start() 24 | { 25 | 26 | } 27 | 28 | // Update is called once per frame 29 | void Update() 30 | { 31 | 32 | #if UNITY_EDITOR 33 | 34 | if (enabled) { 35 | 36 | if (!Application.isPlaying) 37 | { 38 | _UpdateChildCameras(); 39 | 40 | } 41 | } 42 | #endif 43 | } 44 | 45 | private void OnEnable() 46 | { 47 | m_cam = GetComponent(); 48 | m_cams = GetComponentsInChildren(true)?.ToList(); 49 | 50 | } 51 | 52 | 53 | private void OnDisable() 54 | { 55 | 56 | } 57 | 58 | private Vector3 m_pos,m_scale; 59 | private Quaternion m_rot; 60 | 61 | 62 | 63 | private void _UpdateChildCameras() 64 | { 65 | if (m_cams == null || m_cam == null) return; 66 | 67 | m_cams.ForEach(c => { 68 | var rt = c.targetTexture; 69 | m_pos = c.transform.position; 70 | m_rot = c.transform.rotation; 71 | m_scale = c.transform.localScale; 72 | c.CopyFrom(m_cam);//fast way to copy all settings in one call, but we have to restore some settings by hand 73 | c.targetTexture = rt; 74 | c.transform.position = m_pos; 75 | c.transform.rotation = m_rot; 76 | c.transform.localScale = m_scale; 77 | 78 | }); 79 | 80 | } 81 | 82 | } 83 | } 84 | -------------------------------------------------------------------------------- /UnitySpoutDemo/Assets/Spout/Scripts/CameraSettingsSynchronizer.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: b6fae058130ece3438a4ebc940e04d75 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /UnitySpoutDemo/Assets/Spout/Scripts/InvertCamera.cs: -------------------------------------------------------------------------------- 1 | //http://docs.unity3d.com/412/Documentation/ScriptReference/Camera.OnPreCull.html 2 | using UnityEngine; 3 | using System.Collections; 4 | 5 | namespace Spout{ 6 | 7 | [RequireComponent (typeof(Camera))] 8 | [ExecuteInEditMode] 9 | public class InvertCamera : MonoBehaviour { 10 | //public Camera camera; 11 | 12 | protected bool invertCulling = true; 13 | protected Camera m_cam; 14 | private void Awake() 15 | { 16 | m_cam = GetComponent(); 17 | } 18 | void Start () { 19 | //camera = get 20 | } 21 | private void OnEnable() 22 | { 23 | m_cam = GetComponent(); 24 | } 25 | private void OnDisable() 26 | { 27 | if (m_cam == null) return; 28 | m_cam.ResetWorldToCameraMatrix(); 29 | m_cam.ResetProjectionMatrix(); 30 | } 31 | 32 | void OnPreCull () { 33 | //return; 34 | if (m_cam == null || !enabled) return; 35 | m_cam.ResetWorldToCameraMatrix(); 36 | m_cam.ResetProjectionMatrix(); 37 | m_cam.projectionMatrix = m_cam.projectionMatrix * Matrix4x4.Scale(new Vector3(1, -1, 1)); 38 | } 39 | 40 | void OnPreRender () { 41 | 42 | if (enabled) 43 | { 44 | if (invertCulling) GL.invertCulling = true; 45 | } 46 | 47 | } 48 | 49 | void OnPostRender () { 50 | 51 | GL.invertCulling = false; 52 | 53 | } 54 | 55 | } 56 | 57 | } -------------------------------------------------------------------------------- /UnitySpoutDemo/Assets/Spout/Scripts/InvertCamera.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: b88f1d1faa35b574594171c19a0f6d30 3 | MonoImporter: 4 | serializedVersion: 2 5 | defaultReferences: [] 6 | executionOrder: 0 7 | icon: {instanceID: 0} 8 | userData: 9 | -------------------------------------------------------------------------------- /UnitySpoutDemo/Assets/Spout/Scripts/MouseOrbitImproved.cs: -------------------------------------------------------------------------------- 1 | //https://wiki.unity3d.com/index.php/MouseOrbitImproved 2 | using UnityEngine; 3 | using System.Collections; 4 | 5 | [AddComponentMenu("Camera-Control/Mouse Orbit with zoom")] 6 | public class MouseOrbitImproved : MonoBehaviour { 7 | 8 | [Tooltip("Orbit only while left mouse button is down")] 9 | public bool useMouseDown; 10 | public Transform target; 11 | public float distance = 5.0f; 12 | public float xSpeed = 120.0f; 13 | public float ySpeed = 120.0f; 14 | 15 | public float yMinLimit = -20f; 16 | public float yMaxLimit = 80f; 17 | 18 | public float distanceMin = .5f; 19 | public float distanceMax = 15f; 20 | 21 | private Rigidbody m_rigidbody; 22 | 23 | float x = 0.0f; 24 | float y = 0.0f; 25 | 26 | // Use this for initialization 27 | void Start () 28 | { 29 | Vector3 angles = transform.eulerAngles; 30 | x = angles.y; 31 | y = angles.x; 32 | 33 | m_rigidbody = GetComponent(); 34 | 35 | // Make the rigid body not change rotation 36 | if (m_rigidbody != null) 37 | { 38 | m_rigidbody.freezeRotation = true; 39 | } 40 | } 41 | 42 | void LateUpdate () 43 | { 44 | if (useMouseDown && !Input.GetMouseButton(0)) return; 45 | if (target) 46 | { 47 | x += Input.GetAxis("Mouse X") * xSpeed * distance * 0.02f; 48 | y -= Input.GetAxis("Mouse Y") * ySpeed * 0.02f; 49 | 50 | y = ClampAngle(y, yMinLimit, yMaxLimit); 51 | 52 | Quaternion rotation = Quaternion.Euler(y, x, 0); 53 | 54 | distance = Mathf.Clamp(distance - Input.GetAxis("Mouse ScrollWheel")*5, distanceMin, distanceMax); 55 | 56 | RaycastHit hit; 57 | if (Physics.Linecast (target.position, transform.position, out hit)) 58 | { 59 | distance -= hit.distance; 60 | } 61 | Vector3 negDistance = new Vector3(0.0f, 0.0f, -distance); 62 | Vector3 position = rotation * negDistance + target.position; 63 | 64 | transform.rotation = rotation; 65 | transform.position = position; 66 | } 67 | } 68 | 69 | public static float ClampAngle(float angle, float min, float max) 70 | { 71 | if (angle < -360F) 72 | angle += 360F; 73 | if (angle > 360F) 74 | angle -= 360F; 75 | return Mathf.Clamp(angle, min, max); 76 | } 77 | } -------------------------------------------------------------------------------- /UnitySpoutDemo/Assets/Spout/Scripts/MouseOrbitImproved.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: f2734064e51e1ab42bbd0348615bb74f 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /UnitySpoutDemo/Assets/Spout/Scripts/Spout.cs: -------------------------------------------------------------------------------- 1 | /* 2 | * Spout4Unity 3 | * Copyright © 2014-2015 Benjamin Kuperberg 4 | * Copyright © 2015-2019 Stefan Schlupek 5 | * All rights reserved 6 | */ 7 | using UnityEngine; 8 | using System; 9 | using System.Collections; 10 | using System.Collections.Generic; 11 | using System.Runtime.InteropServices; 12 | using System.Linq; 13 | 14 | namespace Spout{ 15 | 16 | [ExecuteInEditMode] 17 | public class Spout : MonoBehaviour { 18 | 19 | #region public 20 | public event EventHandler OnSenderStopped; 21 | public event Action OnEnabled; 22 | public event Action OnAllSendersStopped; 23 | 24 | public delegate void TextureSharedDelegate(TextureInfo texInfo); 25 | public TextureSharedDelegate texSharedDelegate; 26 | public delegate void SenderStoppedDelegate(TextureInfo texInfo); 27 | public SenderStoppedDelegate senderStoppedDelegate; 28 | 29 | public List activeSenders; 30 | public List activeLocalSenders; 31 | public HashSet localSenderNames; 32 | 33 | 34 | public static bool isInit { 35 | get{return _isInit;} 36 | } 37 | public static bool isEnabledInEditor{ 38 | get{ 39 | return _instance == null ? false : _instance._isEnabledInEditor; 40 | //return _isEnabledInEditor; 41 | } 42 | } 43 | //You can use a fakeName of your choice .It's just to force an update in the Spout Receiver at start even if the 'offical' sharingName doesn't change. 44 | public static string fakeName = "SpoutIsSuperCoolAndMakesFun"; 45 | #endregion 46 | 47 | #region private 48 | 49 | 50 | private IntPtr intptr_senderUpdate_delegate; 51 | private IntPtr intptr_senderStarted_delegate; 52 | private IntPtr intptr_senderStopped_delegate; 53 | 54 | // Use GCHandle to hold the delegate object in memory. 55 | private GCHandle handleSenderUpdate; 56 | private GCHandle handleSenderStarted; 57 | private GCHandle handleSenderStopped; 58 | 59 | #if UNITY_EDITOR 60 | //To get a reference to the GameView 61 | private static System.Reflection.Assembly assembly; 62 | private static System.Type gameviewType; 63 | private static UnityEditor.EditorWindow gameview; 64 | #endif 65 | 66 | #pragma warning disable 414 67 | [SerializeField] 68 | private static bool _isInit; 69 | #pragma warning disable 649 70 | [SerializeField] 71 | private bool _isEnabledInEditor; 72 | #pragma warning restore 649 73 | #pragma warning restore 414 74 | private static bool isReceiving; 75 | 76 | private List newSenders; 77 | private List stoppedSenders; 78 | 79 | [SerializeField] 80 | private static Spout _instance; 81 | 82 | 83 | #pragma warning disable 414 84 | //In EditMode we have to force the camera to render.But as this is called 100 times per second beware of your performance, so we only render at a special interval 85 | private int _editorUpdateFrameInterval = 3; 86 | #pragma warning restore 414 87 | 88 | private int _frameCounter; 89 | #endregion 90 | 91 | [SerializeField] 92 | private static Texture2D _nullTexture ; 93 | public static Texture2D nullTexture{ 94 | get {return _nullTexture;} 95 | } 96 | 97 | 98 | 99 | public static Spout instance 100 | { 101 | get 102 | { 103 | if(_instance == null){ 104 | _instance = GameObject.FindObjectOfType(); 105 | if(_instance == null) { 106 | GameObject _go = new GameObject("Spout"); 107 | _instance = _go.AddComponent(); 108 | } 109 | if (Application.isPlaying) { 110 | DontDestroyOnLoad(_instance.gameObject); 111 | } 112 | } 113 | 114 | return _instance; 115 | } 116 | private set{_instance = value;} 117 | } 118 | 119 | 120 | // 121 | public void Awake(){ 122 | Debug.Log("Spout.Awake"); 123 | 124 | if(_instance != null && _instance != this ) 125 | { 126 | //Debug.Log("Spout.Awake.Destroy"); 127 | #if UNITY_EDITOR 128 | DestroyImmediate(this.gameObject); 129 | #else 130 | Destroy(this.gameObject); 131 | #endif 132 | return; 133 | } 134 | 135 | newSenders = new List(); 136 | stoppedSenders = new List(); 137 | activeSenders = new List(); 138 | activeLocalSenders = new List(); 139 | localSenderNames = new HashSet(); 140 | 141 | _nullTexture = new Texture2D(32,32); 142 | _nullTexture.hideFlags = HideFlags.HideAndDontSave; 143 | 144 | } 145 | public void OnEnable(){ 146 | //Debug.Log("Spout.OnEnable"); 147 | if(_instance != null && _instance != this ) 148 | { 149 | //Debug.Log("Spout.OnEnable.Destroy"); 150 | #if UNITY_EDITOR 151 | DestroyImmediate(this.gameObject); 152 | #else 153 | Destroy(this.gameObject); 154 | #endif 155 | return; 156 | } 157 | 158 | newSenders = new List(); 159 | stoppedSenders = new List(); 160 | activeSenders = new List(); 161 | activeLocalSenders = new List(); 162 | localSenderNames = new HashSet(); 163 | 164 | #if UNITY_EDITOR 165 | assembly = typeof(UnityEditor.EditorWindow).Assembly; 166 | gameviewType = assembly.GetType( "UnityEditor.GameView" ); 167 | gameview = UnityEditor.EditorWindow.GetWindow(gameviewType); 168 | #endif 169 | 170 | 171 | #if UNITY_EDITOR 172 | if(_isEnabledInEditor || Application.isPlaying){ 173 | _Enable(); 174 | } 175 | #else 176 | _Enable(); 177 | #endif 178 | 179 | 180 | } 181 | 182 | private void _Enable(){ 183 | //Debug.Log("Spout._Enable"); 184 | #if UNITY_EDITOR 185 | 186 | if(!Application.isPlaying){ 187 | UnityEditor.EditorApplication.update -= _Update; 188 | UnityEditor.EditorApplication.update += _Update; 189 | } 190 | #endif 191 | 192 | 193 | _Init(); 194 | //notify others so they can re-initialize 195 | if(OnEnabled != null) OnEnabled(); 196 | } 197 | 198 | private void _Disable(){ 199 | 200 | } 201 | 202 | private void _Init(){ 203 | //Debug.Log("Spout._Init"); 204 | 205 | initNative(); 206 | //Debug.Log("isReceiving:+"+isReceiving); 207 | 208 | _startReceiving(); 209 | _isInit = true; 210 | //if(debug) initDebugConsole(); 211 | } 212 | 213 | 214 | 215 | 216 | 217 | void Update() 218 | { 219 | //if(_instance == null || _instance != this ) return; 220 | 221 | _Update(); 222 | } 223 | private void _Update() 224 | { 225 | 226 | #if UNITY_EDITOR 227 | _frameCounter++; 228 | _frameCounter %= _editorUpdateFrameInterval; 229 | if(_frameCounter == 0){ 230 | UnityEditor.SceneView.RepaintAll(); 231 | gameview.Repaint(); 232 | } 233 | #endif 234 | 235 | if(isReceiving){ 236 | //Debug.Log("checkReceivers"); 237 | checkReceivers(); 238 | } 239 | 240 | lock(this){ 241 | foreach(TextureInfo s in newSenders) 242 | { 243 | //Debug.Log("texSharedDelegate"); 244 | activeSenders.Add (s); 245 | if(texSharedDelegate != null) texSharedDelegate(s); 246 | 247 | } 248 | 249 | newSenders.Clear(); 250 | 251 | foreach(TextureInfo s in stoppedSenders) 252 | { 253 | foreach(TextureInfo t in activeSenders) 254 | { 255 | if(s.name == t.name) 256 | { 257 | activeSenders.Remove(t); 258 | break; 259 | } 260 | } 261 | 262 | //Debug.Log ("Stopped sender from Spout :"+s.name); 263 | if(senderStoppedDelegate != null) senderStoppedDelegate(s); 264 | } 265 | 266 | stoppedSenders.Clear(); 267 | }//lock 268 | } 269 | 270 | public void OnDisable(){ 271 | //Debug.Log("Spout.OnDisable"); 272 | if(_instance != this)return; 273 | 274 | #if UNITY_EDITOR 275 | UnityEditor.EditorApplication.update -= _Update; 276 | #endif 277 | 278 | StopAllLocalSenders(); 279 | //Force the Plugin to check. Otherwise we don't get a SenderStopped delegate call 280 | Update(); 281 | 282 | //Debug.Log("Spout.OnDisable.End"); 283 | } 284 | 285 | void OnDestroy() 286 | { 287 | //Debug.Log("Spout.OnDestroy"); 288 | if(_instance != this)return; 289 | 290 | if(_isInit){ 291 | _CleanUpResources(); 292 | } 293 | 294 | isReceiving = false; 295 | _isInit = false; 296 | newSenders = null; 297 | stoppedSenders = null; 298 | activeSenders = null; 299 | activeLocalSenders = null; 300 | localSenderNames = null; 301 | 302 | OnEnabled = null; 303 | OnSenderStopped= null; 304 | 305 | _instance = null; 306 | 307 | 308 | GC.Collect();//?? 309 | 310 | } 311 | 312 | private void _CleanUpResources(){ 313 | clean(); 314 | 315 | _instance.texSharedDelegate = null; 316 | _instance.senderStoppedDelegate = null; 317 | 318 | _instance.handleSenderUpdate.Free(); 319 | _instance.handleSenderStarted.Free(); 320 | _instance.handleSenderStopped.Free(); 321 | 322 | intptr_senderUpdate_delegate = IntPtr.Zero; 323 | intptr_senderStarted_delegate = IntPtr.Zero; 324 | intptr_senderStopped_delegate = IntPtr.Zero; 325 | 326 | 327 | } 328 | 329 | 330 | public void addListener(TextureSharedDelegate sharedCallback, SenderStoppedDelegate stoppedCallback ) 331 | { 332 | // Debug.Log ("Spout.addListener"); 333 | if(_instance == null)return; 334 | _instance.texSharedDelegate += sharedCallback; 335 | _instance.senderStoppedDelegate += stoppedCallback; 336 | } 337 | 338 | public static void removeListener(TextureSharedDelegate sharedCallback, SenderStoppedDelegate stoppedCallback ) 339 | { 340 | // Debug.Log ("Spout.removeListener"); 341 | if(_instance == null)return; 342 | _instance.texSharedDelegate -= sharedCallback; 343 | _instance.senderStoppedDelegate -= stoppedCallback; 344 | } 345 | 346 | public bool CreateSender(string sharingName, Texture tex, int texFormat = 1) 347 | { 348 | if(!enabled)return false; 349 | if(!_isInit)return false; 350 | #if UNITY_EDITOR 351 | if(!Application.isPlaying && !_isEnabledInEditor ) return false; 352 | #endif 353 | //Debug.Log("Spout.CreateSender"); 354 | Debug.Log("Spout.CreateSender:"+sharingName+"::"+tex.GetNativeTexturePtr().ToInt32()); 355 | bool result = createSenderNative(sharingName, tex.GetNativeTexturePtr(), texFormat); 356 | if (!result) Debug.LogWarning (String.Format("Spout sender creation with name {0} failed !",sharingName)); 357 | if(result) { 358 | //Debug.Log (String.Format("Spout sender creation with name {0} success !",sharingName)); 359 | localSenderNames.Add(sharingName); 360 | } 361 | return result; 362 | } 363 | 364 | public bool UpdateSender(string sharingName, Texture tex) 365 | { 366 | if(enabled == false || gameObject.activeInHierarchy == false || _isInit == false)return false; 367 | //Debug.Log("Spout.UpdateSender:"+sharingName+"::"+tex.GetNativeTexturePtr().ToInt32()); 368 | return updateSenderNative(sharingName, tex.GetNativeTexturePtr()); 369 | } 370 | 371 | 372 | public TextureInfo getTextureInfo (string sharingName) 373 | { 374 | if(activeSenders == null) return null; 375 | 376 | foreach(TextureInfo tex in activeSenders) 377 | { 378 | if(tex.name == sharingName) return tex; 379 | } 380 | 381 | if(sharingName != Spout.fakeName) Debug.Log (String.Format("sharing name {0} not found",sharingName)); 382 | 383 | return null; 384 | } 385 | 386 | //Imports 387 | [DllImport ("NativeSpoutPlugin", EntryPoint="init")] 388 | public static extern bool initNative(); 389 | 390 | [DllImport ("NativeSpoutPlugin", EntryPoint="initDebugConsole")] 391 | private static extern void _initDebugConsole(); 392 | 393 | [DllImport ("NativeSpoutPlugin")] 394 | private static extern void checkReceivers(); 395 | 396 | 397 | [DllImport ("NativeSpoutPlugin", EntryPoint="createSender")] 398 | private static extern bool createSenderNative (string sharingName, IntPtr texture, int texFormat); 399 | 400 | [DllImport ("NativeSpoutPlugin", EntryPoint="updateSender")] 401 | private static extern bool updateSenderNative (string sharingName, IntPtr texture); 402 | 403 | [DllImport ("NativeSpoutPlugin", EntryPoint="closeSender")] 404 | public static extern bool CloseSender (string sharingName); 405 | 406 | [DllImport ("NativeSpoutPlugin")] 407 | private static extern void clean(); 408 | 409 | 410 | [DllImport ("NativeSpoutPlugin", EntryPoint="startReceiving")] 411 | private static extern bool startReceivingNative(IntPtr senderUpdateHandler,IntPtr senderStartedHandler,IntPtr senderStoppedHandler); 412 | 413 | 414 | [UnmanagedFunctionPointer(CallingConvention.Cdecl)] 415 | public delegate void SpoutSenderUpdateDelegate(int numSenders); 416 | [UnmanagedFunctionPointer(CallingConvention.Cdecl)] 417 | public delegate void SpoutSenderStartedDelegate(string senderName, IntPtr resourceView,int textureWidth, int textureHeight); 418 | [UnmanagedFunctionPointer(CallingConvention.Cdecl)] 419 | public delegate void SpoutSenderStoppedDelegate(string senderName); 420 | 421 | 422 | public void initDebugConsole(){ 423 | //check if multiple inits? 424 | _initDebugConsole(); 425 | } 426 | 427 | 428 | 429 | private void _startReceiving() 430 | { 431 | if(isReceiving)return; 432 | //Debug.Log("Spout.startReceiving"); 433 | SpoutSenderUpdateDelegate senderUpdate_delegate = new SpoutSenderUpdateDelegate(SenderUpdate); 434 | handleSenderUpdate = GCHandle.Alloc(senderUpdate_delegate); 435 | intptr_senderUpdate_delegate = Marshal.GetFunctionPointerForDelegate (senderUpdate_delegate); 436 | 437 | SpoutSenderStartedDelegate senderStarted_delegate = new SpoutSenderStartedDelegate(SenderStarted); 438 | handleSenderStarted = GCHandle.Alloc(senderStarted_delegate); 439 | intptr_senderStarted_delegate = Marshal.GetFunctionPointerForDelegate (senderStarted_delegate); 440 | 441 | SpoutSenderStoppedDelegate senderStopped_delegate = new SpoutSenderStoppedDelegate(SenderStopped); 442 | handleSenderStopped = GCHandle.Alloc(senderStopped_delegate); 443 | intptr_senderStopped_delegate = Marshal.GetFunctionPointerForDelegate (senderStopped_delegate); 444 | 445 | isReceiving = startReceivingNative(intptr_senderUpdate_delegate, intptr_senderStarted_delegate, intptr_senderStopped_delegate); 446 | } 447 | 448 | private void SenderUpdate(int numSenders) 449 | { 450 | //Debug.Log("Sender update, numSenders : "+numSenders); 451 | } 452 | 453 | private void SenderStarted(string senderName, IntPtr resourceView,int textureWidth, int textureHeight) 454 | { 455 | Debug.Log("Spout. Sender started, sender name : "+senderName); 456 | if(_instance == null || _instance.activeLocalSenders == null || _instance.newSenders == null)return; 457 | lock(this){ 458 | TextureInfo texInfo = new TextureInfo(senderName); 459 | Debug.Log("resourceView:"+resourceView.ToInt32()); 460 | texInfo.setInfos(textureWidth,textureHeight,resourceView); 461 | _instance.newSenders.Add(texInfo); 462 | if(_instance.localSenderNames.Contains(texInfo.name)){ 463 | _instance.activeLocalSenders.Add(texInfo); 464 | //Debug.Log("activeLocalSenders.count:"+_instance.activeLocalSenders.Count); 465 | } 466 | Debug.Log("Spout.SenderStarted.End"); 467 | }//lock 468 | } 469 | private void SenderStopped(string senderName) 470 | { 471 | Debug.Log("Sender stopped, sender name : "+senderName); 472 | if(_instance == null || _instance.activeLocalSenders == null || _instance.stoppedSenders == null)return; 473 | lock(this){ 474 | TextureInfo texInfo = new TextureInfo(senderName); 475 | 476 | _instance.stoppedSenders.Add (texInfo); 477 | 478 | _instance.localSenderNames.Remove(texInfo.name); 479 | 480 | if(_instance.activeLocalSenders.Contains(texInfo)){ 481 | _instance.activeLocalSenders.Remove(texInfo); 482 | } 483 | }//lock 484 | //Debug.Log("localSenderNames.count:"+instance.localSenderNames.Count); 485 | //Debug.Log("activeLocalSenders.count:"+instance.activeLocalSenders.Count); 486 | } 487 | 488 | private void StopAllLocalSenders(){ 489 | 490 | Debug.Log("Spout.StopAllLocalSenders()"); 491 | if(_instance == null) return; 492 | foreach(TextureInfo t in _instance.activeLocalSenders) 493 | { 494 | CloseSender(t.name); 495 | if(OnSenderStopped != null) OnSenderStopped(this,new TextureShareEventArgs(t.name)); 496 | /* 497 | double i = 0; 498 | while(i< 100000000){ 499 | i++; 500 | } 501 | */ 502 | 503 | } 504 | 505 | if(OnAllSendersStopped != null) OnAllSendersStopped(); 506 | 507 | } 508 | 509 | } 510 | 511 | public class TextureShareEventArgs : EventArgs 512 | { 513 | public string sharingName {get; set; } 514 | 515 | public TextureShareEventArgs(string myString) 516 | { 517 | this.sharingName = myString; 518 | } 519 | } 520 | 521 | } 522 | 523 | 524 | -------------------------------------------------------------------------------- /UnitySpoutDemo/Assets/Spout/Scripts/Spout.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: aa175692d4b749244b474315598e4d14 3 | MonoImporter: 4 | serializedVersion: 2 5 | defaultReferences: [] 6 | executionOrder: 0 7 | icon: {instanceID: 0} 8 | userData: 9 | -------------------------------------------------------------------------------- /UnitySpoutDemo/Assets/Spout/Scripts/SpoutReceiver.cs: -------------------------------------------------------------------------------- 1 | /* 2 | * Spout4Unity 3 | * Copyright © 2014-2015 Benjamin Kuperberg 4 | * Copyright © 2015 Stefan Schlupek 5 | * All rights reserved 6 | */ 7 | using UnityEngine; 8 | using System.Collections; 9 | using System; 10 | 11 | namespace Spout{ 12 | [Serializable] 13 | [ExecuteInEditMode] 14 | public class SpoutReceiver : MonoBehaviour { 15 | 16 | [SerializeField] 17 | private string _sharingName; 18 | 19 | private Texture2D _texture; 20 | // leave false in this version! 21 | //private bool debugConsole = false; 22 | 23 | private bool _receiverIsReady; 24 | 25 | //If you have want to prevent the Console warnings about not existing Senders just turn on the StartupDelay and specify the frame delay 26 | private bool _startupDelay = true; 27 | //how many frames of delay 28 | private int _startupFramesDelay = 0; 29 | 30 | 31 | private int _startUpFrameCount; 32 | 33 | 34 | private string _tempName; 35 | 36 | 37 | // Use this for initialization 38 | void Awake () { 39 | // Debug.Log("SpoutReceiver.Awake"); 40 | //if(debugConsole) Spout2.instance.initDebugConsole(); 41 | 42 | } 43 | 44 | void Start() 45 | { 46 | 47 | } 48 | void OnEnable(){ 49 | //Debug.Log("SpoutReceiver.OnEnable"); 50 | //Add the listener immediately to get the events when Unity starts and the Spout plugin initialize. 51 | //Otherwise the external Spout Senders have to start afterwards to trigger the native plugin events 52 | Spout.instance.addListener(TexShared,TexStopped); 53 | 54 | #if UNITY_EDITOR 55 | 56 | if(!Application.isPlaying){ 57 | UnityEditor.EditorApplication.update -= _Update; 58 | UnityEditor.EditorApplication.update += _Update; 59 | } 60 | #endif 61 | 62 | _receiverIsReady = false; 63 | _startUpFrameCount = 0; 64 | if(!_startupDelay)_ForceTextureUpdate(); 65 | 66 | } 67 | 68 | void OnDisable(){ 69 | //Debug.Log("SpoutReceiver.OnDisable"); 70 | #if UNITY_EDITOR 71 | UnityEditor.EditorApplication.update -= _Update; 72 | #endif 73 | _receiverIsReady = false; 74 | _startUpFrameCount = 0; 75 | 76 | Spout.removeListener(TexShared,TexStopped); 77 | texture = null; 78 | GC.Collect(); 79 | } 80 | 81 | void OnDestroy(){ 82 | //Debug.Log("SpoutReceiver.OnDestroy"); 83 | } 84 | 85 | 86 | void Update(){ 87 | _Update(); 88 | } 89 | 90 | // Update is called once per frame 91 | void _Update () { 92 | //if(texture == null)_createNullTexture(); 93 | if(!_startupDelay)return; 94 | if(!_receiverIsReady){ 95 | _startUpFrameCount++; 96 | if( _startUpFrameCount < _startupFramesDelay)return; 97 | _ForceTextureUpdate(); 98 | } 99 | 100 | } 101 | 102 | private void _ForceTextureUpdate(){ 103 | //Debug.Log("SpoutReceiver._ForceTextureUpdate"); 104 | 105 | //Little hack to force an update of the Texture 106 | _tempName = _sharingName; 107 | sharingName = Spout.fakeName; 108 | sharingName = _tempName; 109 | _receiverIsReady = true; 110 | } 111 | 112 | public void TexShared(TextureInfo texInfo) 113 | { 114 | //Debug.Log("SpoutReceiver.texShared"); 115 | if(sharingName == "" || sharingName == texInfo.name || sharingName == "Any") 116 | { 117 | //Debug.Log("SpoutReceiver.texShared:"+texInfo.name); 118 | texture = texInfo.getTexture(); 119 | } 120 | } 121 | 122 | public void TexStopped(TextureInfo texInfo) 123 | { 124 | //Debug.Log("SpoutReceiver.texStopped:"+texInfo.name); 125 | if(texInfo.name == _sharingName) 126 | { 127 | //Debug.Log("SpoutReceiver.texStopped:"+texInfo.name); 128 | texture = Spout.nullTexture; 129 | 130 | 131 | } 132 | else if(sharingName == "Any" && Spout.instance.activeSenders.Count > 0) 133 | { 134 | texture = Spout.instance.activeSenders[Spout.instance.activeSenders.Count-1].getTexture(); 135 | } 136 | } 137 | 138 | public Texture2D texture 139 | { 140 | get { return _texture; } 141 | set { 142 | _texture = value; 143 | if(_texture == null) _texture = Spout.nullTexture; 144 | if(GetComponent() != null) 145 | { 146 | GetComponent().sharedMaterial.mainTexture = _texture; 147 | } 148 | } 149 | } 150 | [SerializeField] 151 | public string sharingName 152 | { 153 | get { return _sharingName; } 154 | set { 155 | if(_sharingName == value && sharingName != "Any") return; 156 | _sharingName = value; 157 | //Debug.Log("sharingName:"+_sharingName); 158 | if(sharingName == "Any") 159 | { 160 | if(Spout.instance.activeSenders != null && Spout.instance.activeSenders.Count > 0) 161 | { 162 | texture = Spout.instance.activeSenders[Spout.instance.activeSenders.Count-1].getTexture(); 163 | } 164 | }else 165 | { 166 | //Debug.Log ("Set sharing name :"+sharingName); 167 | TextureInfo texInfo = Spout.instance.getTextureInfo(sharingName); 168 | if(texInfo != null) { 169 | texture = texInfo.getTexture (); 170 | } 171 | else 172 | { 173 | if(sharingName != Spout.fakeName)Debug.LogWarning ("Sender "+sharingName+" does not exist"); 174 | texture = Spout.nullTexture; 175 | /* 176 | texture = new Texture2D(32,32); 177 | //new Texture2D(32,32,TextureFormat.RGBA32,true,true); 178 | texture.hideFlags = HideFlags.HideAndDontSave; 179 | */ 180 | } 181 | 182 | } 183 | 184 | } 185 | } 186 | 187 | 188 | 189 | 190 | } 191 | } 192 | -------------------------------------------------------------------------------- /UnitySpoutDemo/Assets/Spout/Scripts/SpoutReceiver.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 846b026f9a6af4049ae8cbc3b560f976 3 | MonoImporter: 4 | serializedVersion: 2 5 | defaultReferences: [] 6 | executionOrder: 0 7 | icon: {instanceID: 0} 8 | userData: 9 | -------------------------------------------------------------------------------- /UnitySpoutDemo/Assets/Spout/Scripts/SpoutSender.cs: -------------------------------------------------------------------------------- 1 | /* 2 | * Spout4Unity 3 | * Copyright © 2014-2015 Benjamin Kuperberg 4 | * Copyright © 2015 Stefan Schlupek 5 | * All rights reserved 6 | */ 7 | using UnityEngine; 8 | using System.Collections; 9 | using System; 10 | 11 | namespace Spout{ 12 | [Serializable] 13 | [ExecuteInEditMode] 14 | public class SpoutSender : MonoBehaviour { 15 | 16 | //according to dxgiformat.h : 17 | //tested with DXGI_FORMAT_R8G8B8A8_UNORM (ATI Card) 18 | public enum TextureFormat { DXGI_FORMAT_R32G32B32A32_FLOAT = 2, DXGI_FORMAT_R10G10B10A2_UNORM = 24, DXGI_FORMAT_R8G8B8A8_UNORM = 28, DXGI_FORMAT_B8G8R8A8_UNORM=87 } 19 | public string sharingName = "UnitySender"; 20 | public Texture texture; 21 | public TextureFormat textureFormat = TextureFormat.DXGI_FORMAT_R8G8B8A8_UNORM; 22 | public bool debugConsole = false; 23 | 24 | private bool senderIsCreated; 25 | 26 | private Camera _cam; 27 | 28 | //make this public if you want 29 | //It's better you set this always to true! 30 | //There are problems with creating a sender at OnEnable at Editor/App Start time so we have a little delay hack that calls the CreateSender at Update() 31 | private bool StartupDelay = true; 32 | // if there are problems you can increase this value 33 | private int _startupFramesDelay = 3; 34 | 35 | private int _startUpFrameCount; 36 | 37 | private int _createAttempts= 5; 38 | private int _attempts= 0; 39 | 40 | #pragma warning disable 414 41 | //In EditMode we have to force the camera to render.But as this is called 100 times per second beware of your performance, so we only render at a specific interval 42 | private int _editorUpdateFrameInterval = 10; 43 | #pragma warning restore 414 44 | 45 | private int _frameCounter; 46 | 47 | 48 | void Awake () { 49 | //Debug.Log("SpoutSender.Awake"); 50 | //if(debugConsole) Spout2.instance.initDebugConsole(); 51 | #if UNITY_EDITOR 52 | _cam = GetComponent() as Camera; 53 | #endif 54 | } 55 | 56 | void Start() 57 | { 58 | 59 | } 60 | 61 | void OnEnable(){ 62 | 63 | //Debug.Log("SpoutSender.OnEnable"); 64 | 65 | 66 | #if UNITY_EDITOR 67 | 68 | if(!Application.isPlaying){ 69 | UnityEditor.EditorApplication.update -= _Update; 70 | UnityEditor.EditorApplication.update += _Update; 71 | } 72 | #endif 73 | if(debugConsole) Spout.instance.initDebugConsole(); 74 | _startUpFrameCount = 0; 75 | _attempts = 0; 76 | 77 | //Problem with creatingSender and disabled hosting Gameobject.(You always have to call OnEnable twice to get a Sender created) 78 | //It's better to do the real createSender call at OnUpdate. 79 | if(!StartupDelay)_CreateSender(); 80 | 81 | } 82 | 83 | void OnDisable(){ 84 | Debug.Log("SpoutSender.OnDisable"); 85 | 86 | //we can't call Spout2.instance because on Disable is also called when scene is destroyed. 87 | //so a nother instance of Spout could be generated in the moment when the Spout2 instance is destroyed! 88 | 89 | 90 | #if UNITY_EDITOR 91 | UnityEditor.EditorApplication.update -= _Update; 92 | #endif 93 | 94 | _CloseSender(); 95 | } 96 | 97 | void Update(){ 98 | _Update(); 99 | } 100 | 101 | void _Update() 102 | { 103 | //Debug.Log("SpoutSender.Update"); 104 | if (texture == null) return; 105 | 106 | //in EditMode we have to force the camera to render.But as this is called 100 times per second beware of your performance, so we only render at a special interval 107 | #if UNITY_EDITOR 108 | if(!Application.isPlaying){ 109 | _frameCounter++; 110 | _frameCounter %= _editorUpdateFrameInterval; 111 | if(Spout.isEnabledInEditor){ 112 | if(_cam != null){ 113 | if(_frameCounter == 0) _cam.Render(); 114 | } 115 | } 116 | } 117 | #endif 118 | 119 | if(senderIsCreated) 120 | { 121 | Spout.instance.UpdateSender(sharingName,texture); 122 | //Debug.Log("Update sender :"+updateSenderResult); 123 | } 124 | else 125 | { 126 | 127 | //this is the delay 128 | 129 | if(StartupDelay){ 130 | _startUpFrameCount++; 131 | if( _startUpFrameCount < _startupFramesDelay)return; 132 | if(_attempts> _createAttempts)return; 133 | _CreateSender(); 134 | } 135 | 136 | } 137 | } 138 | 139 | void OnDestroy() 140 | { 141 | 142 | } 143 | 144 | 145 | private void _CreateSender(){ 146 | //Debug.Log("SpoutSender._CreateSender"); 147 | 148 | if (texture == null) return; 149 | if(!Spout.isInit)return; 150 | if(!Spout.instance.enabled)return; 151 | #if UNITY_EDITOR 152 | if(!Application.isPlaying && !Spout.isEnabledInEditor )return; 153 | #endif 154 | 155 | 156 | //Debug.Log("SpoutSender._CreateSender"); 157 | 158 | if (!senderIsCreated) { 159 | Debug.Log ("Sender is not created, creating one"); 160 | senderIsCreated = Spout.instance.CreateSender(sharingName, texture,(int) textureFormat); 161 | } 162 | 163 | _attempts++; 164 | if(_attempts > _createAttempts) Debug.LogWarning(String.Format("There are problems with creating the sender {0}. Please check your settings or restart Unity.",sharingName)); 165 | 166 | if (_cam != null) 167 | { 168 | if (_cam.targetTexture == null || _cam.targetTexture != texture) 169 | { 170 | Debug.LogWarning("Your Camera has no Target Texture or the texture that the Spout Sender uses is different!"); 171 | if (texture != null) _cam.targetTexture = (RenderTexture)texture; 172 | } 173 | } 174 | 175 | Spout.instance.OnSenderStopped -= OnSenderStoppedDelegate; 176 | Spout.instance.OnSenderStopped += OnSenderStoppedDelegate; 177 | 178 | Spout.instance.OnAllSendersStopped-=OnAllSendersStoppedDelegate; 179 | Spout.instance.OnAllSendersStopped+=OnAllSendersStoppedDelegate; 180 | 181 | Spout.instance.OnEnabled-= _OnSpoutEnabled; 182 | Spout.instance.OnEnabled+= _OnSpoutEnabled; 183 | } 184 | 185 | private void _OnSpoutEnabled(){ 186 | //Debug.Log("SpoutSender._OnSpoutEnabled"); 187 | if(enabled){ 188 | //force a reconnection 189 | enabled = !enabled; 190 | enabled = !enabled; 191 | } 192 | } 193 | 194 | private void _CloseSender(){ 195 | Debug.Log("SpoutSender._CloseSender:"+sharingName); 196 | if(senderIsCreated) Spout.CloseSender(sharingName); 197 | _CloseSenderCleanUpData(); 198 | } 199 | 200 | private void OnSenderStoppedDelegate(object sender, TextureShareEventArgs e){ 201 | //Debug.Log("SpoutSender.OnSenderStoppedDelegate:"+e.sharingName); 202 | if(e.sharingName == sharingName){ 203 | _CloseSenderCleanUpData(); 204 | } 205 | } 206 | 207 | private void OnAllSendersStoppedDelegate(){ 208 | _CloseSenderCleanUpData(); 209 | } 210 | 211 | private void _CloseSenderCleanUpData(){ 212 | senderIsCreated = false; 213 | } 214 | } 215 | } 216 | -------------------------------------------------------------------------------- /UnitySpoutDemo/Assets/Spout/Scripts/SpoutSender.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 6a2582b4147ea6e4ebf31586d3c7d730 3 | MonoImporter: 4 | serializedVersion: 2 5 | defaultReferences: [] 6 | executionOrder: 0 7 | icon: {instanceID: 0} 8 | userData: 9 | -------------------------------------------------------------------------------- /UnitySpoutDemo/Assets/Spout/Scripts/TextureInfo.cs: -------------------------------------------------------------------------------- 1 | /* 2 | * Spout4Unity 3 | * Copyright © 2014-2015 Benjamin Kuperberg 4 | * Copyright © 2015 Stefan Schlupek 5 | * All rights reserved 6 | */ 7 | using UnityEngine; 8 | using System.Collections; 9 | using System; 10 | 11 | namespace Spout{ 12 | 13 | public class TextureInfo { 14 | 15 | public string name; 16 | private int w; 17 | private int h; 18 | private IntPtr resourceView; 19 | 20 | private Texture2D tex; 21 | 22 | // Use this for initialization 23 | public TextureInfo (string name) { 24 | this.name = name; 25 | 26 | } 27 | 28 | public void setInfos(int width, int height, IntPtr resourceView){ 29 | this.w = width; 30 | this.h = height; 31 | this.resourceView = resourceView; 32 | } 33 | 34 | public Texture2D getTexture() 35 | { 36 | if(resourceView == IntPtr.Zero) 37 | { 38 | Debug.LogWarning("ResourceView is null, returning empty texture"); 39 | 40 | tex = null; 41 | //Resources.UnloadUnusedAssets(); 42 | //GC.Collect(); 43 | //There could be problems with creating a Texture2d at this point! 44 | //tex = new Texture2D(64,64,TextureFormat.RGBA32,false,true);//new Texture2D(64,64); 45 | //tex.hideFlags = HideFlags.HideAndDontSave; 46 | 47 | } 48 | else 49 | { 50 | if(tex == null) { 51 | tex = Texture2D.CreateExternalTexture(w,h,TextureFormat.RGBA32,true,true,resourceView); 52 | /* 53 | Without setting the Hideflags there seems to be a reference floating in the scene which causes great trouble with [ExecuteInEditmode] at OnDestroy 54 | And we get some weired exception when enter PlayMode and there is an already open Spout sender outside from Unity 55 | */ 56 | tex.hideFlags = HideFlags.HideAndDontSave; 57 | 58 | } 59 | } 60 | 61 | return tex; 62 | 63 | 64 | } 65 | 66 | //Make it comparable for Linq 67 | 68 | public override bool Equals(object obj) 69 | { 70 | TextureInfo q = obj as TextureInfo; 71 | return q != null && q.name == this.name ; 72 | } 73 | 74 | public override int GetHashCode() 75 | { 76 | return this.name.GetHashCode() ^ this.name.GetHashCode(); 77 | } 78 | 79 | 80 | 81 | } 82 | } 83 | -------------------------------------------------------------------------------- /UnitySpoutDemo/Assets/Spout/Scripts/TextureInfo.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 9403bcc28b14bab4086ab044f04eb4e2 3 | MonoImporter: 4 | serializedVersion: 2 5 | defaultReferences: [] 6 | executionOrder: 0 7 | icon: {instanceID: 0} 8 | userData: 9 | -------------------------------------------------------------------------------- /UnitySpoutDemo/Assets/Spout/Textures.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 0db36cf249685f541b554063b74d98ff 3 | folderAsset: yes 4 | DefaultImporter: 5 | userData: 6 | -------------------------------------------------------------------------------- /UnitySpoutDemo/Assets/Spout/Textures/SpoutRenderTexture.0.renderTexture: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!84 &8400000 4 | RenderTexture: 5 | m_ObjectHideFlags: 0 6 | m_CorrespondingSourceObject: {fileID: 0} 7 | m_PrefabInstance: {fileID: 0} 8 | m_PrefabAsset: {fileID: 0} 9 | m_Name: SpoutRenderTexture.0 10 | m_ImageContentsHash: 11 | serializedVersion: 2 12 | Hash: 00000000000000000000000000000000 13 | m_ForcedFallbackFormat: 4 14 | m_DownscaleFallback: 0 15 | m_Width: 1920 16 | m_Height: 1080 17 | m_AntiAliasing: 1 18 | m_DepthFormat: 0 19 | m_ColorFormat: 0 20 | m_MipMap: 0 21 | m_GenerateMips: 1 22 | m_SRGB: 0 23 | m_UseDynamicScale: 0 24 | m_BindMS: 0 25 | m_TextureSettings: 26 | serializedVersion: 2 27 | m_FilterMode: 1 28 | m_Aniso: 2 29 | m_MipBias: 0 30 | m_WrapU: 1 31 | m_WrapV: 1 32 | m_WrapW: 1 33 | m_Dimension: 2 34 | m_VolumeDepth: 1 35 | -------------------------------------------------------------------------------- /UnitySpoutDemo/Assets/Spout/Textures/SpoutRenderTexture.0.renderTexture.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 5504d7accebb4dd4bacc50003544b246 3 | NativeFormatImporter: 4 | userData: 5 | -------------------------------------------------------------------------------- /UnitySpoutDemo/Assets/Spout/Textures/SpoutRenderTexture.1.renderTexture: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!84 &8400000 4 | RenderTexture: 5 | m_ObjectHideFlags: 0 6 | m_PrefabParentObject: {fileID: 0} 7 | m_PrefabInternal: {fileID: 0} 8 | m_Name: SpoutRenderTexture.1 9 | m_ImageContentsHash: 10 | serializedVersion: 2 11 | Hash: 00000000000000000000000000000000 12 | m_Width: 1920 13 | m_Height: 1080 14 | m_AntiAliasing: 1 15 | m_DepthFormat: 0 16 | m_ColorFormat: 0 17 | m_MipMap: 0 18 | m_GenerateMips: 1 19 | m_SRGB: 0 20 | m_TextureSettings: 21 | m_FilterMode: 1 22 | m_Aniso: 0 23 | m_MipBias: 0 24 | m_WrapMode: 1 25 | -------------------------------------------------------------------------------- /UnitySpoutDemo/Assets/Spout/Textures/SpoutRenderTexture.1.renderTexture.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: c0ddb48c058a6134cab600767e999b69 3 | timeCreated: 1432300411 4 | licenseType: Pro 5 | NativeFormatImporter: 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /UnitySpoutDemo/Assets/Spout/Textures/SpoutRenderTexture.2.renderTexture: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!84 &8400000 4 | RenderTexture: 5 | m_ObjectHideFlags: 0 6 | m_PrefabParentObject: {fileID: 0} 7 | m_PrefabInternal: {fileID: 0} 8 | m_Name: SpoutRenderTexture.2 9 | m_ImageContentsHash: 10 | serializedVersion: 2 11 | Hash: 00000000000000000000000000000000 12 | m_Width: 1920 13 | m_Height: 1080 14 | m_AntiAliasing: 1 15 | m_DepthFormat: 0 16 | m_ColorFormat: 0 17 | m_MipMap: 0 18 | m_GenerateMips: 1 19 | m_SRGB: 0 20 | m_TextureSettings: 21 | m_FilterMode: 1 22 | m_Aniso: 0 23 | m_MipBias: 0 24 | m_WrapMode: 1 25 | -------------------------------------------------------------------------------- /UnitySpoutDemo/Assets/Spout/Textures/SpoutRenderTexture.2.renderTexture.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: d71b32dc32b71774d8c205c45625ece3 3 | timeCreated: 1432300477 4 | licenseType: Pro 5 | NativeFormatImporter: 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /UnitySpoutDemo/Assets/Spout/Textures/SpoutRenderTexture.3.renderTexture: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!84 &8400000 4 | RenderTexture: 5 | m_ObjectHideFlags: 0 6 | m_PrefabParentObject: {fileID: 0} 7 | m_PrefabInternal: {fileID: 0} 8 | m_Name: SpoutRenderTexture.3 9 | m_ImageContentsHash: 10 | serializedVersion: 2 11 | Hash: 00000000000000000000000000000000 12 | m_Width: 1920 13 | m_Height: 1080 14 | m_AntiAliasing: 1 15 | m_DepthFormat: 0 16 | m_ColorFormat: 0 17 | m_MipMap: 0 18 | m_GenerateMips: 1 19 | m_SRGB: 0 20 | m_TextureSettings: 21 | m_FilterMode: 1 22 | m_Aniso: 0 23 | m_MipBias: 0 24 | m_WrapMode: 1 25 | -------------------------------------------------------------------------------- /UnitySpoutDemo/Assets/Spout/Textures/SpoutRenderTexture.3.renderTexture.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: ccfe41aad601f6140959392373b9917f 3 | timeCreated: 1432318172 4 | licenseType: Pro 5 | NativeFormatImporter: 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /UnitySpoutDemo/Assets/Spout/Textures/temp.texture.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sloopidoopi/Spout4Unity/5cb448f30b807aa08d98269fef04d59547c201bd/UnitySpoutDemo/Assets/Spout/Textures/temp.texture.png -------------------------------------------------------------------------------- /UnitySpoutDemo/Assets/Spout/Textures/temp.texture.png.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 8b882b50d13c73d4180b2b55bbc96ff8 3 | TextureImporter: 4 | fileIDToRecycleName: {} 5 | serializedVersion: 2 6 | mipmaps: 7 | mipMapMode: 0 8 | enableMipMap: 1 9 | linearTexture: 0 10 | correctGamma: 0 11 | fadeOut: 0 12 | borderMipMap: 0 13 | mipMapFadeDistanceStart: 1 14 | mipMapFadeDistanceEnd: 3 15 | bumpmap: 16 | convertToNormalMap: 0 17 | externalNormalMap: 0 18 | heightScale: .25 19 | normalMapFilter: 0 20 | isReadable: 0 21 | grayScaleToAlpha: 0 22 | generateCubemap: 0 23 | seamlessCubemap: 0 24 | textureFormat: -1 25 | maxTextureSize: 1024 26 | textureSettings: 27 | filterMode: -1 28 | aniso: -1 29 | mipBias: -1 30 | wrapMode: -1 31 | nPOTScale: 1 32 | lightmap: 0 33 | compressionQuality: 50 34 | spriteMode: 0 35 | spriteExtrude: 1 36 | spriteMeshType: 1 37 | alignment: 0 38 | spritePivot: {x: .5, y: .5} 39 | spriteBorder: {x: 0, y: 0, z: 0, w: 0} 40 | spritePixelsToUnits: 100 41 | alphaIsTransparency: 0 42 | textureType: -1 43 | buildTargetSettings: [] 44 | spriteSheet: 45 | sprites: [] 46 | spritePackingTag: 47 | userData: 48 | -------------------------------------------------------------------------------- /UnitySpoutDemo/Assets/Spout/Textures/uv_map_reference.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sloopidoopi/Spout4Unity/5cb448f30b807aa08d98269fef04d59547c201bd/UnitySpoutDemo/Assets/Spout/Textures/uv_map_reference.jpg -------------------------------------------------------------------------------- /UnitySpoutDemo/Assets/Spout/Textures/uv_map_reference.jpg.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 86dda6adf718360448fa4b56aeebe2f1 3 | TextureImporter: 4 | fileIDToRecycleName: {} 5 | serializedVersion: 2 6 | mipmaps: 7 | mipMapMode: 0 8 | enableMipMap: 1 9 | linearTexture: 0 10 | correctGamma: 0 11 | fadeOut: 0 12 | borderMipMap: 0 13 | mipMapFadeDistanceStart: 1 14 | mipMapFadeDistanceEnd: 3 15 | bumpmap: 16 | convertToNormalMap: 0 17 | externalNormalMap: 0 18 | heightScale: .25 19 | normalMapFilter: 0 20 | isReadable: 0 21 | grayScaleToAlpha: 0 22 | generateCubemap: 0 23 | seamlessCubemap: 0 24 | textureFormat: -3 25 | maxTextureSize: 1024 26 | textureSettings: 27 | filterMode: 2 28 | aniso: 9 29 | mipBias: -1 30 | wrapMode: -1 31 | nPOTScale: 1 32 | lightmap: 0 33 | compressionQuality: 50 34 | spriteMode: 0 35 | spriteExtrude: 1 36 | spriteMeshType: 1 37 | alignment: 0 38 | spritePivot: {x: .5, y: .5} 39 | spriteBorder: {x: 0, y: 0, z: 0, w: 0} 40 | spritePixelsToUnits: 100 41 | alphaIsTransparency: 0 42 | textureType: -1 43 | buildTargetSettings: [] 44 | spriteSheet: 45 | sprites: [] 46 | spritePackingTag: 47 | userData: 48 | -------------------------------------------------------------------------------- /UnitySpoutDemo/Assets/Spout/Textures/uvmap.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sloopidoopi/Spout4Unity/5cb448f30b807aa08d98269fef04d59547c201bd/UnitySpoutDemo/Assets/Spout/Textures/uvmap.jpg -------------------------------------------------------------------------------- /UnitySpoutDemo/Assets/Spout/Textures/uvmap.jpg.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: b1f4e287f7e916543b1f0feb0e5d9ef6 3 | TextureImporter: 4 | fileIDToRecycleName: {} 5 | serializedVersion: 2 6 | mipmaps: 7 | mipMapMode: 0 8 | enableMipMap: 1 9 | linearTexture: 0 10 | correctGamma: 0 11 | fadeOut: 0 12 | borderMipMap: 0 13 | mipMapFadeDistanceStart: 1 14 | mipMapFadeDistanceEnd: 3 15 | bumpmap: 16 | convertToNormalMap: 0 17 | externalNormalMap: 0 18 | heightScale: .25 19 | normalMapFilter: 0 20 | isReadable: 0 21 | grayScaleToAlpha: 0 22 | generateCubemap: 0 23 | seamlessCubemap: 0 24 | textureFormat: -3 25 | maxTextureSize: 1024 26 | textureSettings: 27 | filterMode: 2 28 | aniso: 9 29 | mipBias: -1 30 | wrapMode: 1 31 | nPOTScale: 1 32 | lightmap: 0 33 | compressionQuality: 50 34 | spriteMode: 0 35 | spriteExtrude: 1 36 | spriteMeshType: 1 37 | alignment: 0 38 | spritePivot: {x: .5, y: .5} 39 | spriteBorder: {x: 0, y: 0, z: 0, w: 0} 40 | spritePixelsToUnits: 100 41 | alphaIsTransparency: 0 42 | textureType: -1 43 | buildTargetSettings: [] 44 | spriteSheet: 45 | sprites: [] 46 | spritePackingTag: 47 | userData: 48 | -------------------------------------------------------------------------------- /UnitySpoutDemo/Packages/manifest.json: -------------------------------------------------------------------------------- 1 | { 2 | "dependencies": { 3 | "com.unity.ads": "2.0.8", 4 | "com.unity.analytics": "3.2.2", 5 | "com.unity.collab-proxy": "1.2.15", 6 | "com.unity.package-manager-ui": "2.0.7", 7 | "com.unity.postprocessing": "2.1.7", 8 | "com.unity.purchasing": "2.0.3", 9 | "com.unity.textmeshpro": "1.3.0", 10 | "com.unity.modules.ai": "1.0.0", 11 | "com.unity.modules.animation": "1.0.0", 12 | "com.unity.modules.assetbundle": "1.0.0", 13 | "com.unity.modules.audio": "1.0.0", 14 | "com.unity.modules.cloth": "1.0.0", 15 | "com.unity.modules.director": "1.0.0", 16 | "com.unity.modules.imageconversion": "1.0.0", 17 | "com.unity.modules.imgui": "1.0.0", 18 | "com.unity.modules.jsonserialize": "1.0.0", 19 | "com.unity.modules.particlesystem": "1.0.0", 20 | "com.unity.modules.physics": "1.0.0", 21 | "com.unity.modules.physics2d": "1.0.0", 22 | "com.unity.modules.screencapture": "1.0.0", 23 | "com.unity.modules.terrain": "1.0.0", 24 | "com.unity.modules.terrainphysics": "1.0.0", 25 | "com.unity.modules.tilemap": "1.0.0", 26 | "com.unity.modules.ui": "1.0.0", 27 | "com.unity.modules.uielements": "1.0.0", 28 | "com.unity.modules.umbra": "1.0.0", 29 | "com.unity.modules.unityanalytics": "1.0.0", 30 | "com.unity.modules.unitywebrequest": "1.0.0", 31 | "com.unity.modules.unitywebrequestassetbundle": "1.0.0", 32 | "com.unity.modules.unitywebrequestaudio": "1.0.0", 33 | "com.unity.modules.unitywebrequesttexture": "1.0.0", 34 | "com.unity.modules.unitywebrequestwww": "1.0.0", 35 | "com.unity.modules.vehicles": "1.0.0", 36 | "com.unity.modules.video": "1.0.0", 37 | "com.unity.modules.vr": "1.0.0", 38 | "com.unity.modules.wind": "1.0.0", 39 | "com.unity.modules.xr": "1.0.0" 40 | } 41 | } 42 | -------------------------------------------------------------------------------- /UnitySpoutDemo/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 | m_SpeedOfSound: 347 9 | Doppler Factor: 1 10 | Default Speaker Mode: 2 11 | m_DSPBufferSize: 0 12 | -------------------------------------------------------------------------------- /UnitySpoutDemo/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 | -------------------------------------------------------------------------------- /UnitySpoutDemo/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_SleepVelocity: .150000006 10 | m_SleepAngularVelocity: .140000001 11 | m_MaxAngularVelocity: 7 12 | m_MinPenetrationForPenalty: .00999999978 13 | m_SolverIterationCount: 6 14 | m_RaycastsHitTriggers: 1 15 | m_LayerCollisionMatrix: ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff 16 | -------------------------------------------------------------------------------- /UnitySpoutDemo/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: 0 9 | path: Assets/Spout/Scenes/Spout2 Receiver.unity 10 | - enabled: 0 11 | path: Assets/Spout/Scenes/Spout2 Receiver.Quad.unity 12 | - enabled: 0 13 | path: Assets/Spout/Scenes/SimpleSender.unity 14 | - enabled: 0 15 | path: Assets/Spout/Scenes/Spout2 Sender.unity 16 | - enabled: 1 17 | path: Assets/Spout/Scenes/Spout2 Sender.and.Receiver.unity 18 | -------------------------------------------------------------------------------- /UnitySpoutDemo/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: 1 7 | m_ExternalVersionControlSupport: 1 8 | m_SerializationMode: 2 9 | m_WebSecurityEmulationEnabled: 0 10 | m_WebSecurityEmulationHostUrl: http://www.mydomain.com/mygame.unity3d 11 | -------------------------------------------------------------------------------- /UnitySpoutDemo/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: 7 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_ShaderSettings_Tier1: 42 | useCascadedShadowMaps: 1 43 | standardShaderQuality: 2 44 | useReflectionProbeBoxProjection: 1 45 | useReflectionProbeBlending: 1 46 | m_ShaderSettings_Tier2: 47 | useCascadedShadowMaps: 1 48 | standardShaderQuality: 2 49 | useReflectionProbeBoxProjection: 1 50 | useReflectionProbeBlending: 1 51 | m_ShaderSettings_Tier3: 52 | useCascadedShadowMaps: 1 53 | standardShaderQuality: 2 54 | useReflectionProbeBoxProjection: 1 55 | useReflectionProbeBlending: 1 56 | m_BuildTargetShaderSettings: [] 57 | m_LightmapStripping: 0 58 | m_FogStripping: 0 59 | m_LightmapKeepPlain: 1 60 | m_LightmapKeepDirCombined: 1 61 | m_LightmapKeepDirSeparate: 1 62 | m_LightmapKeepDynamicPlain: 1 63 | m_LightmapKeepDynamicDirCombined: 1 64 | m_LightmapKeepDynamicDirSeparate: 1 65 | m_FogKeepLinear: 1 66 | m_FogKeepExp: 1 67 | m_FogKeepExp2: 1 68 | -------------------------------------------------------------------------------- /UnitySpoutDemo/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 | m_Axes: 7 | - serializedVersion: 3 8 | m_Name: Horizontal 9 | descriptiveName: 10 | descriptiveNegativeName: 11 | negativeButton: left 12 | positiveButton: right 13 | altNegativeButton: a 14 | altPositiveButton: d 15 | gravity: 3 16 | dead: .00100000005 17 | sensitivity: 3 18 | snap: 1 19 | invert: 0 20 | type: 0 21 | axis: 0 22 | joyNum: 0 23 | - serializedVersion: 3 24 | m_Name: Vertical 25 | descriptiveName: 26 | descriptiveNegativeName: 27 | negativeButton: down 28 | positiveButton: up 29 | altNegativeButton: s 30 | altPositiveButton: w 31 | gravity: 3 32 | dead: .00100000005 33 | sensitivity: 3 34 | snap: 1 35 | invert: 0 36 | type: 0 37 | axis: 0 38 | joyNum: 0 39 | - serializedVersion: 3 40 | m_Name: Fire1 41 | descriptiveName: 42 | descriptiveNegativeName: 43 | negativeButton: 44 | positiveButton: left ctrl 45 | altNegativeButton: 46 | altPositiveButton: mouse 0 47 | gravity: 1000 48 | dead: .00100000005 49 | sensitivity: 1000 50 | snap: 0 51 | invert: 0 52 | type: 0 53 | axis: 0 54 | joyNum: 0 55 | - serializedVersion: 3 56 | m_Name: Fire2 57 | descriptiveName: 58 | descriptiveNegativeName: 59 | negativeButton: 60 | positiveButton: left alt 61 | altNegativeButton: 62 | altPositiveButton: mouse 1 63 | gravity: 1000 64 | dead: .00100000005 65 | sensitivity: 1000 66 | snap: 0 67 | invert: 0 68 | type: 0 69 | axis: 0 70 | joyNum: 0 71 | - serializedVersion: 3 72 | m_Name: Fire3 73 | descriptiveName: 74 | descriptiveNegativeName: 75 | negativeButton: 76 | positiveButton: left cmd 77 | altNegativeButton: 78 | altPositiveButton: mouse 2 79 | gravity: 1000 80 | dead: .00100000005 81 | sensitivity: 1000 82 | snap: 0 83 | invert: 0 84 | type: 0 85 | axis: 0 86 | joyNum: 0 87 | - serializedVersion: 3 88 | m_Name: Jump 89 | descriptiveName: 90 | descriptiveNegativeName: 91 | negativeButton: 92 | positiveButton: space 93 | altNegativeButton: 94 | altPositiveButton: 95 | gravity: 1000 96 | dead: .00100000005 97 | sensitivity: 1000 98 | snap: 0 99 | invert: 0 100 | type: 0 101 | axis: 0 102 | joyNum: 0 103 | - serializedVersion: 3 104 | m_Name: Mouse X 105 | descriptiveName: 106 | descriptiveNegativeName: 107 | negativeButton: 108 | positiveButton: 109 | altNegativeButton: 110 | altPositiveButton: 111 | gravity: 0 112 | dead: 0 113 | sensitivity: .100000001 114 | snap: 0 115 | invert: 0 116 | type: 1 117 | axis: 0 118 | joyNum: 0 119 | - serializedVersion: 3 120 | m_Name: Mouse Y 121 | descriptiveName: 122 | descriptiveNegativeName: 123 | negativeButton: 124 | positiveButton: 125 | altNegativeButton: 126 | altPositiveButton: 127 | gravity: 0 128 | dead: 0 129 | sensitivity: .100000001 130 | snap: 0 131 | invert: 0 132 | type: 1 133 | axis: 1 134 | joyNum: 0 135 | - serializedVersion: 3 136 | m_Name: Mouse ScrollWheel 137 | descriptiveName: 138 | descriptiveNegativeName: 139 | negativeButton: 140 | positiveButton: 141 | altNegativeButton: 142 | altPositiveButton: 143 | gravity: 0 144 | dead: 0 145 | sensitivity: .100000001 146 | snap: 0 147 | invert: 0 148 | type: 1 149 | axis: 2 150 | joyNum: 0 151 | - serializedVersion: 3 152 | m_Name: Window Shake X 153 | descriptiveName: 154 | descriptiveNegativeName: 155 | negativeButton: 156 | positiveButton: 157 | altNegativeButton: 158 | altPositiveButton: 159 | gravity: 0 160 | dead: 0 161 | sensitivity: .100000001 162 | snap: 0 163 | invert: 0 164 | type: 3 165 | axis: 0 166 | joyNum: 0 167 | - serializedVersion: 3 168 | m_Name: Window Shake Y 169 | descriptiveName: 170 | descriptiveNegativeName: 171 | negativeButton: 172 | positiveButton: 173 | altNegativeButton: 174 | altPositiveButton: 175 | gravity: 0 176 | dead: 0 177 | sensitivity: .100000001 178 | snap: 0 179 | invert: 0 180 | type: 3 181 | axis: 1 182 | joyNum: 0 183 | - serializedVersion: 3 184 | m_Name: Horizontal 185 | descriptiveName: 186 | descriptiveNegativeName: 187 | negativeButton: 188 | positiveButton: 189 | altNegativeButton: 190 | altPositiveButton: 191 | gravity: 0 192 | dead: .189999998 193 | sensitivity: 1 194 | snap: 0 195 | invert: 0 196 | type: 2 197 | axis: 0 198 | joyNum: 0 199 | - serializedVersion: 3 200 | m_Name: Vertical 201 | descriptiveName: 202 | descriptiveNegativeName: 203 | negativeButton: 204 | positiveButton: 205 | altNegativeButton: 206 | altPositiveButton: 207 | gravity: 0 208 | dead: .189999998 209 | sensitivity: 1 210 | snap: 0 211 | invert: 1 212 | type: 2 213 | axis: 1 214 | joyNum: 0 215 | - serializedVersion: 3 216 | m_Name: Fire1 217 | descriptiveName: 218 | descriptiveNegativeName: 219 | negativeButton: 220 | positiveButton: joystick button 0 221 | altNegativeButton: 222 | altPositiveButton: 223 | gravity: 1000 224 | dead: .00100000005 225 | sensitivity: 1000 226 | snap: 0 227 | invert: 0 228 | type: 0 229 | axis: 0 230 | joyNum: 0 231 | - serializedVersion: 3 232 | m_Name: Fire2 233 | descriptiveName: 234 | descriptiveNegativeName: 235 | negativeButton: 236 | positiveButton: joystick button 1 237 | altNegativeButton: 238 | altPositiveButton: 239 | gravity: 1000 240 | dead: .00100000005 241 | sensitivity: 1000 242 | snap: 0 243 | invert: 0 244 | type: 0 245 | axis: 0 246 | joyNum: 0 247 | - serializedVersion: 3 248 | m_Name: Fire3 249 | descriptiveName: 250 | descriptiveNegativeName: 251 | negativeButton: 252 | positiveButton: joystick button 2 253 | altNegativeButton: 254 | altPositiveButton: 255 | gravity: 1000 256 | dead: .00100000005 257 | sensitivity: 1000 258 | snap: 0 259 | invert: 0 260 | type: 0 261 | axis: 0 262 | joyNum: 0 263 | - serializedVersion: 3 264 | m_Name: Jump 265 | descriptiveName: 266 | descriptiveNegativeName: 267 | negativeButton: 268 | positiveButton: joystick button 3 269 | altNegativeButton: 270 | altPositiveButton: 271 | gravity: 1000 272 | dead: .00100000005 273 | sensitivity: 1000 274 | snap: 0 275 | invert: 0 276 | type: 0 277 | axis: 0 278 | joyNum: 0 279 | -------------------------------------------------------------------------------- /UnitySpoutDemo/ProjectSettings/NavMeshAreas.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!126 &1 4 | NavMeshLayers: 5 | m_ObjectHideFlags: 0 6 | Built-in Layer 0: 7 | name: Default 8 | cost: 1 9 | editType: 2 10 | Built-in Layer 1: 11 | name: Not Walkable 12 | cost: 1 13 | editType: 0 14 | Built-in Layer 2: 15 | name: Jump 16 | cost: 2 17 | editType: 2 18 | User Layer 0: 19 | name: 20 | cost: 1 21 | editType: 3 22 | User Layer 1: 23 | name: 24 | cost: 1 25 | editType: 3 26 | User Layer 2: 27 | name: 28 | cost: 1 29 | editType: 3 30 | User Layer 3: 31 | name: 32 | cost: 1 33 | editType: 3 34 | User Layer 4: 35 | name: 36 | cost: 1 37 | editType: 3 38 | User Layer 5: 39 | name: 40 | cost: 1 41 | editType: 3 42 | User Layer 6: 43 | name: 44 | cost: 1 45 | editType: 3 46 | User Layer 7: 47 | name: 48 | cost: 1 49 | editType: 3 50 | User Layer 8: 51 | name: 52 | cost: 1 53 | editType: 3 54 | User Layer 9: 55 | name: 56 | cost: 1 57 | editType: 3 58 | User Layer 10: 59 | name: 60 | cost: 1 61 | editType: 3 62 | User Layer 11: 63 | name: 64 | cost: 1 65 | editType: 3 66 | User Layer 12: 67 | name: 68 | cost: 1 69 | editType: 3 70 | User Layer 13: 71 | name: 72 | cost: 1 73 | editType: 3 74 | User Layer 14: 75 | name: 76 | cost: 1 77 | editType: 3 78 | User Layer 15: 79 | name: 80 | cost: 1 81 | editType: 3 82 | User Layer 16: 83 | name: 84 | cost: 1 85 | editType: 3 86 | User Layer 17: 87 | name: 88 | cost: 1 89 | editType: 3 90 | User Layer 18: 91 | name: 92 | cost: 1 93 | editType: 3 94 | User Layer 19: 95 | name: 96 | cost: 1 97 | editType: 3 98 | User Layer 20: 99 | name: 100 | cost: 1 101 | editType: 3 102 | User Layer 21: 103 | name: 104 | cost: 1 105 | editType: 3 106 | User Layer 22: 107 | name: 108 | cost: 1 109 | editType: 3 110 | User Layer 23: 111 | name: 112 | cost: 1 113 | editType: 3 114 | User Layer 24: 115 | name: 116 | cost: 1 117 | editType: 3 118 | User Layer 25: 119 | name: 120 | cost: 1 121 | editType: 3 122 | User Layer 26: 123 | name: 124 | cost: 1 125 | editType: 3 126 | User Layer 27: 127 | name: 128 | cost: 1 129 | editType: 3 130 | User Layer 28: 131 | name: 132 | cost: 1 133 | editType: 3 134 | -------------------------------------------------------------------------------- /UnitySpoutDemo/ProjectSettings/NavMeshLayers.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!126 &1 4 | NavMeshLayers: 5 | m_ObjectHideFlags: 0 6 | Built-in Layer 0: 7 | name: Default 8 | cost: 1 9 | editType: 2 10 | Built-in Layer 1: 11 | name: Not Walkable 12 | cost: 1 13 | editType: 0 14 | Built-in Layer 2: 15 | name: Jump 16 | cost: 2 17 | editType: 2 18 | User Layer 0: 19 | name: 20 | cost: 1 21 | editType: 3 22 | User Layer 1: 23 | name: 24 | cost: 1 25 | editType: 3 26 | User Layer 2: 27 | name: 28 | cost: 1 29 | editType: 3 30 | User Layer 3: 31 | name: 32 | cost: 1 33 | editType: 3 34 | User Layer 4: 35 | name: 36 | cost: 1 37 | editType: 3 38 | User Layer 5: 39 | name: 40 | cost: 1 41 | editType: 3 42 | User Layer 6: 43 | name: 44 | cost: 1 45 | editType: 3 46 | User Layer 7: 47 | name: 48 | cost: 1 49 | editType: 3 50 | User Layer 8: 51 | name: 52 | cost: 1 53 | editType: 3 54 | User Layer 9: 55 | name: 56 | cost: 1 57 | editType: 3 58 | User Layer 10: 59 | name: 60 | cost: 1 61 | editType: 3 62 | User Layer 11: 63 | name: 64 | cost: 1 65 | editType: 3 66 | User Layer 12: 67 | name: 68 | cost: 1 69 | editType: 3 70 | User Layer 13: 71 | name: 72 | cost: 1 73 | editType: 3 74 | User Layer 14: 75 | name: 76 | cost: 1 77 | editType: 3 78 | User Layer 15: 79 | name: 80 | cost: 1 81 | editType: 3 82 | User Layer 16: 83 | name: 84 | cost: 1 85 | editType: 3 86 | User Layer 17: 87 | name: 88 | cost: 1 89 | editType: 3 90 | User Layer 18: 91 | name: 92 | cost: 1 93 | editType: 3 94 | User Layer 19: 95 | name: 96 | cost: 1 97 | editType: 3 98 | User Layer 20: 99 | name: 100 | cost: 1 101 | editType: 3 102 | User Layer 21: 103 | name: 104 | cost: 1 105 | editType: 3 106 | User Layer 22: 107 | name: 108 | cost: 1 109 | editType: 3 110 | User Layer 23: 111 | name: 112 | cost: 1 113 | editType: 3 114 | User Layer 24: 115 | name: 116 | cost: 1 117 | editType: 3 118 | User Layer 25: 119 | name: 120 | cost: 1 121 | editType: 3 122 | User Layer 26: 123 | name: 124 | cost: 1 125 | editType: 3 126 | User Layer 27: 127 | name: 128 | cost: 1 129 | editType: 3 130 | User Layer 28: 131 | name: 132 | cost: 1 133 | editType: 3 134 | -------------------------------------------------------------------------------- /UnitySpoutDemo/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 | -------------------------------------------------------------------------------- /UnitySpoutDemo/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_BaumgarteScale: .200000003 16 | m_BaumgarteTimeOfImpactScale: .75 17 | m_TimeToSleep: .5 18 | m_LinearSleepTolerance: .00999999978 19 | m_AngularSleepTolerance: 2 20 | m_RaycastsHitTriggers: 1 21 | m_LayerCollisionMatrix: ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff 22 | -------------------------------------------------------------------------------- /UnitySpoutDemo/ProjectSettings/PresetManager.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!1386491679 &1 4 | PresetManager: 5 | m_ObjectHideFlags: 0 6 | m_DefaultList: [] 7 | -------------------------------------------------------------------------------- /UnitySpoutDemo/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: 15 7 | productGUID: aad399ebfa5c9fc44a1525c58bf695e5 8 | AndroidProfiler: 0 9 | AndroidFilterTouchesWhenObscured: 0 10 | AndroidEnableSustainedPerformanceMode: 0 11 | defaultScreenOrientation: 0 12 | targetDevice: 2 13 | useOnDemandResources: 0 14 | accelerometerFrequency: 60 15 | companyName: Ben Kuper 16 | productName: Unity Spout Receiver 64bit 17 | defaultCursor: {fileID: 0} 18 | cursorHotspot: {x: 0, y: 0} 19 | m_SplashScreenBackgroundColor: {r: 0.13725491, g: 0.12156863, b: 0.1254902, a: 1} 20 | m_ShowUnitySplashScreen: 0 21 | m_ShowUnitySplashLogo: 1 22 | m_SplashScreenOverlayOpacity: 1 23 | m_SplashScreenAnimation: 1 24 | m_SplashScreenLogoStyle: 1 25 | m_SplashScreenDrawMode: 0 26 | m_SplashScreenBackgroundAnimationZoom: 1 27 | m_SplashScreenLogoAnimationZoom: 1 28 | m_SplashScreenBackgroundLandscapeAspect: 1 29 | m_SplashScreenBackgroundPortraitAspect: 1 30 | m_SplashScreenBackgroundLandscapeUvs: 31 | serializedVersion: 2 32 | x: 0 33 | y: 0 34 | width: 1 35 | height: 1 36 | m_SplashScreenBackgroundPortraitUvs: 37 | serializedVersion: 2 38 | x: 0 39 | y: 0 40 | width: 1 41 | height: 1 42 | m_SplashScreenLogos: [] 43 | m_VirtualRealitySplashScreen: {fileID: 0} 44 | m_HolographicTrackingLossScreen: {fileID: 0} 45 | defaultScreenWidth: 640 46 | defaultScreenHeight: 360 47 | defaultScreenWidthWeb: 600 48 | defaultScreenHeightWeb: 450 49 | m_StereoRenderingPath: 0 50 | m_ActiveColorSpace: 0 51 | m_MTRendering: 1 52 | m_StackTraceTypes: 010000000100000001000000010000000100000001000000 53 | iosShowActivityIndicatorOnLoading: -1 54 | androidShowActivityIndicatorOnLoading: -1 55 | iosAppInBackgroundBehavior: 0 56 | displayResolutionDialog: 1 57 | iosAllowHTTPDownload: 1 58 | allowedAutorotateToPortrait: 1 59 | allowedAutorotateToPortraitUpsideDown: 1 60 | allowedAutorotateToLandscapeRight: 1 61 | allowedAutorotateToLandscapeLeft: 1 62 | useOSAutorotation: 1 63 | use32BitDisplayBuffer: 0 64 | preserveFramebufferAlpha: 0 65 | disableDepthAndStencilBuffers: 0 66 | androidStartInFullscreen: 1 67 | androidRenderOutsideSafeArea: 0 68 | androidBlitType: 0 69 | defaultIsNativeResolution: 1 70 | macRetinaSupport: 1 71 | runInBackground: 1 72 | captureSingleScreen: 0 73 | muteOtherAudioSources: 0 74 | Prepare IOS For Recording: 0 75 | Force IOS Speakers When Recording: 0 76 | deferSystemGesturesMode: 0 77 | hideHomeButton: 0 78 | submitAnalytics: 1 79 | usePlayerLog: 1 80 | bakeCollisionMeshes: 0 81 | forceSingleInstance: 0 82 | resizableWindow: 1 83 | useMacAppStoreValidation: 0 84 | macAppStoreCategory: public.app-category.games 85 | gpuSkinning: 0 86 | graphicsJobs: 0 87 | xboxPIXTextureCapture: 0 88 | xboxEnableAvatar: 0 89 | xboxEnableKinect: 0 90 | xboxEnableKinectAutoTracking: 0 91 | xboxEnableFitness: 0 92 | visibleInBackground: 0 93 | allowFullscreenSwitch: 1 94 | graphicsJobMode: 0 95 | fullscreenMode: 1 96 | xboxSpeechDB: 0 97 | xboxEnableHeadOrientation: 0 98 | xboxEnableGuest: 0 99 | xboxEnablePIXSampling: 0 100 | metalFramebufferOnly: 0 101 | xboxOneResolution: 0 102 | xboxOneSResolution: 0 103 | xboxOneXResolution: 3 104 | xboxOneMonoLoggingLevel: 0 105 | xboxOneLoggingLevel: 1 106 | xboxOneDisableEsram: 0 107 | xboxOnePresentImmediateThreshold: 0 108 | switchQueueCommandMemory: 1048576 109 | switchQueueControlMemory: 16384 110 | switchQueueComputeMemory: 262144 111 | switchNVNShaderPoolsGranularity: 33554432 112 | switchNVNDefaultPoolsGranularity: 16777216 113 | switchNVNOtherPoolsGranularity: 16777216 114 | vulkanEnableSetSRGBWrite: 0 115 | m_SupportedAspectRatios: 116 | 4:3: 1 117 | 5:4: 1 118 | 16:10: 1 119 | 16:9: 1 120 | Others: 1 121 | bundleVersion: 1.0 122 | preloadedAssets: [] 123 | metroInputSource: 0 124 | wsaTransparentSwapchain: 0 125 | m_HolographicPauseOnTrackingLoss: 1 126 | xboxOneDisableKinectGpuReservation: 0 127 | xboxOneEnable7thCore: 1 128 | isWsaHolographicRemotingEnabled: 0 129 | vrSettings: 130 | cardboard: 131 | depthFormat: 0 132 | enableTransitionView: 0 133 | daydream: 134 | depthFormat: 0 135 | useSustainedPerformanceMode: 0 136 | enableVideoLayer: 0 137 | useProtectedVideoMemory: 0 138 | minimumSupportedHeadTracking: 0 139 | maximumSupportedHeadTracking: 1 140 | hololens: 141 | depthFormat: 1 142 | depthBufferSharingEnabled: 1 143 | oculus: 144 | sharedDepthBuffer: 1 145 | dashSupport: 1 146 | enable360StereoCapture: 0 147 | protectGraphicsMemory: 0 148 | enableFrameTimingStats: 0 149 | useHDRDisplay: 0 150 | m_ColorGamuts: 00000000 151 | targetPixelDensity: 30 152 | resolutionScalingMode: 0 153 | androidSupportedAspectRatio: 1 154 | androidMaxAspectRatio: 2.1 155 | applicationIdentifier: 156 | Android: com.Company.ProductName 157 | Standalone: unity.Ben Kuper.Unity Spout Receiver 64bit 158 | iOS: com.Company.ProductName 159 | tvOS: com.Company.ProductName 160 | buildNumber: 161 | iOS: 0 162 | AndroidBundleVersionCode: 1 163 | AndroidMinSdkVersion: 16 164 | AndroidTargetSdkVersion: 0 165 | AndroidPreferredInstallLocation: 1 166 | aotOptions: 167 | stripEngineCode: 1 168 | iPhoneStrippingLevel: 0 169 | iPhoneScriptCallOptimization: 0 170 | ForceInternetPermission: 0 171 | ForceSDCardPermission: 0 172 | CreateWallpaper: 0 173 | APKExpansionFiles: 0 174 | keepLoadedShadersAlive: 0 175 | StripUnusedMeshComponents: 0 176 | VertexChannelCompressionMask: 214 177 | iPhoneSdkVersion: 988 178 | iOSTargetOSVersionString: 9.0 179 | tvOSSdkVersion: 0 180 | tvOSRequireExtendedGameController: 0 181 | tvOSTargetOSVersionString: 9.0 182 | uIPrerenderedIcon: 0 183 | uIRequiresPersistentWiFi: 0 184 | uIRequiresFullScreen: 1 185 | uIStatusBarHidden: 1 186 | uIExitOnSuspend: 0 187 | uIStatusBarStyle: 0 188 | iPhoneSplashScreen: {fileID: 0} 189 | iPhoneHighResSplashScreen: {fileID: 0} 190 | iPhoneTallHighResSplashScreen: {fileID: 0} 191 | iPhone47inSplashScreen: {fileID: 0} 192 | iPhone55inPortraitSplashScreen: {fileID: 0} 193 | iPhone55inLandscapeSplashScreen: {fileID: 0} 194 | iPhone58inPortraitSplashScreen: {fileID: 0} 195 | iPhone58inLandscapeSplashScreen: {fileID: 0} 196 | iPadPortraitSplashScreen: {fileID: 0} 197 | iPadHighResPortraitSplashScreen: {fileID: 0} 198 | iPadLandscapeSplashScreen: {fileID: 0} 199 | iPadHighResLandscapeSplashScreen: {fileID: 0} 200 | appleTVSplashScreen: {fileID: 0} 201 | appleTVSplashScreen2x: {fileID: 0} 202 | tvOSSmallIconLayers: [] 203 | tvOSSmallIconLayers2x: [] 204 | tvOSLargeIconLayers: [] 205 | tvOSLargeIconLayers2x: [] 206 | tvOSTopShelfImageLayers: [] 207 | tvOSTopShelfImageLayers2x: [] 208 | tvOSTopShelfImageWideLayers: [] 209 | tvOSTopShelfImageWideLayers2x: [] 210 | iOSLaunchScreenType: 0 211 | iOSLaunchScreenPortrait: {fileID: 0} 212 | iOSLaunchScreenLandscape: {fileID: 0} 213 | iOSLaunchScreenBackgroundColor: 214 | serializedVersion: 2 215 | rgba: 0 216 | iOSLaunchScreenFillPct: 1 217 | iOSLaunchScreenSize: 100 218 | iOSLaunchScreenCustomXibPath: 219 | iOSLaunchScreeniPadType: 0 220 | iOSLaunchScreeniPadImage: {fileID: 0} 221 | iOSLaunchScreeniPadBackgroundColor: 222 | serializedVersion: 2 223 | rgba: 0 224 | iOSLaunchScreeniPadFillPct: 100 225 | iOSLaunchScreeniPadSize: 100 226 | iOSLaunchScreeniPadCustomXibPath: 227 | iOSUseLaunchScreenStoryboard: 0 228 | iOSLaunchScreenCustomStoryboardPath: 229 | iOSDeviceRequirements: [] 230 | iOSURLSchemes: [] 231 | iOSBackgroundModes: 0 232 | iOSMetalForceHardShadows: 0 233 | metalEditorSupport: 1 234 | metalAPIValidation: 1 235 | iOSRenderExtraFrameOnPause: 1 236 | appleDeveloperTeamID: 237 | iOSManualSigningProvisioningProfileID: 238 | tvOSManualSigningProvisioningProfileID: 239 | iOSManualSigningProvisioningProfileType: 0 240 | tvOSManualSigningProvisioningProfileType: 0 241 | appleEnableAutomaticSigning: 0 242 | iOSRequireARKit: 0 243 | iOSAutomaticallyDetectAndAddCapabilities: 1 244 | appleEnableProMotion: 0 245 | clonedFromGUID: 00000000000000000000000000000000 246 | templatePackageId: 247 | templateDefaultScene: 248 | AndroidTargetArchitectures: 5 249 | AndroidSplashScreenScale: 0 250 | androidSplashScreen: {fileID: 0} 251 | AndroidKeystoreName: 252 | AndroidKeyaliasName: 253 | AndroidBuildApkPerCpuArchitecture: 0 254 | AndroidTVCompatibility: 1 255 | AndroidIsGame: 1 256 | AndroidEnableTango: 0 257 | androidEnableBanner: 1 258 | androidUseLowAccuracyLocation: 0 259 | m_AndroidBanners: 260 | - width: 320 261 | height: 180 262 | banner: {fileID: 0} 263 | androidGamepadSupportLevel: 0 264 | resolutionDialogBanner: {fileID: 0} 265 | m_BuildTargetIcons: 266 | - m_BuildTarget: 267 | m_Icons: 268 | - serializedVersion: 2 269 | m_Icon: {fileID: 0} 270 | m_Width: 128 271 | m_Height: 128 272 | m_Kind: 0 273 | m_BuildTargetPlatformIcons: [] 274 | m_BuildTargetBatching: 275 | - m_BuildTarget: Standalone 276 | m_StaticBatching: 1 277 | m_DynamicBatching: 1 278 | m_BuildTargetGraphicsAPIs: 279 | - m_BuildTarget: AndroidPlayer 280 | m_APIs: 08000000 281 | m_Automatic: 0 282 | m_BuildTargetVRSettings: 283 | - m_BuildTarget: Android 284 | m_Enabled: 0 285 | m_Devices: 286 | - Oculus 287 | - m_BuildTarget: Metro 288 | m_Enabled: 0 289 | m_Devices: [] 290 | - m_BuildTarget: N3DS 291 | m_Enabled: 0 292 | m_Devices: [] 293 | - m_BuildTarget: PS3 294 | m_Enabled: 0 295 | m_Devices: [] 296 | - m_BuildTarget: PS4 297 | m_Enabled: 0 298 | m_Devices: 299 | - PlayStationVR 300 | - m_BuildTarget: PSM 301 | m_Enabled: 0 302 | m_Devices: [] 303 | - m_BuildTarget: PSP2 304 | m_Enabled: 0 305 | m_Devices: [] 306 | - m_BuildTarget: SamsungTV 307 | m_Enabled: 0 308 | m_Devices: [] 309 | - m_BuildTarget: Standalone 310 | m_Enabled: 0 311 | m_Devices: 312 | - Oculus 313 | - m_BuildTarget: Tizen 314 | m_Enabled: 0 315 | m_Devices: [] 316 | - m_BuildTarget: WebGL 317 | m_Enabled: 0 318 | m_Devices: [] 319 | - m_BuildTarget: WebPlayer 320 | m_Enabled: 0 321 | m_Devices: [] 322 | - m_BuildTarget: WiiU 323 | m_Enabled: 0 324 | m_Devices: [] 325 | - m_BuildTarget: Xbox360 326 | m_Enabled: 0 327 | m_Devices: [] 328 | - m_BuildTarget: XboxOne 329 | m_Enabled: 0 330 | m_Devices: [] 331 | - m_BuildTarget: iOS 332 | m_Enabled: 0 333 | m_Devices: [] 334 | - m_BuildTarget: tvOS 335 | m_Enabled: 0 336 | m_Devices: [] 337 | m_BuildTargetEnableVuforiaSettings: [] 338 | openGLRequireES31: 0 339 | openGLRequireES31AEP: 0 340 | m_TemplateCustomTags: {} 341 | mobileMTRendering: 342 | iPhone: 1 343 | tvOS: 1 344 | m_BuildTargetGroupLightmapEncodingQuality: 345 | - m_BuildTarget: Standalone 346 | m_EncodingQuality: 1 347 | - m_BuildTarget: XboxOne 348 | m_EncodingQuality: 1 349 | - m_BuildTarget: PS4 350 | m_EncodingQuality: 1 351 | m_BuildTargetGroupLightmapSettings: [] 352 | playModeTestRunnerEnabled: 0 353 | runPlayModeTestAsEditModeTest: 0 354 | actionOnDotNetUnhandledException: 1 355 | enableInternalProfiler: 0 356 | logObjCUncaughtExceptions: 1 357 | enableCrashReportAPI: 0 358 | cameraUsageDescription: 359 | locationUsageDescription: 360 | microphoneUsageDescription: 361 | switchNetLibKey: 362 | switchSocketMemoryPoolSize: 6144 363 | switchSocketAllocatorPoolSize: 128 364 | switchSocketConcurrencyLimit: 14 365 | switchScreenResolutionBehavior: 2 366 | switchUseCPUProfiler: 0 367 | switchApplicationID: 0x01004b9000490000 368 | switchNSODependencies: 369 | switchTitleNames_0: 370 | switchTitleNames_1: 371 | switchTitleNames_2: 372 | switchTitleNames_3: 373 | switchTitleNames_4: 374 | switchTitleNames_5: 375 | switchTitleNames_6: 376 | switchTitleNames_7: 377 | switchTitleNames_8: 378 | switchTitleNames_9: 379 | switchTitleNames_10: 380 | switchTitleNames_11: 381 | switchTitleNames_12: 382 | switchTitleNames_13: 383 | switchTitleNames_14: 384 | switchPublisherNames_0: 385 | switchPublisherNames_1: 386 | switchPublisherNames_2: 387 | switchPublisherNames_3: 388 | switchPublisherNames_4: 389 | switchPublisherNames_5: 390 | switchPublisherNames_6: 391 | switchPublisherNames_7: 392 | switchPublisherNames_8: 393 | switchPublisherNames_9: 394 | switchPublisherNames_10: 395 | switchPublisherNames_11: 396 | switchPublisherNames_12: 397 | switchPublisherNames_13: 398 | switchPublisherNames_14: 399 | switchIcons_0: {fileID: 0} 400 | switchIcons_1: {fileID: 0} 401 | switchIcons_2: {fileID: 0} 402 | switchIcons_3: {fileID: 0} 403 | switchIcons_4: {fileID: 0} 404 | switchIcons_5: {fileID: 0} 405 | switchIcons_6: {fileID: 0} 406 | switchIcons_7: {fileID: 0} 407 | switchIcons_8: {fileID: 0} 408 | switchIcons_9: {fileID: 0} 409 | switchIcons_10: {fileID: 0} 410 | switchIcons_11: {fileID: 0} 411 | switchIcons_12: {fileID: 0} 412 | switchIcons_13: {fileID: 0} 413 | switchIcons_14: {fileID: 0} 414 | switchSmallIcons_0: {fileID: 0} 415 | switchSmallIcons_1: {fileID: 0} 416 | switchSmallIcons_2: {fileID: 0} 417 | switchSmallIcons_3: {fileID: 0} 418 | switchSmallIcons_4: {fileID: 0} 419 | switchSmallIcons_5: {fileID: 0} 420 | switchSmallIcons_6: {fileID: 0} 421 | switchSmallIcons_7: {fileID: 0} 422 | switchSmallIcons_8: {fileID: 0} 423 | switchSmallIcons_9: {fileID: 0} 424 | switchSmallIcons_10: {fileID: 0} 425 | switchSmallIcons_11: {fileID: 0} 426 | switchSmallIcons_12: {fileID: 0} 427 | switchSmallIcons_13: {fileID: 0} 428 | switchSmallIcons_14: {fileID: 0} 429 | switchManualHTML: 430 | switchAccessibleURLs: 431 | switchLegalInformation: 432 | switchMainThreadStackSize: 1048576 433 | switchPresenceGroupId: 434 | switchLogoHandling: 0 435 | switchReleaseVersion: 0 436 | switchDisplayVersion: 1.0.0 437 | switchStartupUserAccount: 0 438 | switchTouchScreenUsage: 0 439 | switchSupportedLanguagesMask: 0 440 | switchLogoType: 0 441 | switchApplicationErrorCodeCategory: 442 | switchUserAccountSaveDataSize: 0 443 | switchUserAccountSaveDataJournalSize: 0 444 | switchApplicationAttribute: 0 445 | switchCardSpecSize: -1 446 | switchCardSpecClock: -1 447 | switchRatingsMask: 0 448 | switchRatingsInt_0: 0 449 | switchRatingsInt_1: 0 450 | switchRatingsInt_2: 0 451 | switchRatingsInt_3: 0 452 | switchRatingsInt_4: 0 453 | switchRatingsInt_5: 0 454 | switchRatingsInt_6: 0 455 | switchRatingsInt_7: 0 456 | switchRatingsInt_8: 0 457 | switchRatingsInt_9: 0 458 | switchRatingsInt_10: 0 459 | switchRatingsInt_11: 0 460 | switchLocalCommunicationIds_0: 461 | switchLocalCommunicationIds_1: 462 | switchLocalCommunicationIds_2: 463 | switchLocalCommunicationIds_3: 464 | switchLocalCommunicationIds_4: 465 | switchLocalCommunicationIds_5: 466 | switchLocalCommunicationIds_6: 467 | switchLocalCommunicationIds_7: 468 | switchParentalControl: 0 469 | switchAllowsScreenshot: 1 470 | switchAllowsVideoCapturing: 1 471 | switchAllowsRuntimeAddOnContentInstall: 0 472 | switchDataLossConfirmation: 0 473 | switchUserAccountLockEnabled: 0 474 | switchSystemResourceMemory: 16777216 475 | switchSupportedNpadStyles: 6 476 | switchNativeFsCacheSize: 32 477 | switchIsHoldTypeHorizontal: 0 478 | switchSupportedNpadCount: 8 479 | switchSocketConfigEnabled: 0 480 | switchTcpInitialSendBufferSize: 32 481 | switchTcpInitialReceiveBufferSize: 64 482 | switchTcpAutoSendBufferSizeMax: 256 483 | switchTcpAutoReceiveBufferSizeMax: 256 484 | switchUdpSendBufferSize: 9 485 | switchUdpReceiveBufferSize: 42 486 | switchSocketBufferEfficiency: 4 487 | switchSocketInitializeEnabled: 1 488 | switchNetworkInterfaceManagerInitializeEnabled: 1 489 | switchPlayerConnectionEnabled: 1 490 | ps4NPAgeRating: 12 491 | ps4NPTitleSecret: 492 | ps4NPTrophyPackPath: 493 | ps4ParentalLevel: 1 494 | ps4ContentID: ED1633-NPXX51362_00-0000000000000000 495 | ps4Category: 0 496 | ps4MasterVersion: 01.00 497 | ps4AppVersion: 01.00 498 | ps4AppType: 0 499 | ps4ParamSfxPath: 500 | ps4VideoOutPixelFormat: 0 501 | ps4VideoOutInitialWidth: 1920 502 | ps4VideoOutBaseModeInitialWidth: 1920 503 | ps4VideoOutReprojectionRate: 60 504 | ps4PronunciationXMLPath: 505 | ps4PronunciationSIGPath: 506 | ps4BackgroundImagePath: 507 | ps4StartupImagePath: 508 | ps4StartupImagesFolder: 509 | ps4IconImagesFolder: 510 | ps4SaveDataImagePath: 511 | ps4SdkOverride: 512 | ps4BGMPath: 513 | ps4ShareFilePath: 514 | ps4ShareOverlayImagePath: 515 | ps4PrivacyGuardImagePath: 516 | ps4NPtitleDatPath: 517 | ps4RemotePlayKeyAssignment: -1 518 | ps4RemotePlayKeyMappingDir: 519 | ps4PlayTogetherPlayerCount: 0 520 | ps4EnterButtonAssignment: 1 521 | ps4ApplicationParam1: 0 522 | ps4ApplicationParam2: 0 523 | ps4ApplicationParam3: 0 524 | ps4ApplicationParam4: 0 525 | ps4DownloadDataSize: 0 526 | ps4GarlicHeapSize: 2048 527 | ps4ProGarlicHeapSize: 2560 528 | ps4Passcode: frAQBc8Wsa1xVPfvJcrgRYwTiizs2trQ 529 | ps4pnSessions: 1 530 | ps4pnPresence: 1 531 | ps4pnFriends: 1 532 | ps4pnGameCustomData: 1 533 | playerPrefsSupport: 0 534 | enableApplicationExit: 0 535 | resetTempFolder: 1 536 | restrictedAudioUsageRights: 0 537 | ps4UseResolutionFallback: 0 538 | ps4ReprojectionSupport: 0 539 | ps4UseAudio3dBackend: 0 540 | ps4SocialScreenEnabled: 0 541 | ps4ScriptOptimizationLevel: 2 542 | ps4Audio3dVirtualSpeakerCount: 14 543 | ps4attribCpuUsage: 0 544 | ps4PatchPkgPath: 545 | ps4PatchLatestPkgPath: 546 | ps4PatchChangeinfoPath: 547 | ps4PatchDayOne: 0 548 | ps4attribUserManagement: 0 549 | ps4attribMoveSupport: 0 550 | ps4attrib3DSupport: 0 551 | ps4attribShareSupport: 0 552 | ps4attribExclusiveVR: 0 553 | ps4disableAutoHideSplash: 0 554 | ps4videoRecordingFeaturesUsed: 0 555 | ps4contentSearchFeaturesUsed: 0 556 | ps4attribEyeToEyeDistanceSettingVR: 0 557 | ps4IncludedModules: [] 558 | monoEnv: 559 | splashScreenBackgroundSourceLandscape: {fileID: 0} 560 | splashScreenBackgroundSourcePortrait: {fileID: 0} 561 | spritePackerPolicy: 562 | webGLMemorySize: 256 563 | webGLExceptionSupport: 0 564 | webGLNameFilesAsHashes: 0 565 | webGLDataCaching: 0 566 | webGLDebugSymbols: 0 567 | webGLEmscriptenArgs: 568 | webGLModulesDirectory: 569 | webGLTemplate: APPLICATION:Default 570 | webGLAnalyzeBuildSize: 0 571 | webGLUseEmbeddedResources: 0 572 | webGLCompressionFormat: 1 573 | webGLLinkerTarget: 1 574 | webGLThreadsSupport: 0 575 | scriptingDefineSymbols: 576 | 1: UNITY_POST_PROCESSING_STACK_V2 577 | 7: UNITY_POST_PROCESSING_STACK_V2 578 | 13: UNITY_POST_PROCESSING_STACK_V2 579 | 19: UNITY_POST_PROCESSING_STACK_V2 580 | 21: UNITY_POST_PROCESSING_STACK_V2 581 | 25: UNITY_POST_PROCESSING_STACK_V2 582 | 26: UNITY_POST_PROCESSING_STACK_V2 583 | 27: UNITY_POST_PROCESSING_STACK_V2 584 | 28: UNITY_POST_PROCESSING_STACK_V2 585 | platformArchitecture: 586 | iOS: 2 587 | scriptingBackend: 588 | Android: 0 589 | Metro: 2 590 | Standalone: 0 591 | WP8: 2 592 | WebGL: 1 593 | iOS: 0 594 | il2cppCompilerConfiguration: {} 595 | managedStrippingLevel: {} 596 | incrementalIl2cppBuild: {} 597 | allowUnsafeCode: 0 598 | additionalIl2CppArgs: 599 | scriptingRuntimeVersion: 1 600 | apiCompatibilityLevelPerPlatform: {} 601 | m_RenderingPath: 1 602 | m_MobileRenderingPath: 1 603 | metroPackageName: UnitySpoutDemo 604 | metroPackageVersion: 605 | metroCertificatePath: 606 | metroCertificatePassword: 607 | metroCertificateSubject: 608 | metroCertificateIssuer: 609 | metroCertificateNotAfter: 0000000000000000 610 | metroApplicationDescription: UnitySpoutDemo 611 | wsaImages: {} 612 | metroTileShortName: 613 | metroTileShowName: 0 614 | metroMediumTileShowName: 0 615 | metroLargeTileShowName: 0 616 | metroWideTileShowName: 0 617 | metroSupportStreamingInstall: 0 618 | metroLastRequiredScene: 0 619 | metroDefaultTileSize: 1 620 | metroTileForegroundText: 1 621 | metroTileBackgroundColor: {r: 0, g: 0, b: 0, a: 1} 622 | metroSplashScreenBackgroundColor: {r: 0, g: 0, b: 0, a: 1} 623 | metroSplashScreenUseBackgroundColor: 0 624 | platformCapabilities: {} 625 | metroTargetDeviceFamilies: {} 626 | metroFTAName: 627 | metroFTAFileTypes: [] 628 | metroProtocolName: 629 | metroCompilationOverrides: 1 630 | XboxOneProductId: 631 | XboxOneUpdateKey: 632 | XboxOneSandboxId: 633 | XboxOneContentId: 634 | XboxOneTitleId: 635 | XboxOneSCId: 636 | XboxOneGameOsOverridePath: 637 | XboxOnePackagingOverridePath: 638 | XboxOneAppManifestOverridePath: 639 | XboxOneVersion: 1.0.0.0 640 | XboxOnePackageEncryption: 0 641 | XboxOnePackageUpdateGranularity: 2 642 | XboxOneDescription: 643 | XboxOneLanguage: 644 | - enus 645 | XboxOneCapability: [] 646 | XboxOneGameRating: {} 647 | XboxOneIsContentPackage: 0 648 | XboxOneEnableGPUVariability: 0 649 | XboxOneSockets: {} 650 | XboxOneSplashScreen: {fileID: 0} 651 | XboxOneAllowedProductIds: [] 652 | XboxOnePersistentLocalStorageSize: 0 653 | XboxOneXTitleMemory: 8 654 | xboxOneScriptCompiler: 0 655 | XboxOneOverrideIdentityName: 656 | vrEditorSettings: 657 | daydream: 658 | daydreamIconForeground: {fileID: 0} 659 | daydreamIconBackground: {fileID: 0} 660 | cloudServicesEnabled: 661 | Analytics: 0 662 | Build: 0 663 | Collab: 0 664 | ErrorHub: 0 665 | Game_Performance: 0 666 | Hub: 0 667 | Purchasing: 0 668 | UNet: 0 669 | Unity_Ads: 0 670 | luminIcon: 671 | m_Name: 672 | m_ModelFolderPath: 673 | m_PortalFolderPath: 674 | luminCert: 675 | m_CertPath: 676 | m_PrivateKeyPath: 677 | luminIsChannelApp: 0 678 | luminVersion: 679 | m_VersionCode: 1 680 | m_VersionName: 681 | facebookSdkVersion: 682 | facebookAppId: 683 | facebookCookies: 1 684 | facebookLogging: 1 685 | facebookStatus: 1 686 | facebookXfbml: 0 687 | facebookFrictionlessRequests: 1 688 | apiCompatibilityLevel: 6 689 | cloudProjectId: 690 | framebufferDepthMemorylessMode: 0 691 | projectName: 692 | organizationId: 693 | cloudEnabled: 0 694 | enableNativePlatformBackendsForNewInputSystem: 0 695 | disableOldInputManagerSupport: 0 696 | legacyClampBlendShapeWeights: 1 697 | -------------------------------------------------------------------------------- /UnitySpoutDemo/ProjectSettings/ProjectVersion.txt: -------------------------------------------------------------------------------- 1 | m_EditorVersion: 2018.4.0f1 2 | -------------------------------------------------------------------------------- /UnitySpoutDemo/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: 4 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 | blendWeights: 1 18 | textureQuality: 1 19 | anisotropicTextures: 0 20 | antiAliasing: 0 21 | softParticles: 0 22 | softVegetation: 0 23 | vSyncCount: 0 24 | lodBias: .300000012 25 | maximumLODLevel: 0 26 | particleRaycastBudget: 4 27 | excludedTargetPlatforms: [] 28 | - serializedVersion: 2 29 | name: Fast 30 | pixelLightCount: 0 31 | shadows: 0 32 | shadowResolution: 0 33 | shadowProjection: 1 34 | shadowCascades: 1 35 | shadowDistance: 20 36 | blendWeights: 2 37 | textureQuality: 0 38 | anisotropicTextures: 0 39 | antiAliasing: 0 40 | softParticles: 0 41 | softVegetation: 0 42 | vSyncCount: 0 43 | lodBias: .400000006 44 | maximumLODLevel: 0 45 | particleRaycastBudget: 16 46 | excludedTargetPlatforms: [] 47 | - serializedVersion: 2 48 | name: Simple 49 | pixelLightCount: 1 50 | shadows: 1 51 | shadowResolution: 0 52 | shadowProjection: 1 53 | shadowCascades: 1 54 | shadowDistance: 15 55 | blendWeights: 2 56 | textureQuality: 0 57 | anisotropicTextures: 1 58 | antiAliasing: 0 59 | softParticles: 0 60 | softVegetation: 0 61 | vSyncCount: 0 62 | lodBias: .699999988 63 | maximumLODLevel: 0 64 | particleRaycastBudget: 64 65 | excludedTargetPlatforms: [] 66 | - serializedVersion: 2 67 | name: Good 68 | pixelLightCount: 2 69 | shadows: 2 70 | shadowResolution: 1 71 | shadowProjection: 1 72 | shadowCascades: 2 73 | shadowDistance: 20 74 | blendWeights: 2 75 | textureQuality: 0 76 | anisotropicTextures: 1 77 | antiAliasing: 0 78 | softParticles: 0 79 | softVegetation: 1 80 | vSyncCount: 1 81 | lodBias: 1 82 | maximumLODLevel: 0 83 | particleRaycastBudget: 256 84 | excludedTargetPlatforms: [] 85 | - serializedVersion: 2 86 | name: Beautiful 87 | pixelLightCount: 3 88 | shadows: 2 89 | shadowResolution: 2 90 | shadowProjection: 1 91 | shadowCascades: 2 92 | shadowDistance: 30 93 | blendWeights: 4 94 | textureQuality: 0 95 | anisotropicTextures: 2 96 | antiAliasing: 2 97 | softParticles: 1 98 | softVegetation: 1 99 | vSyncCount: 1 100 | lodBias: 1.5 101 | maximumLODLevel: 0 102 | particleRaycastBudget: 1024 103 | excludedTargetPlatforms: [] 104 | - serializedVersion: 2 105 | name: Fantastic 106 | pixelLightCount: 4 107 | shadows: 2 108 | shadowResolution: 2 109 | shadowProjection: 1 110 | shadowCascades: 4 111 | shadowDistance: 100 112 | blendWeights: 4 113 | textureQuality: 0 114 | anisotropicTextures: 2 115 | antiAliasing: 8 116 | softParticles: 1 117 | softVegetation: 1 118 | vSyncCount: 1 119 | lodBias: 2 120 | maximumLODLevel: 0 121 | particleRaycastBudget: 4096 122 | excludedTargetPlatforms: [] 123 | m_PerPlatformDefaultQuality: 124 | Android: 2 125 | BlackBerry: 0 126 | FlashPlayer: 3 127 | GLES Emulation: 3 128 | PS3: 3 129 | Standalone: 5 130 | WP8: 0 131 | Web: 4 132 | Wii: 3 133 | Windows Store Apps: 0 134 | XBOX360: 3 135 | iPhone: 5 136 | -------------------------------------------------------------------------------- /UnitySpoutDemo/ProjectSettings/TagManager.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!78 &1 4 | TagManager: 5 | tags: 6 | - 7 | Builtin Layer 0: Default 8 | Builtin Layer 1: TransparentFX 9 | Builtin Layer 2: Ignore Raycast 10 | Builtin Layer 3: 11 | Builtin Layer 4: Water 12 | Builtin Layer 5: 13 | Builtin Layer 6: 14 | Builtin Layer 7: 15 | User Layer 8: 16 | User Layer 9: 17 | User Layer 10: 18 | User Layer 11: 19 | User Layer 12: 20 | User Layer 13: 21 | User Layer 14: 22 | User Layer 15: 23 | User Layer 16: 24 | User Layer 17: 25 | User Layer 18: 26 | User Layer 19: 27 | User Layer 20: 28 | User Layer 21: 29 | User Layer 22: 30 | User Layer 23: 31 | User Layer 24: 32 | User Layer 25: 33 | User Layer 26: 34 | User Layer 27: 35 | User Layer 28: 36 | User Layer 29: 37 | User Layer 30: 38 | User Layer 31: 39 | -------------------------------------------------------------------------------- /UnitySpoutDemo/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 | -------------------------------------------------------------------------------- /UnitySpoutDemo/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 | serializedVersion: 1 7 | m_Enabled: 0 8 | m_TestMode: 0 9 | m_EventOldUrl: https://api.uca.cloud.unity3d.com/v1/events 10 | m_EventUrl: https://cdp.cloud.unity3d.com/v1/events 11 | m_ConfigUrl: https://config.uca.cloud.unity3d.com 12 | m_TestInitMode: 0 13 | CrashReportingSettings: 14 | m_EventUrl: https://perf-events.cloud.unity3d.com 15 | m_Enabled: 0 16 | m_LogBufferSize: 10 17 | m_CaptureEditorExceptions: 1 18 | UnityPurchasingSettings: 19 | m_Enabled: 0 20 | m_TestMode: 0 21 | UnityAnalyticsSettings: 22 | m_Enabled: 0 23 | m_TestMode: 0 24 | m_InitializeOnStartup: 1 25 | UnityAdsSettings: 26 | m_Enabled: 0 27 | m_InitializeOnStartup: 1 28 | m_TestMode: 0 29 | m_IosGameId: 30 | m_AndroidGameId: 31 | m_GameIds: {} 32 | m_GameId: 33 | PerformanceReportingSettings: 34 | m_Enabled: 0 35 | -------------------------------------------------------------------------------- /UnitySpoutDemo/ProjectSettings/VFXManager.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!937362698 &1 4 | VFXManager: 5 | m_ObjectHideFlags: 0 6 | m_IndirectShader: {fileID: 0} 7 | m_CopyBufferShader: {fileID: 0} 8 | m_SortShader: {fileID: 0} 9 | m_RenderPipeSettingsPath: 10 | m_FixedTimeStep: 0.016666668 11 | m_MaxDeltaTime: 0.05 12 | --------------------------------------------------------------------------------