├── Install ├── Install.bat ├── InstallCustomName.bat ├── InstallMultipleDevices.bat ├── Uninstall.bat ├── UnityCaptureFilter32.dll └── UnityCaptureFilter64.dll ├── README.md ├── README.png ├── Source ├── .gitignore ├── IUnityGraphics.h ├── IUnityInterface.h ├── Tool_RegisterOneInBuild.bat ├── Tool_UnregisterAllInBuild.bat ├── UnityCapture.sln ├── UnityCaptureFilter.cpp ├── UnityCaptureFilter.def ├── UnityCaptureFilter.sln ├── UnityCaptureFilter.vcxproj ├── UnityCapturePlugin.cpp ├── UnityCapturePlugin.sln ├── UnityCapturePlugin.vcxproj ├── shared.inl ├── streams.cpp └── streams.h └── UnityCaptureSample ├── .gitignore ├── Assets ├── CaptureTexture.cs ├── CaptureTexture.cs.meta ├── CubesSwayBeeps.cs ├── CubesSwayBeeps.cs.meta ├── MultiCam.cs ├── MultiCam.cs.meta ├── UnityCapture.meta ├── UnityCapture │ ├── Plugins.meta │ ├── Plugins │ │ ├── x86.meta │ │ ├── x86 │ │ │ ├── UnityCapturePlugin.dll │ │ │ └── UnityCapturePlugin.dll.meta │ │ ├── x86_64.meta │ │ └── x86_64 │ │ │ ├── UnityCapturePlugin.dll │ │ │ └── UnityCapturePlugin.dll.meta │ ├── UnityCapture.cs │ └── UnityCapture.cs.meta ├── UnityCaptureExample.unity ├── UnityCaptureExample.unity.meta ├── UnityCaptureMultiCam.unity ├── UnityCaptureMultiCam.unity.meta ├── UnityCaptureTextureExample.unity └── UnityCaptureTextureExample.unity.meta └── ProjectSettings ├── AudioManager.asset ├── ClusterInputManager.asset ├── DynamicsManager.asset ├── EditorBuildSettings.asset ├── EditorSettings.asset ├── GraphicsSettings.asset ├── InputManager.asset ├── NavMeshAreas.asset ├── NetworkManager.asset ├── Physics2DSettings.asset ├── ProjectSettings.asset ├── ProjectVersion.txt ├── QualitySettings.asset ├── TagManager.asset ├── TimeManager.asset └── UnityConnectSettings.asset /Install/Install.bat: -------------------------------------------------------------------------------- 1 | @echo off 2 | 3 | :: BatchGotAdmin 4 | :------------------------------------- 5 | REM --> Check for permissions 6 | >nul 2>&1 "%SYSTEMROOT%\system32\cacls.exe" "%SYSTEMROOT%\system32\config\system" 7 | 8 | REM --> If error flag set, we do not have admin. 9 | if '%errorlevel%' NEQ '0' ( 10 | echo Requesting administrative privileges... 11 | goto UACPrompt 12 | ) else ( goto gotAdmin ) 13 | 14 | :UACPrompt 15 | echo Set UAC = CreateObject^("Shell.Application"^) > "%temp%\getadmin.vbs" 16 | set params = %*:"="" 17 | echo UAC.ShellExecute "cmd.exe", "/c %~s0 %params%", "", "runas", 1 >> "%temp%\getadmin.vbs" 18 | 19 | "%temp%\getadmin.vbs" 20 | del "%temp%\getadmin.vbs" 21 | exit /B 22 | 23 | :gotAdmin 24 | pushd "%CD%" 25 | CD /D "%~dp0" 26 | regsvr32 "UnityCaptureFilter32.dll" 27 | regsvr32 "UnityCaptureFilter64.dll" 28 | :-------------------------------------- 29 | -------------------------------------------------------------------------------- /Install/InstallCustomName.bat: -------------------------------------------------------------------------------- 1 | @echo off 2 | 3 | :: BatchGotAdmin 4 | :------------------------------------- 5 | REM --> Check for permissions 6 | >nul 2>&1 "%SYSTEMROOT%\system32\cacls.exe" "%SYSTEMROOT%\system32\config\system" 7 | 8 | REM --> If error flag set, we do not have admin. 9 | if '%errorlevel%' NEQ '0' ( 10 | echo Requesting administrative privileges... 11 | goto UACPrompt 12 | ) else ( goto gotAdmin ) 13 | 14 | :UACPrompt 15 | echo Set UAC = CreateObject^("Shell.Application"^) > "%temp%\getadmin.vbs" 16 | set params = %*:"="" 17 | echo UAC.ShellExecute "cmd.exe", "/c %~s0 %params%", "", "runas", 1 >> "%temp%\getadmin.vbs" 18 | 19 | "%temp%\getadmin.vbs" 20 | del "%temp%\getadmin.vbs" 21 | exit /B 22 | 23 | :gotAdmin 24 | pushd "%CD%" 25 | CD /D "%~dp0" 26 | set /P "UCCAPNAME=Enter a custom filter name to register as (default is 'Unity Video Capture'): " 27 | echo Installing capture device named '%UCCAPNAME%' ... 28 | regsvr32 "UnityCaptureFilter32.dll" "/i:UnityCaptureName=%UCCAPNAME%" 29 | regsvr32 "UnityCaptureFilter64.dll" "/i:UnityCaptureName=%UCCAPNAME%" 30 | echo "Done" 31 | :-------------------------------------- 32 | -------------------------------------------------------------------------------- /Install/InstallMultipleDevices.bat: -------------------------------------------------------------------------------- 1 | @echo off 2 | 3 | :: BatchGotAdmin 4 | :------------------------------------- 5 | REM --> Check for permissions 6 | >nul 2>&1 "%SYSTEMROOT%\system32\cacls.exe" "%SYSTEMROOT%\system32\config\system" 7 | 8 | REM --> If error flag set, we do not have admin. 9 | if '%errorlevel%' NEQ '0' ( 10 | echo Requesting administrative privileges... 11 | goto UACPrompt 12 | ) else ( goto gotAdmin ) 13 | 14 | :UACPrompt 15 | echo Set UAC = CreateObject^("Shell.Application"^) > "%temp%\getadmin.vbs" 16 | set params = %*:"="" 17 | echo UAC.ShellExecute "cmd.exe", "/c %~s0 %params%", "", "runas", 1 >> "%temp%\getadmin.vbs" 18 | 19 | "%temp%\getadmin.vbs" 20 | del "%temp%\getadmin.vbs" 21 | exit /B 22 | 23 | :gotAdmin 24 | pushd "%CD%" 25 | CD /D "%~dp0" 26 | set /P "UCNUMCAP=Enter number of capture devices you want to register: " 27 | echo "Installing %UCNUMCAP% capture devices ..." 28 | regsvr32 "UnityCaptureFilter32.dll" "/i:UnityCaptureDevices=%UCNUMCAP%" 29 | regsvr32 "UnityCaptureFilter64.dll" "/i:UnityCaptureDevices=%UCNUMCAP%" 30 | echo "Done" 31 | :-------------------------------------- 32 | -------------------------------------------------------------------------------- /Install/Uninstall.bat: -------------------------------------------------------------------------------- 1 | @echo off 2 | 3 | :: BatchGotAdmin 4 | :------------------------------------- 5 | REM --> Check for permissions 6 | >nul 2>&1 "%SYSTEMROOT%\system32\cacls.exe" "%SYSTEMROOT%\system32\config\system" 7 | 8 | REM --> If error flag set, we do not have admin. 9 | if '%errorlevel%' NEQ '0' ( 10 | echo Requesting administrative privileges... 11 | goto UACPrompt 12 | ) else ( goto gotAdmin ) 13 | 14 | :UACPrompt 15 | echo Set UAC = CreateObject^("Shell.Application"^) > "%temp%\getadmin.vbs" 16 | set params = %*:"="" 17 | echo UAC.ShellExecute "cmd.exe", "/c %~s0 %params%", "", "runas", 1 >> "%temp%\getadmin.vbs" 18 | 19 | "%temp%\getadmin.vbs" 20 | del "%temp%\getadmin.vbs" 21 | exit /B 22 | 23 | :gotAdmin 24 | pushd "%CD%" 25 | CD /D "%~dp0" 26 | regsvr32 /u "UnityCaptureFilter32.dll" 27 | regsvr32 /u "UnityCaptureFilter64.dll" 28 | :-------------------------------------- 29 | -------------------------------------------------------------------------------- /Install/UnityCaptureFilter32.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/schellingb/UnityCapture/3ed54c325e0ad71afcf4f246c07e5e17b3d7f2d2/Install/UnityCaptureFilter32.dll -------------------------------------------------------------------------------- /Install/UnityCaptureFilter64.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/schellingb/UnityCapture/3ed54c325e0ad71afcf4f246c07e5e17b3d7f2d2/Install/UnityCaptureFilter64.dll -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Unity Capture 2 | 3 | ![Unity Capture and OBS](https://raw.githubusercontent.com/schellingb/UnityCapture/master/README.png) 4 | 5 | ## Overview 6 | 7 | Unity Capture is a Windows DirectShow Filter that allows you to stream a rendered camera directly to another application. 8 | In more simple terms, it essentially makes Unity simulate a web cam device on Windows that shows a rendered camera. 9 | 10 | This project is based on [UnityCam by Yamen Saraiji](//github.com/mrayy/UnityCam) with added features and big performance 11 | improvements. It supports lag-free 1080p at 60 FPS on moderate PCs and can handle 4K resolutions on a faster PC. 12 | It also supports capturing multiple cameras and alpha channel (transparency) in receiving applications that 13 | support it (like [OBS](https://obsproject.com/)). 14 | 15 | 16 | ## Installation 17 | 18 | First download this project from GitHub with the [`Download ZIP`](../../archive/master.zip) button or by cloning the repository. 19 | 20 | To register the DirectShow Filter to be available in Windows programs, run the `Install.bat` inside the `Install` directory. 21 | Make sure the files in the install directory are placed where you want them to be. 22 | If you want to move or delete the files, run `Uninstall.bat` first. 23 | 24 | If you have problems registering or unregistering, right click on the Install.bat and choose "Run as Administrator". 25 | 26 | The script `Install.bat` registers just a single capture device usable for capturing a single Unity camera. If you want to 27 | capture multiple cameras simultaneously you can instead run the `InstallMultipleDevices.bat` script which prompts for a 28 | number of capture devices you wish to register. 29 | 30 | ### Update 31 | 32 | When updating from a version from before April 2023 it is recommended to uninstall the old version first. 33 | The old version is available [`here`](../../archive/7a3278dcefe37544370226e92bdfd60140434045.zip). 34 | 35 | 36 | ## Test in Unity 37 | 38 | Open the included UnityCaptureSample project in Unity, load the scene 'UnityCaptureExample' and hit play. 39 | Then run a receiving application (like [OBS](https://obsproject.com/), any program with web cam support 40 | or a [WebRTC website](https://webrtc.github.io/samples/src/content/getusermedia/resolution/)) and request 41 | video from the "Unity Video Capture" device. 42 | 43 | You should see the rendering output from Unity displayed in your target application. 44 | 45 | If you see a message about matching rendering and display resolutions, use the resolution settings on 46 | the 'Game' tab in Unity to set a fixed resolution to match the capture output. 47 | 48 | 49 | ## Setup in your Unity project 50 | 51 | Just copy the [UnityCapture asset directory from the included sample project](UnityCaptureSample/Assets/UnityCapture) 52 | into your own project and then add the 'Unity Capture' behavior to your camera at the bottom. 53 | 54 | You can also enable this behavior on a secondary camera that is not your main game camera by setting a target texture 55 | with your desired capture output resolution. 56 | 57 | If you want to capture multiple cameras simultaneously you can refer to the 'UnityCaptureMultiCam' scene 58 | and the 'MultiCam' script used by it. 59 | 60 | If you want to capture a custom texture (generated texture, a video, another webcam feed or a static image) you 61 | can refer to the 'UnityCaptureTextureExample' scene and the 'CaptureTexture' script used by it. 62 | 63 | ### Settings 64 | 65 | There are a few settings for the 'Unity Capture' behavior. 66 | 67 | - 'Capture Device': Set the capture device filter number (only relevant when multiple capture devices were [installed](#installation)) 68 | - 'Timeout': Sets how many milliseconds to wait for a new frame until sending is considered to be stopped 69 | If rendering every frame this can be very low. Default is 1000 to allow stalls due to loading, etc. 70 | When set to 0 the image will stay up even when Unity is ended (until the receiving application also ends). 71 | - 'Resize Mode': It is suggested to leave this disabled and just let your capture target application handle the display 72 | sizing/resizing because this setting can introduce frame skipping. So far only a very basic linear resize is supported. 73 | - 'Mirror Mode': This setting should also be handled by your target application if possible and needed, but it is available. 74 | - 'Double Buffering': See [performance caveats](#performance-caveats) below 75 | - 'Enable V Sync': Overwrite the state of the application v-sync setting on component start 76 | - 'Target Frame Rate': Overwrite the application target fps setting on component start 77 | - 'Hide Warnings': Disable output of warning messages (but not errors) 78 | 79 | ### Possible errors/warnings 80 | 81 | - Warning: "Capture device did skip a frame read, capture frame rate will not match render frame rate." 82 | Output when a frame rendered by Unity was never displayed in the target capture application due 83 | to performance problems or target application being slow. 84 | - Warning: "Capture device is inactive" 85 | If the target capture application has not been started yet. 86 | - Error: "Unsupported graphics device (only D3D11 supported)" 87 | When Unity uses a rendering back-end other than Direct 3D 11. 88 | - Error: "Render resolution is too large to send to capture device" 89 | When trying to send data with a resolution higher than the maximum supported 3840 x 2160 90 | - Error: "Render texture format is unsupported" 91 | When the rendered data/color format would require additional conversation. 92 | - Error: "Error while reading texture image data" 93 | Generic error when the plugin is unable to access the rendered image pixel data. 94 | 95 | 96 | ## Output Device Configuration 97 | 98 | In your receiving application mainly two settings are of relevance. 99 | Depending on the application, the settings might be named different or not available at all in which case it will fall back to a default. 100 | - Resolution: Set this to match the rendering resolution in Unity. Depending on your target application you may be able 101 | to request a custom resolution. For instance in OBS you can input 512x512 into the resolution settings textbox. 102 | For custom resolutions, make sure width is specified in increments of 4. 103 | - Video Format: Set this to ARGB if you want to capture the alpha channel (transparency). 104 | Other settings like FPS, color space or buffering are irrelevant as the output from Unity controls these parameters. 105 | 106 | There are four additional settings in the configuration panel offered by the capture device. Some applications like OBS allow you to access 107 | these settings with a 'Configure Video' button, other applications like web browsers might not. 108 | 109 | These settings control what will be displayed in the output in case of an error: 110 | - 'Resolution mismatch': When resizing in the Unity behavior is disabled and the capture output and the rendering resolutions don't match. 111 | - 'Unity never started': When rendering in Unity with a 'Unity Capture' behavior has never started sending video data. 112 | - 'Unity sending stopped': When video data stops being received (i.e. Unity game stopped or crashed). 113 | 114 | There are four modes that can be set for the settings above: 115 | - 'Fill Black': Show just black. 116 | - 'Blue/Pink Pattern': A pattern that is blue and pink. 117 | - 'Green/Yellow Pattern': A pattern that is green and yellow. 118 | - 'Green Key (RGB #00FE00)': Fills the output with a specific color (red and blue at 0, green at 254). 119 | This can be used for instance in OBS with the 'Color Key' video filter to show a layer behind the video capture. 120 | You can use this if you want to show a 'Please stand by...' image layer when Unity is stopped. 121 | 122 | The settings 'Fill Black' and 'Green Key' are shown as completely transparent when capturing with alpha channel. 123 | 124 | For the two colored patterns an additional text message will be displayed detailing the error. 125 | 126 | The setting 'Display FPS' shows the capture frame rate (frames per second) on the capture device output. 127 | 128 | 129 | ## Performance caveats 130 | 131 | There are two main improvements to capture stream frame rate. 132 | 133 | One is to disable the camera setting 'Allow HDR' which causes the camera output texture format 134 | to be in a favorable format (8-bit integer per color per pixel). If your shaders and post-processing 135 | allow it, it's recommended to leave HDR off. 136 | 137 | The other is the setting 'DoubleBuffering' in the UnityCapture component. 138 | Double buffering causes 1 frame of additional latency but improves the image data throughput. 139 | You can check the Unity profiler for how much it impacts performance in your project. 140 | 141 | Otherwise it is recommended to leave scaling and mirroring disabled in the UnityCapture component. 142 | 143 | 144 | ## Todo 145 | 146 | - Saving of the output device configuration 147 | - Bilinear filtered resizing 148 | 149 | 150 | ## License 151 | 152 | Unity Capture is divided into two parts that are separately licensed. 153 | The filter 'UnityCaptureFilter' is available under the [MIT license](https://choosealicense.com/licenses/mit/). 154 | The Unity plugin 'UnityCapturePlugin' is available under the [zlib license](https://choosealicense.com/licenses/zlib/) (so attribution in your Unity project is optional). 155 | -------------------------------------------------------------------------------- /README.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/schellingb/UnityCapture/3ed54c325e0ad71afcf4f246c07e5e17b3d7f2d2/README.png -------------------------------------------------------------------------------- /Source/.gitignore: -------------------------------------------------------------------------------- 1 | .vs/* 2 | Build/* 3 | *.suo 4 | *.user 5 | *.sdf 6 | *.opensdf 7 | *.db 8 | -------------------------------------------------------------------------------- /Source/IUnityGraphics.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | #include "IUnityInterface.h" 3 | 4 | typedef enum UnityGfxRenderer 5 | { 6 | kUnityGfxRendererOpenGL = 0, // Legacy OpenGL 7 | kUnityGfxRendererD3D9 = 1, // Direct3D 9 8 | kUnityGfxRendererD3D11 = 2, // Direct3D 11 9 | kUnityGfxRendererGCM = 3, // PlayStation 3 10 | kUnityGfxRendererNull = 4, // "null" device (used in batch mode) 11 | kUnityGfxRendererXenon = 6, // Xbox 360 12 | kUnityGfxRendererOpenGLES20 = 8, // OpenGL ES 2.0 13 | kUnityGfxRendererOpenGLES30 = 11, // OpenGL ES 3.x 14 | kUnityGfxRendererGXM = 12, // PlayStation Vita 15 | kUnityGfxRendererPS4 = 13, // PlayStation 4 16 | kUnityGfxRendererXboxOne = 14, // Xbox One 17 | kUnityGfxRendererMetal = 16, // iOS Metal 18 | kUnityGfxRendererOpenGLCore = 17, // OpenGL core 19 | kUnityGfxRendererD3D12 = 18, // Direct3D 12 20 | } UnityGfxRenderer; 21 | 22 | typedef enum UnityGfxDeviceEventType 23 | { 24 | kUnityGfxDeviceEventInitialize = 0, 25 | kUnityGfxDeviceEventShutdown = 1, 26 | kUnityGfxDeviceEventBeforeReset = 2, 27 | kUnityGfxDeviceEventAfterReset = 3, 28 | } UnityGfxDeviceEventType; 29 | 30 | typedef void (UNITY_INTERFACE_API * IUnityGraphicsDeviceEventCallback)(UnityGfxDeviceEventType eventType); 31 | 32 | // Should only be used on the rendering thread unless noted otherwise. 33 | UNITY_DECLARE_INTERFACE(IUnityGraphics) 34 | { 35 | UnityGfxRenderer (UNITY_INTERFACE_API * GetRenderer)(); // Thread safe 36 | 37 | // This callback will be called when graphics device is created, destroyed, reset, etc. 38 | // It is possible to miss the kUnityGfxDeviceEventInitialize event in case plugin is loaded at a later time, 39 | // when the graphics device is already created. 40 | void (UNITY_INTERFACE_API * RegisterDeviceEventCallback)(IUnityGraphicsDeviceEventCallback callback); 41 | void (UNITY_INTERFACE_API * UnregisterDeviceEventCallback)(IUnityGraphicsDeviceEventCallback callback); 42 | }; 43 | UNITY_REGISTER_INTERFACE_GUID(0x7CBA0A9CA4DDB544ULL,0x8C5AD4926EB17B11ULL,IUnityGraphics) 44 | 45 | 46 | 47 | // Certain Unity APIs (GL.IssuePluginEvent, CommandBuffer.IssuePluginEvent) can callback into native plugins. 48 | // Provide them with an address to a function of this signature. 49 | typedef void (UNITY_INTERFACE_API * UnityRenderingEvent)(int eventId); 50 | -------------------------------------------------------------------------------- /Source/IUnityInterface.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | // Unity native plugin API 4 | // Compatible with C99 5 | 6 | #if defined(__CYGWIN32__) 7 | #define UNITY_INTERFACE_API __stdcall 8 | #define UNITY_INTERFACE_EXPORT __declspec(dllexport) 9 | #elif defined(WIN32) || defined(_WIN32) || defined(__WIN32__) || defined(_WIN64) || defined(WINAPI_FAMILY) 10 | #define UNITY_INTERFACE_API __stdcall 11 | #define UNITY_INTERFACE_EXPORT __declspec(dllexport) 12 | #elif defined(__MACH__) || defined(__ANDROID__) || defined(__linux__) || defined(__QNX__) 13 | #define UNITY_INTERFACE_API 14 | #define UNITY_INTERFACE_EXPORT 15 | #else 16 | #define UNITY_INTERFACE_API 17 | #define UNITY_INTERFACE_EXPORT 18 | #endif 19 | 20 | 21 | 22 | // Unity Interface GUID 23 | // Ensures cross plugin uniqueness. 24 | // 25 | // Template specialization is used to produce a means of looking up a GUID from it's payload type at compile time. 26 | // The net result should compile down to passing around the GUID. 27 | // 28 | // UNITY_REGISTER_INTERFACE_GUID should be placed in the header file of any payload definition outside of all namespaces. 29 | // The payload structure and the registration GUID are all that is required to expose the interface to other systems. 30 | struct UnityInterfaceGUID 31 | { 32 | #ifdef __cplusplus 33 | UnityInterfaceGUID(unsigned long long high, unsigned long long low) 34 | : m_GUIDHigh(high) 35 | , m_GUIDLow(low) 36 | { 37 | } 38 | 39 | UnityInterfaceGUID(const UnityInterfaceGUID& other) 40 | { 41 | m_GUIDHigh = other.m_GUIDHigh; 42 | m_GUIDLow = other.m_GUIDLow; 43 | } 44 | 45 | UnityInterfaceGUID& operator=(const UnityInterfaceGUID& other) 46 | { 47 | m_GUIDHigh = other.m_GUIDHigh; 48 | m_GUIDLow = other.m_GUIDLow; 49 | return *this; 50 | } 51 | 52 | bool Equals(const UnityInterfaceGUID& other) const { return m_GUIDHigh == other.m_GUIDHigh && m_GUIDLow == other.m_GUIDLow; } 53 | bool LessThan(const UnityInterfaceGUID& other) const { return m_GUIDHigh < other.m_GUIDHigh || (m_GUIDHigh == other.m_GUIDHigh && m_GUIDLow < other.m_GUIDLow); } 54 | #endif 55 | unsigned long long m_GUIDHigh; 56 | unsigned long long m_GUIDLow; 57 | }; 58 | #ifdef __cplusplus 59 | inline bool operator==(const UnityInterfaceGUID& left, const UnityInterfaceGUID& right) { return left.Equals(right); } 60 | inline bool operator!=(const UnityInterfaceGUID& left, const UnityInterfaceGUID& right) { return !left.Equals(right); } 61 | inline bool operator< (const UnityInterfaceGUID& left, const UnityInterfaceGUID& right) { return left.LessThan(right); } 62 | inline bool operator> (const UnityInterfaceGUID& left, const UnityInterfaceGUID& right) { return right.LessThan(left); } 63 | inline bool operator>=(const UnityInterfaceGUID& left, const UnityInterfaceGUID& right) { return !operator< (left,right); } 64 | inline bool operator<=(const UnityInterfaceGUID& left, const UnityInterfaceGUID& right) { return !operator> (left,right); } 65 | #else 66 | typedef struct UnityInterfaceGUID UnityInterfaceGUID; 67 | #endif 68 | 69 | 70 | 71 | #define UNITY_GET_INTERFACE_GUID(TYPE) TYPE##_GUID 72 | #define UNITY_GET_INTERFACE(INTERFACES, TYPE) (TYPE*)INTERFACES->GetInterface(UNITY_GET_INTERFACE_GUID(TYPE)); 73 | 74 | #ifdef __cplusplus 75 | #define UNITY_DECLARE_INTERFACE(NAME) \ 76 | struct NAME : IUnityInterface 77 | 78 | template \ 79 | inline const UnityInterfaceGUID GetUnityInterfaceGUID(); \ 80 | 81 | #define UNITY_REGISTER_INTERFACE_GUID(HASHH, HASHL, TYPE) \ 82 | const UnityInterfaceGUID TYPE##_GUID(HASHH, HASHL); \ 83 | template<> \ 84 | inline const UnityInterfaceGUID GetUnityInterfaceGUID() \ 85 | { \ 86 | return UNITY_GET_INTERFACE_GUID(TYPE); \ 87 | } 88 | #else 89 | #define UNITY_DECLARE_INTERFACE(NAME) \ 90 | typedef struct NAME NAME; \ 91 | struct NAME 92 | 93 | #define UNITY_REGISTER_INTERFACE_GUID(HASHH, HASHL, TYPE) \ 94 | const UnityInterfaceGUID TYPE##_GUID = {HASHH, HASHL}; 95 | #endif 96 | 97 | 98 | 99 | #ifdef __cplusplus 100 | struct IUnityInterface 101 | { 102 | }; 103 | #else 104 | typedef void IUnityInterface; 105 | #endif 106 | 107 | 108 | 109 | typedef struct IUnityInterfaces 110 | { 111 | // Returns an interface matching the guid. 112 | // Returns nullptr if the given interface is unavailable in the active Unity runtime. 113 | IUnityInterface* (UNITY_INTERFACE_API * GetInterface)(UnityInterfaceGUID guid); 114 | 115 | // Registers a new interface. 116 | void (UNITY_INTERFACE_API * RegisterInterface)(UnityInterfaceGUID guid, IUnityInterface* ptr); 117 | 118 | #ifdef __cplusplus 119 | // Helper for GetInterface. 120 | template 121 | INTERFACE* Get() 122 | { 123 | return static_cast(GetInterface(GetUnityInterfaceGUID())); 124 | } 125 | 126 | // Helper for RegisterInterface. 127 | template 128 | void Register(IUnityInterface* ptr) 129 | { 130 | RegisterInterface(GetUnityInterfaceGUID(), ptr); 131 | } 132 | #endif 133 | } IUnityInterfaces; 134 | 135 | 136 | 137 | #ifdef __cplusplus 138 | extern "C" { 139 | #endif 140 | 141 | // If exported by a plugin, this function will be called when the plugin is loaded. 142 | void UNITY_INTERFACE_EXPORT UNITY_INTERFACE_API UnityPluginLoad(IUnityInterfaces* unityInterfaces); 143 | // If exported by a plugin, this function will be called when the plugin is about to be unloaded. 144 | void UNITY_INTERFACE_EXPORT UNITY_INTERFACE_API UnityPluginUnload(); 145 | 146 | #ifdef __cplusplus 147 | } 148 | #endif 149 | -------------------------------------------------------------------------------- /Source/Tool_RegisterOneInBuild.bat: -------------------------------------------------------------------------------- 1 | @echo off 2 | 3 | :: BatchGotAdmin 4 | :------------------------------------- 5 | REM --> Check for permissions 6 | >nul 2>&1 "%SYSTEMROOT%\system32\cacls.exe" "%SYSTEMROOT%\system32\config\system" 7 | 8 | REM --> If error flag set, we do not have admin. 9 | if '%errorlevel%' NEQ '0' ( 10 | echo Requesting administrative privileges... 11 | goto UACPrompt 12 | ) else ( goto gotAdmin ) 13 | 14 | :UACPrompt 15 | echo Set UAC = CreateObject^("Shell.Application"^) > "%temp%\getadmin.vbs" 16 | set params = %*:"="" 17 | echo UAC.ShellExecute "cmd.exe", "/c %~s0 %params%", "", "runas", 1 >> "%temp%\getadmin.vbs" 18 | 19 | "%temp%\getadmin.vbs" 20 | del "%temp%\getadmin.vbs" 21 | exit /B 22 | 23 | :gotAdmin 24 | pushd "%CD%" 25 | CD /D "%~dp0\Build" 26 | 27 | ECHO Select the configuration and platform variation you want to register 28 | CLS 29 | ECHO 1. Debug - 64 bit 30 | ECHO 2. Release - 64 bit 31 | ECHO 3. Debug - 32 bit 32 | ECHO 4. Release - 64 bit 33 | ECHO. 34 | 35 | CHOICE /C 1234 /M "Enter your choice:" 36 | 37 | :: Note - list ERRORLEVELS in decreasing order 38 | IF ERRORLEVEL 4 GOTO Release32bit 39 | IF ERRORLEVEL 3 GOTO Debug32bit 40 | IF ERRORLEVEL 2 GOTO Releae64bit 41 | IF ERRORLEVEL 1 GOTO Debug64bit 42 | 43 | :Debug64bit 44 | regsvr32 "Debug-UnityCaptureFilter64bit\UnityCaptureFilter64bit.dll" 45 | GOTO End 46 | 47 | :Releae64bit 48 | regsvr32 "Release-UnityCaptureFilter64bit\UnityCaptureFilter64bit.dll" 49 | GOTO End 50 | 51 | :Debug32bit 52 | regsvr32 "Debug-UnityCaptureFilter32bit\UnityCaptureFilter32bit.dll" 53 | GOTO End 54 | 55 | :Release32bit 56 | regsvr32 "Release-UnityCaptureFilter32bit\UnityCaptureFilter32bit.dll" 57 | GOTO End 58 | :-------------------------------------- 59 | -------------------------------------------------------------------------------- /Source/Tool_UnregisterAllInBuild.bat: -------------------------------------------------------------------------------- 1 | @echo off 2 | 3 | :: BatchGotAdmin 4 | :------------------------------------- 5 | REM --> Check for permissions 6 | >nul 2>&1 "%SYSTEMROOT%\system32\cacls.exe" "%SYSTEMROOT%\system32\config\system" 7 | 8 | REM --> If error flag set, we do not have admin. 9 | if '%errorlevel%' NEQ '0' ( 10 | echo Requesting administrative privileges... 11 | goto UACPrompt 12 | ) else ( goto gotAdmin ) 13 | 14 | :UACPrompt 15 | echo Set UAC = CreateObject^("Shell.Application"^) > "%temp%\getadmin.vbs" 16 | set params = %*:"="" 17 | echo UAC.ShellExecute "cmd.exe", "/c %~s0 %params%", "", "runas", 1 >> "%temp%\getadmin.vbs" 18 | 19 | "%temp%\getadmin.vbs" 20 | del "%temp%\getadmin.vbs" 21 | exit /B 22 | 23 | :gotAdmin 24 | pushd "%CD%" 25 | CD /D "%~dp0\Build" 26 | regsvr32 /u "Debug-UnityCaptureFilter32bit\UnityCaptureFilter32bit.dll" 27 | regsvr32 /u "Debug-UnityCaptureFilter64bit\UnityCaptureFilter64bit.dll" 28 | regsvr32 /u "Release-UnityCaptureFilter32bit\UnityCaptureFilter32bit.dll" 29 | regsvr32 /u "Release-UnityCaptureFilter64bit\UnityCaptureFilter64bit.dll" 30 | :-------------------------------------- 31 | -------------------------------------------------------------------------------- /Source/UnityCapture.sln: -------------------------------------------------------------------------------- 1 |  2 | Microsoft Visual Studio Solution File, Format Version 12.00 3 | # Visual Studio 2013 4 | VisualStudioVersion = 12.0.40629.0 5 | MinimumVisualStudioVersion = 10.0.40219.1 6 | Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "UnityCaptureFilter", "UnityCaptureFilter.vcxproj", "{3D0A9889-9EC1-4012-9382-4FE1EB610D28}" 7 | Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "UnityCapturePlugin", "UnityCapturePlugin.vcxproj", "{727D3AC5-27B5-4288-A475-7A471ECD71B8}" 8 | EndProject 9 | Global 10 | GlobalSection(SolutionConfigurationPlatforms) = preSolution 11 | Debug|Win32 = Debug|Win32 12 | Debug|x64 = Debug|x64 13 | Release|Win32 = Release|Win32 14 | Release|x64 = Release|x64 15 | EndGlobalSection 16 | GlobalSection(ProjectConfigurationPlatforms) = postSolution 17 | {3D0A9889-9EC1-4012-9382-4FE1EB610D28}.Debug|Win32.ActiveCfg = Debug|Win32 18 | {3D0A9889-9EC1-4012-9382-4FE1EB610D28}.Debug|Win32.Build.0 = Debug|Win32 19 | {3D0A9889-9EC1-4012-9382-4FE1EB610D28}.Debug|x64.ActiveCfg = Debug|x64 20 | {3D0A9889-9EC1-4012-9382-4FE1EB610D28}.Debug|x64.Build.0 = Debug|x64 21 | {3D0A9889-9EC1-4012-9382-4FE1EB610D28}.Release|Win32.ActiveCfg = Release|Win32 22 | {3D0A9889-9EC1-4012-9382-4FE1EB610D28}.Release|Win32.Build.0 = Release|Win32 23 | {3D0A9889-9EC1-4012-9382-4FE1EB610D28}.Release|x64.ActiveCfg = Release|x64 24 | {3D0A9889-9EC1-4012-9382-4FE1EB610D28}.Release|x64.Build.0 = Release|x64 25 | {727D3AC5-27B5-4288-A475-7A471ECD71B8}.Debug|Win32.ActiveCfg = Debug|Win32 26 | {727D3AC5-27B5-4288-A475-7A471ECD71B8}.Debug|Win32.Build.0 = Debug|Win32 27 | {727D3AC5-27B5-4288-A475-7A471ECD71B8}.Debug|x64.ActiveCfg = Debug|x64 28 | {727D3AC5-27B5-4288-A475-7A471ECD71B8}.Debug|x64.Build.0 = Debug|x64 29 | {727D3AC5-27B5-4288-A475-7A471ECD71B8}.Release|Win32.ActiveCfg = Release|Win32 30 | {727D3AC5-27B5-4288-A475-7A471ECD71B8}.Release|Win32.Build.0 = Release|Win32 31 | {727D3AC5-27B5-4288-A475-7A471ECD71B8}.Release|x64.ActiveCfg = Release|x64 32 | {727D3AC5-27B5-4288-A475-7A471ECD71B8}.Release|x64.Build.0 = Release|x64 33 | EndGlobalSection 34 | GlobalSection(SolutionProperties) = preSolution 35 | HideSolutionNode = FALSE 36 | EndGlobalSection 37 | EndGlobal 38 | -------------------------------------------------------------------------------- /Source/UnityCaptureFilter.def: -------------------------------------------------------------------------------- 1 | EXPORTS 2 | DllMain PRIVATE 3 | DllRegisterServer PRIVATE 4 | DllUnregisterServer PRIVATE 5 | DllGetClassObject PRIVATE 6 | DllCanUnloadNow PRIVATE 7 | DllInstall PRIVATE 8 | -------------------------------------------------------------------------------- /Source/UnityCaptureFilter.sln: -------------------------------------------------------------------------------- 1 |  2 | Microsoft Visual Studio Solution File, Format Version 12.00 3 | # Visual Studio 2013 4 | VisualStudioVersion = 12.0.40629.0 5 | MinimumVisualStudioVersion = 10.0.40219.1 6 | Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "UnityCaptureFilter", "UnityCaptureFilter.vcxproj", "{3D0A9889-9EC1-4012-9382-4FE1EB610D28}" 7 | EndProject 8 | Global 9 | GlobalSection(SolutionConfigurationPlatforms) = preSolution 10 | Debug|Win32 = Debug|Win32 11 | Debug|x64 = Debug|x64 12 | Release|Win32 = Release|Win32 13 | Release|x64 = Release|x64 14 | EndGlobalSection 15 | GlobalSection(ProjectConfigurationPlatforms) = postSolution 16 | {3D0A9889-9EC1-4012-9382-4FE1EB610D28}.Debug|Win32.ActiveCfg = Debug|Win32 17 | {3D0A9889-9EC1-4012-9382-4FE1EB610D28}.Debug|Win32.Build.0 = Debug|Win32 18 | {3D0A9889-9EC1-4012-9382-4FE1EB610D28}.Debug|x64.ActiveCfg = Debug|x64 19 | {3D0A9889-9EC1-4012-9382-4FE1EB610D28}.Debug|x64.Build.0 = Debug|x64 20 | {3D0A9889-9EC1-4012-9382-4FE1EB610D28}.Release|Win32.ActiveCfg = Release|Win32 21 | {3D0A9889-9EC1-4012-9382-4FE1EB610D28}.Release|Win32.Build.0 = Release|Win32 22 | {3D0A9889-9EC1-4012-9382-4FE1EB610D28}.Release|x64.ActiveCfg = Release|x64 23 | {3D0A9889-9EC1-4012-9382-4FE1EB610D28}.Release|x64.Build.0 = Release|x64 24 | EndGlobalSection 25 | GlobalSection(SolutionProperties) = preSolution 26 | HideSolutionNode = FALSE 27 | EndGlobalSection 28 | EndGlobal 29 | -------------------------------------------------------------------------------- /Source/UnityCaptureFilter.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 | UnityCaptureFilter 23 | UnityCaptureFilter 24 | {3D0A9889-9EC1-4012-9382-4FE1EB610D28} 25 | 26 | 27 | 28 | DynamicLibrary 29 | v110_xp 30 | v120_xp 31 | v140 32 | v141 33 | false 34 | MultiByte 35 | true 36 | true 37 | 38 | 39 | 40 | 41 | 42 | 43 | UnityCaptureFilter64 44 | UnityCaptureFilter32 45 | Build\$(Configuration)-$(TargetName)\ 46 | $(OutDir) 47 | false 48 | true 49 | false 50 | $(ProgramW6432)\OBSStudio\bin\x64\obs64.exe 51 | $(ProgramW6432)\OBSStudio\bin\x64 52 | WindowsLocalDebugger 53 | 54 | 55 | 56 | false 57 | Level3 58 | true 59 | false 60 | false 61 | 62 | 63 | Win32;_DEBUG;_WINDOWS;_USRDLL;%(PreprocessorDefinitions) 64 | Disabled 65 | EnableFastChecks 66 | MultiThreadedDebug 67 | 68 | 69 | Win32;NDEBUG;_WINDOWS;_USRDLL;%(PreprocessorDefinitions) 70 | Full 71 | true 72 | MultiThreaded 73 | true 74 | true 75 | true 76 | Speed 77 | true 78 | AnySuitable 79 | false 80 | /Gw %(AdditionalOptions) 81 | 82 | 83 | true 84 | true 85 | Windows 86 | false 87 | $(ProjectName).def 88 | 89 | 90 | true 91 | true 92 | UseLinkTimeCodeGeneration 93 | true 94 | false 95 | 96 | 97 | 98 | 99 | 100 | 101 | 102 | 103 | 104 | 105 | -------------------------------------------------------------------------------- /Source/UnityCapturePlugin.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | Unity Capture 3 | Copyright (c) 2018 Bernhard Schelling 4 | 5 | Based on UnityCam 6 | https://github.com/mrayy/UnityCam 7 | Copyright (c) 2016 MHD Yamen Saraiji 8 | 9 | This software is provided 'as-is', without any express or implied 10 | warranty. In no event will the authors be held liable for any damages 11 | arising from the use of this software. 12 | 13 | Permission is granted to anyone to use this software for any purpose, 14 | including commercial applications, and to alter it and redistribute it 15 | freely, subject to the following restrictions: 16 | 17 | 1. The origin of this software must not be misrepresented; you must not 18 | claim that you wrote the original software. If you use this software 19 | in a product, an acknowledgment in the product documentation would be 20 | appreciated but is not required. 21 | 2. Altered source versions must be plainly marked as such, and must not be 22 | misrepresented as being the original software. 23 | 3. This notice may not be removed or altered from any source distribution. 24 | */ 25 | 26 | #include "shared.inl" 27 | #include 28 | #include 29 | #include "IUnityGraphics.h" 30 | 31 | enum 32 | { 33 | RET_SUCCESS = 0, 34 | RET_WARNING_FRAMESKIP = 1, 35 | RET_WARNING_CAPTUREINACTIVE = 2, 36 | RET_ERROR_UNSUPPORTEDGRAPHICSDEVICE = 100, 37 | RET_ERROR_PARAMETER = 101, 38 | RET_ERROR_TOOLARGERESOLUTION = 102, 39 | RET_ERROR_TEXTUREFORMAT = 103, 40 | RET_ERROR_READTEXTURE = 104, 41 | }; 42 | 43 | #include 44 | 45 | static int g_GraphicsDeviceType = -1; 46 | static ID3D11Device* g_D3D11GraphicsDevice = 0; 47 | 48 | struct UnityCaptureInstance 49 | { 50 | SharedImageMemory* Sender; 51 | int Width, Height; 52 | DXGI_FORMAT Format; 53 | bool UseDoubleBuffering, AlternativeBuffer; 54 | ID3D11Texture2D* Textures[2]; 55 | }; 56 | 57 | extern "C" __declspec(dllexport) UnityCaptureInstance* CaptureCreateInstance(int CapNum) 58 | { 59 | UnityCaptureInstance* c = new UnityCaptureInstance(); 60 | memset(c, 0, sizeof(UnityCaptureInstance)); 61 | c->Sender = new SharedImageMemory(CapNum); 62 | return c; 63 | } 64 | 65 | extern "C" __declspec(dllexport) void CaptureDeleteInstance(UnityCaptureInstance* c) 66 | { 67 | if (!c) return; 68 | delete c->Sender; 69 | if (c->Textures[0]) c->Textures[0]->Release(); 70 | if (c->Textures[1]) c->Textures[1]->Release(); 71 | delete c; 72 | } 73 | 74 | extern "C" __declspec(dllexport) int CaptureSendTexture(UnityCaptureInstance* c, void* TextureNativePtr, int Timeout, bool UseDoubleBuffering, SharedImageMemory::EResizeMode ResizeMode, SharedImageMemory::EMirrorMode MirrorMode, bool IsLinearColorSpace) 75 | { 76 | if (!c || !TextureNativePtr) return RET_ERROR_PARAMETER; 77 | if (g_GraphicsDeviceType != kUnityGfxRendererD3D11) return RET_ERROR_UNSUPPORTEDGRAPHICSDEVICE; 78 | if (!c->Sender->SendIsReady()) return RET_WARNING_CAPTUREINACTIVE; 79 | 80 | //Get the active D3D11 context 81 | ID3D11DeviceContext* ctx = NULL; 82 | g_D3D11GraphicsDevice->GetImmediateContext(&ctx); 83 | if (!ctx) return RET_ERROR_UNSUPPORTEDGRAPHICSDEVICE; 84 | 85 | //Read the size and format info from the render texture 86 | ID3D11Texture2D* d3dtex = (ID3D11Texture2D*)TextureNativePtr; 87 | D3D11_TEXTURE2D_DESC desc = {0}; 88 | d3dtex->GetDesc(&desc); 89 | if (!desc.Width || !desc.Height) return RET_ERROR_READTEXTURE; 90 | 91 | if (c->Width != desc.Width || c->Height != desc.Height || c->Format != desc.Format || c->UseDoubleBuffering != UseDoubleBuffering) 92 | { 93 | //Allocate a Texture2D resource which holds the texture with CPU memory access 94 | D3D11_TEXTURE2D_DESC textureDesc; 95 | ZeroMemory(&textureDesc, sizeof(textureDesc)); 96 | textureDesc.Width = desc.Width; 97 | textureDesc.Height = desc.Height; 98 | textureDesc.MipLevels = desc.MipLevels; 99 | textureDesc.ArraySize = 1; 100 | textureDesc.Format = desc.Format; 101 | textureDesc.SampleDesc.Count = 1; 102 | textureDesc.SampleDesc.Quality = 0; 103 | textureDesc.Usage = D3D11_USAGE_STAGING; 104 | textureDesc.CPUAccessFlags = D3D11_CPU_ACCESS_READ; 105 | textureDesc.MiscFlags = 0; 106 | if (c->Textures[0]) c->Textures[0]->Release(); 107 | g_D3D11GraphicsDevice->CreateTexture2D(&textureDesc, NULL, &c->Textures[0]); 108 | if (c->Textures[1]) c->Textures[1]->Release(); 109 | if (UseDoubleBuffering) g_D3D11GraphicsDevice->CreateTexture2D(&textureDesc, NULL, &c->Textures[1]); 110 | else c->Textures[1] = NULL; 111 | c->Width = desc.Width; 112 | c->Height = desc.Height; 113 | c->Format = desc.Format; 114 | c->UseDoubleBuffering = UseDoubleBuffering; 115 | } 116 | 117 | //Handle double buffer 118 | if (c->UseDoubleBuffering) c->AlternativeBuffer ^= 1; 119 | ID3D11Texture2D* WriteTexture = c->Textures[c->UseDoubleBuffering && c->AlternativeBuffer ? 1 : 0]; 120 | ID3D11Texture2D* ReadTexture = c->Textures[c->UseDoubleBuffering && !c->AlternativeBuffer ? 1 : 0]; 121 | 122 | //Check texture format 123 | SharedImageMemory::EFormat Format; 124 | if (desc.Format == DXGI_FORMAT_R8G8B8A8_UNORM || desc.Format == DXGI_FORMAT_R8G8B8A8_UNORM_SRGB || desc.Format == DXGI_FORMAT_R8G8B8A8_UINT || desc.Format == DXGI_FORMAT_R8G8B8A8_TYPELESS) Format = SharedImageMemory::FORMAT_UINT8; 125 | else if (desc.Format == DXGI_FORMAT_R16G16B16A16_FLOAT || desc.Format == DXGI_FORMAT_R16G16B16A16_TYPELESS) Format = (IsLinearColorSpace ? SharedImageMemory::FORMAT_FP16_LINEAR : SharedImageMemory::FORMAT_FP16_GAMMA); 126 | else return RET_ERROR_TEXTUREFORMAT; 127 | 128 | //Copy render texture to texture with CPU access and map the image data to RAM 129 | ctx->CopyResource(WriteTexture, d3dtex); 130 | D3D11_MAPPED_SUBRESOURCE mapResource; 131 | if (FAILED(ctx->Map(ReadTexture, 0, D3D11_MAP_READ, 0, &mapResource))) return RET_ERROR_READTEXTURE; 132 | 133 | //Push the captured data to the direct show filter 134 | SharedImageMemory::ESendResult res = c->Sender->Send(desc.Width, desc.Height, mapResource.RowPitch / (Format == SharedImageMemory::FORMAT_UINT8 ? 4 : 8), mapResource.RowPitch * desc.Height, Format, ResizeMode, MirrorMode, Timeout, (const unsigned char*)mapResource.pData); 135 | 136 | ctx->Unmap(ReadTexture, 0); 137 | 138 | switch (res) 139 | { 140 | case SharedImageMemory::SENDRES_TOOLARGE: return RET_ERROR_TOOLARGERESOLUTION; 141 | case SharedImageMemory::SENDRES_WARN_FRAMESKIP: return RET_WARNING_FRAMESKIP; 142 | } 143 | return RET_SUCCESS; 144 | } 145 | 146 | // If exported by a plugin, this function will be called when graphics device is created, destroyed, and before and after it is reset (ie, resolution changed). 147 | extern "C" void UNITY_INTERFACE_EXPORT UnitySetGraphicsDevice(void* device, int deviceType, int eventType) 148 | { 149 | if (eventType == kUnityGfxDeviceEventInitialize || eventType == kUnityGfxDeviceEventAfterReset) 150 | { 151 | g_GraphicsDeviceType = deviceType; 152 | if (deviceType == kUnityGfxRendererD3D11) g_D3D11GraphicsDevice = (ID3D11Device*)device; 153 | } 154 | else g_GraphicsDeviceType = -1; 155 | } 156 | -------------------------------------------------------------------------------- /Source/UnityCapturePlugin.sln: -------------------------------------------------------------------------------- 1 |  2 | Microsoft Visual Studio Solution File, Format Version 12.00 3 | # Visual Studio 2013 4 | VisualStudioVersion = 12.0.40629.0 5 | MinimumVisualStudioVersion = 10.0.40219.1 6 | Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "UnityCapturePlugin", "UnityCapturePlugin.vcxproj", "{727D3AC5-27B5-4288-A475-7A471ECD71B8}" 7 | EndProject 8 | Global 9 | GlobalSection(SolutionConfigurationPlatforms) = preSolution 10 | Debug|Win32 = Debug|Win32 11 | Debug|x64 = Debug|x64 12 | Release|Win32 = Release|Win32 13 | Release|x64 = Release|x64 14 | EndGlobalSection 15 | GlobalSection(ProjectConfigurationPlatforms) = postSolution 16 | {727D3AC5-27B5-4288-A475-7A471ECD71B8}.Debug|Win32.ActiveCfg = Debug|Win32 17 | {727D3AC5-27B5-4288-A475-7A471ECD71B8}.Debug|Win32.Build.0 = Debug|Win32 18 | {727D3AC5-27B5-4288-A475-7A471ECD71B8}.Debug|x64.ActiveCfg = Debug|x64 19 | {727D3AC5-27B5-4288-A475-7A471ECD71B8}.Debug|x64.Build.0 = Debug|x64 20 | {727D3AC5-27B5-4288-A475-7A471ECD71B8}.Release|Win32.ActiveCfg = Release|Win32 21 | {727D3AC5-27B5-4288-A475-7A471ECD71B8}.Release|Win32.Build.0 = Release|Win32 22 | {727D3AC5-27B5-4288-A475-7A471ECD71B8}.Release|x64.ActiveCfg = Release|x64 23 | {727D3AC5-27B5-4288-A475-7A471ECD71B8}.Release|x64.Build.0 = Release|x64 24 | EndGlobalSection 25 | GlobalSection(SolutionProperties) = preSolution 26 | HideSolutionNode = FALSE 27 | EndGlobalSection 28 | EndGlobal 29 | -------------------------------------------------------------------------------- /Source/UnityCapturePlugin.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 | UnityCapturePlugin 23 | UnityCapturePlugin 24 | {727D3AC5-27B5-4288-A475-7A471ECD71B8} 25 | 26 | 27 | 28 | DynamicLibrary 29 | v110_xp 30 | v120_xp 31 | v140 32 | v141 33 | false 34 | MultiByte 35 | true 36 | true 37 | 38 | 39 | 40 | 41 | 42 | 43 | Build\$(Configuration)-$(TargetName)64bit\ 44 | Build\$(Configuration)-$(TargetName)32bit\ 45 | $(OutDir) 46 | false 47 | true 48 | false 49 | $(ProgramW6432)\Unity\Editor\Unity.exe 50 | -projectPath "$(ProjectDir)..\UnityCaptureSample" 51 | WindowsLocalDebugger 52 | 53 | 54 | 55 | false 56 | Level3 57 | true 58 | false 59 | false 60 | 61 | 62 | Win32;_DEBUG;_WINDOWS;_USRDLL;%(PreprocessorDefinitions) 63 | Disabled 64 | EnableFastChecks 65 | MultiThreadedDebugDLL 66 | 67 | 68 | Win32;NDEBUG;_WINDOWS;_USRDLL;%(PreprocessorDefinitions) 69 | Full 70 | true 71 | MultiThreaded 72 | true 73 | true 74 | true 75 | Speed 76 | true 77 | AnySuitable 78 | false 79 | StreamingSIMDExtensions2 80 | /Gw %(AdditionalOptions) 81 | 82 | 83 | true 84 | true 85 | Windows 86 | false 87 | opengl32.lib;%(AdditionalDependencies) 88 | 89 | 90 | true 91 | true 92 | UseLinkTimeCodeGeneration 93 | true 94 | false 95 | 96 | 97 | 98 | SETLOCAL 99 | SET TARGET_PLUGIN_DIR=x86 100 | IF NOT "$(PlatformShortName)" == "x86" SET TARGET_PLUGIN_DIR=x86_64 101 | echo Copying output $(OutDir)$(TargetName) DLL and PDB to "$(SolutionDir)..\UnityCaptureSample\Assets\UnityCapture\Plugins\%TARGET_PLUGIN_DIR%\" 102 | mkdir "$(SolutionDir)..\UnityCaptureSample\Assets\UnityCapture\Plugins\%TARGET_PLUGIN_DIR%" 2>nul 103 | copy /Y "$(SolutionDir)$(OutDir)$(TargetName).dll" "$(SolutionDir)..\UnityCaptureSample\Assets\UnityCapture\Plugins\%TARGET_PLUGIN_DIR%\" 104 | copy /Y "$(SolutionDir)$(OutDir)$(TargetName).pdb" "$(SolutionDir)..\UnityCaptureSample\Assets\UnityCapture\Plugins\%TARGET_PLUGIN_DIR%\" 105 | ENDLOCAL 106 | 107 | 108 | 109 | 110 | 111 | 112 | 113 | 114 | 115 | 116 | -------------------------------------------------------------------------------- /Source/shared.inl: -------------------------------------------------------------------------------- 1 | /* 2 | Unity Capture 3 | Copyright (c) 2018 Bernhard Schelling 4 | 5 | Based on UnityCam 6 | https://github.com/mrayy/UnityCam 7 | Copyright (c) 2016 MHD Yamen Saraiji 8 | */ 9 | 10 | #define _HAS_EXCEPTIONS 0 11 | #define WIN32_LEAN_AND_MEAN 12 | #include 13 | #include 14 | #include 15 | 16 | #define MAX_SHARED_IMAGE_SIZE (3840 * 2160 * 4 * sizeof(short)) //4K (RGBA max 16bit per pixel) 17 | 18 | #if _DEBUG 19 | #define UCASSERT(cond) ((cond) ? ((void)0) : *(volatile int*)0 = 0xbad|(OutputDebugStringA("[FAILED ASSERT] " #cond "\n"),1)) 20 | #else 21 | #define UCASSERT(cond) ((void)0) 22 | #endif 23 | 24 | struct SharedImageMemory 25 | { 26 | SharedImageMemory(int32_t CapNum) 27 | { 28 | memset(this, 0, sizeof(*this)); 29 | m_CapNum = CapNum; 30 | } 31 | 32 | ~SharedImageMemory() 33 | { 34 | if (m_hMutex) CloseHandle(m_hMutex); 35 | if (m_hWantFrameEvent) CloseHandle(m_hWantFrameEvent); 36 | if (m_hSentFrameEvent) CloseHandle(m_hSentFrameEvent); 37 | if (m_hSharedFile) CloseHandle(m_hSharedFile); 38 | } 39 | 40 | int32_t GetCapNum() { return m_CapNum; } 41 | enum { MAX_CAPNUM = ('z' - '0') }; //see Open() for why this number 42 | enum { RECEIVE_MAX_WAIT = 200 }; //How many milliseconds to wait for new frame 43 | enum EFormat { FORMAT_UINT8, FORMAT_FP16_GAMMA, FORMAT_FP16_LINEAR }; 44 | enum EResizeMode { RESIZEMODE_DISABLED = 0, RESIZEMODE_LINEAR = 1 }; 45 | enum EMirrorMode { MIRRORMODE_DISABLED = 0, MIRRORMODE_HORIZONTALLY = 1 }; 46 | enum EReceiveResult { RECEIVERES_CAPTUREINACTIVE, RECEIVERES_NEWFRAME, RECEIVERES_OLDFRAME }; 47 | 48 | typedef void (*ReceiveCallbackFunc)(int width, int height, int stride, EFormat format, EResizeMode resizemode, EMirrorMode mirrormode, int timeout, uint8_t* buffer, void* callback_data); 49 | 50 | EReceiveResult Receive(ReceiveCallbackFunc callback, void* callback_data) 51 | { 52 | if (!Open(true) || !m_pSharedBuf->width) return RECEIVERES_CAPTUREINACTIVE; 53 | 54 | SetEvent(m_hWantFrameEvent); 55 | bool IsNewFrame = (WaitForSingleObject(m_hSentFrameEvent, RECEIVE_MAX_WAIT) == WAIT_OBJECT_0); 56 | 57 | WaitForSingleObject(m_hMutex, INFINITE); //lock mutex 58 | callback(m_pSharedBuf->width, m_pSharedBuf->height, m_pSharedBuf->stride, (EFormat)m_pSharedBuf->format, (EResizeMode)m_pSharedBuf->resizemode, (EMirrorMode)m_pSharedBuf->mirrormode, m_pSharedBuf->timeout, m_pSharedBuf->data, callback_data); 59 | ReleaseMutex(m_hMutex); //unlock mutex 60 | 61 | return (IsNewFrame ? RECEIVERES_NEWFRAME : RECEIVERES_OLDFRAME); 62 | } 63 | 64 | bool SendIsReady() 65 | { 66 | return Open(false); 67 | } 68 | 69 | enum ESendResult { SENDRES_TOOLARGE, SENDRES_WARN_FRAMESKIP, SENDRES_OK }; 70 | ESendResult Send(int width, int height, int stride, DWORD DataSize, EFormat format, EResizeMode resizemode, EMirrorMode mirrormode, int timeout, const uint8_t* buffer) 71 | { 72 | UCASSERT(buffer); 73 | UCASSERT(m_pSharedBuf); 74 | if (m_pSharedBuf->maxSize < DataSize) return SENDRES_TOOLARGE; 75 | 76 | WaitForSingleObject(m_hMutex, INFINITE); //lock mutex 77 | m_pSharedBuf->width = width; 78 | m_pSharedBuf->height = height; 79 | m_pSharedBuf->stride = stride; 80 | m_pSharedBuf->format = format; 81 | m_pSharedBuf->resizemode = resizemode; 82 | m_pSharedBuf->mirrormode = mirrormode; 83 | m_pSharedBuf->timeout = timeout; 84 | memcpy(m_pSharedBuf->data, buffer, DataSize); 85 | ReleaseMutex(m_hMutex); //unlock mutex 86 | 87 | SetEvent(m_hSentFrameEvent); 88 | bool DidSkipFrame = (WaitForSingleObject(m_hWantFrameEvent, 0) != WAIT_OBJECT_0); 89 | 90 | return (DidSkipFrame ? SENDRES_WARN_FRAMESKIP : SENDRES_OK); 91 | } 92 | 93 | private: 94 | bool Open(bool ForReceiving) 95 | { 96 | if (m_pSharedBuf) return true; //already open 97 | 98 | UCASSERT(m_CapNum <= MAX_CAPNUM); 99 | if (m_CapNum > MAX_CAPNUM) m_CapNum = MAX_CAPNUM; 100 | char CSCapNumChar = (m_CapNum ? '0' + m_CapNum : '\0'); //use NULL terminator for CapNum 0 to be compatible with old filter DLLs before multi cap 101 | char CS_NAME_MUTEX [] = "UnityCapture_Mutx0"; CS_NAME_MUTEX [sizeof(CS_NAME_MUTEX ) - 2] = CSCapNumChar; 102 | char CS_NAME_EVENT_WANT [] = "UnityCapture_Want0"; CS_NAME_EVENT_WANT [sizeof(CS_NAME_EVENT_WANT ) - 2] = CSCapNumChar; 103 | char CS_NAME_EVENT_SENT [] = "UnityCapture_Sent0"; CS_NAME_EVENT_SENT [sizeof(CS_NAME_EVENT_SENT ) - 2] = CSCapNumChar; 104 | char CS_NAME_SHARED_DATA[] = "UnityCapture_Data0"; CS_NAME_SHARED_DATA[sizeof(CS_NAME_SHARED_DATA) - 2] = CSCapNumChar; 105 | 106 | if (!m_hMutex) 107 | { 108 | if (ForReceiving) m_hMutex = CreateMutexA(NULL, FALSE, CS_NAME_MUTEX); 109 | else m_hMutex = OpenMutexA(SYNCHRONIZE, FALSE, CS_NAME_MUTEX); 110 | if (!m_hMutex) return false; 111 | } 112 | 113 | WaitForSingleObject(m_hMutex, INFINITE); //lock mutex 114 | struct UnlockAtReturn { ~UnlockAtReturn() { ReleaseMutex(m); }; HANDLE m; } cs = { m_hMutex }; 115 | 116 | if (!m_hWantFrameEvent) 117 | { 118 | if (ForReceiving) m_hWantFrameEvent = OpenEventA(EVENT_MODIFY_STATE, FALSE, CS_NAME_EVENT_WANT); 119 | else m_hWantFrameEvent = CreateEventA(NULL, FALSE, FALSE, CS_NAME_EVENT_WANT); 120 | if (!m_hWantFrameEvent) return false; 121 | } 122 | 123 | if (!m_hSentFrameEvent) 124 | { 125 | if (ForReceiving) m_hSentFrameEvent = CreateEventA(NULL, FALSE, FALSE, CS_NAME_EVENT_SENT); 126 | else m_hSentFrameEvent = OpenEventA(EVENT_MODIFY_STATE, FALSE, CS_NAME_EVENT_SENT); 127 | if (!m_hSentFrameEvent) return false; 128 | } 129 | 130 | if (!m_hSharedFile) 131 | { 132 | if (ForReceiving) m_hSharedFile = CreateFileMappingA(INVALID_HANDLE_VALUE, NULL, PAGE_READWRITE, NULL, sizeof(SharedMemHeader) + MAX_SHARED_IMAGE_SIZE, CS_NAME_SHARED_DATA); 133 | else m_hSharedFile = OpenFileMappingA(FILE_MAP_WRITE, FALSE, CS_NAME_SHARED_DATA); 134 | if (!m_hSharedFile) return false; 135 | } 136 | 137 | m_pSharedBuf = (SharedMemHeader*)MapViewOfFile(m_hSharedFile, FILE_MAP_WRITE, 0, 0, 0); 138 | if (!m_pSharedBuf) return false; 139 | 140 | if (ForReceiving && m_pSharedBuf->maxSize != MAX_SHARED_IMAGE_SIZE) 141 | m_pSharedBuf->maxSize = MAX_SHARED_IMAGE_SIZE; 142 | 143 | return true; 144 | } 145 | 146 | struct SharedMemHeader 147 | { 148 | DWORD maxSize; 149 | int width; 150 | int height; 151 | int stride; 152 | int format; 153 | int resizemode; 154 | int mirrormode; 155 | int timeout; 156 | uint8_t data[1]; 157 | }; 158 | 159 | int32_t m_CapNum; 160 | HANDLE m_hMutex; 161 | HANDLE m_hWantFrameEvent; 162 | HANDLE m_hSentFrameEvent; 163 | HANDLE m_hSharedFile; 164 | SharedMemHeader* m_pSharedBuf; 165 | }; 166 | -------------------------------------------------------------------------------- /UnityCaptureSample/.gitignore: -------------------------------------------------------------------------------- 1 | Library/* 2 | Temp/* 3 | Packages/* 4 | UnityPackageManager/* 5 | obj/* 6 | .vscode/* 7 | 8 | *.csproj 9 | *.sln 10 | *.suo 11 | -------------------------------------------------------------------------------- /UnityCaptureSample/Assets/CaptureTexture.cs: -------------------------------------------------------------------------------- 1 | /* 2 | This sample code is for demonstrating and testing the functionality 3 | of Unity Capture, and is placed in the public domain. 4 | 5 | This code generates a scrolling color texture simply for the purposes of demonstration. 6 | Other uses may include sending a video, another webcam feed or a static image to the output. 7 | */ 8 | 9 | using UnityEngine; 10 | 11 | public class CaptureTexture : MonoBehaviour 12 | { 13 | public int width = 320; 14 | public int height = 240; 15 | public MeshRenderer outputRenderer; 16 | Texture2D activeTex; 17 | UnityCapture.Interface captureInterface; 18 | int y = 0; 19 | Color color = Color.red; 20 | 21 | void Start() 22 | { 23 | // Create texture and capture interface 24 | activeTex = new Texture2D(width, height, TextureFormat.ARGB32, false); 25 | captureInterface = new UnityCapture.Interface(UnityCapture.ECaptureDevice.CaptureDevice1); 26 | 27 | if (outputRenderer != null) outputRenderer.material.mainTexture = activeTex; 28 | } 29 | 30 | void OnDestroy() 31 | { 32 | //Cleanup capture interface 33 | captureInterface.Close(); 34 | } 35 | 36 | void Update() 37 | { 38 | // Draw next line on texture 39 | for (int x = 0; x < width; x++) 40 | { 41 | activeTex.SetPixel(x, y, color); 42 | } 43 | 44 | y += 1; 45 | if (y > height) 46 | { 47 | y = 0; 48 | color = new Color(color.g, color.b, color.r); 49 | } 50 | 51 | activeTex.Apply(); 52 | 53 | // Update the capture texture 54 | UnityCapture.ECaptureSendResult result = captureInterface.SendTexture(activeTex); 55 | if (result != UnityCapture.ECaptureSendResult.SUCCESS) 56 | Debug.Log("SendTexture failed: " + result); 57 | } 58 | } 59 | -------------------------------------------------------------------------------- /UnityCaptureSample/Assets/CaptureTexture.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: c8e68187542b37846b4a604d28bd90e1 3 | timeCreated: 1536559205 4 | licenseType: Free 5 | MonoImporter: 6 | externalObjects: {} 7 | serializedVersion: 2 8 | defaultReferences: [] 9 | executionOrder: 0 10 | icon: {instanceID: 0} 11 | userData: 12 | assetBundleName: 13 | assetBundleVariant: 14 | -------------------------------------------------------------------------------- /UnityCaptureSample/Assets/CubesSwayBeeps.cs: -------------------------------------------------------------------------------- 1 | /* 2 | This sample code is for demonstrating and testing the functionality 3 | of Unity Capture, and is placed in the public domain. 4 | */ 5 | 6 | using UnityEngine; 7 | 8 | public class CubesSwayBeeps : MonoBehaviour 9 | { 10 | public float RotationAmount = 6f, RotationSpeedX = 2.5f, RotationSpeedY = 1.75f; 11 | public int CubeCount = 10; 12 | public Material CubeMaterial = null; 13 | public bool EnableSyncBeeps = true; 14 | public float BeepDuration = 1/60f*3; 15 | public Color[] PerFrameBackgroundColors = new Color[] { Color.gray }; 16 | 17 | Camera CameraComp; 18 | Transform[] CubeTransforms; 19 | Vector3[] CubeSpeeds; 20 | ulong AudioPosition; 21 | float AudioStartTime; 22 | 23 | void Start() 24 | { 25 | CameraComp = GetComponent(); 26 | 27 | int TotalCubeCount = CubeCount*CubeCount*CubeCount; 28 | CubeTransforms = new Transform[TotalCubeCount]; 29 | CubeSpeeds = new Vector3[TotalCubeCount]; 30 | GameObject CubeHolder = new GameObject("CubeHolder"); 31 | for (int i = 0; i < TotalCubeCount; i++) 32 | { 33 | int x = (i / (CubeCount * CubeCount)), y = ((i / CubeCount) % CubeCount), z = (i % CubeCount); 34 | GameObject o = GameObject.CreatePrimitive(PrimitiveType.Cube); 35 | o.transform.parent = CubeHolder.transform; 36 | o.transform.position = new Vector3(5 * (x - CubeCount / 2), 5 * (y - CubeCount / 2), 5 * (z - CubeCount / 2)); 37 | if (CubeMaterial != null) o.GetComponent().material = CubeMaterial; 38 | CubeTransforms[i] = o.transform; 39 | CubeSpeeds[i] = Random.insideUnitSphere * 50; 40 | } 41 | 42 | if (EnableSyncBeeps) 43 | { 44 | AudioClip myClip = AudioClip.Create("AudioBeeps", 44100/60, 1, 44100, true, OnAudioRead); 45 | AudioSource aud = gameObject.AddComponent(); 46 | aud.clip = myClip; 47 | aud.loop = true; 48 | AudioPosition = 0; 49 | AudioStartTime = Time.realtimeSinceStartup; 50 | aud.Play(); 51 | } 52 | } 53 | 54 | void OnAudioRead(float[] data) 55 | { 56 | const float SineSpeed = 440f * Mathf.PI * 2f / 44100f; //440hz beeps 57 | for (int count = 0; count < data.Length; AudioPosition++, count++) 58 | { 59 | bool SoundDoBeep = ((AudioPosition % 44100) < (44100*BeepDuration)); //beep for 1 second 60 | data[count] = Mathf.Sign(Mathf.Sin(SineSpeed * AudioPosition)) * (SoundDoBeep ? 1f : 0f); 61 | } 62 | } 63 | 64 | void Update() 65 | { 66 | transform.localRotation = Quaternion.Euler(new Vector3(Mathf.Cos(Time.time * RotationSpeedX), Mathf.Sin(Time.time * RotationSpeedY)) * RotationAmount); 67 | 68 | for (int i = 0; i < CubeTransforms.Length; i++) 69 | { 70 | CubeTransforms[i].rotation = Quaternion.Euler(CubeSpeeds[i] * Time.time); 71 | } 72 | 73 | CameraComp.backgroundColor = PerFrameBackgroundColors[Time.frameCount % PerFrameBackgroundColors.Length]; 74 | 75 | if (EnableSyncBeeps) 76 | { 77 | bool SoundDoBeep = (((Time.realtimeSinceStartup - AudioStartTime) % 1.0f) < BeepDuration); 78 | if (SoundDoBeep) CameraComp.backgroundColor = Color.red; 79 | } 80 | } 81 | 82 | void OnGUI() 83 | { 84 | GUI.Box(new Rect(20, 20, 250, 25), "Drawing in OnGUI is not captured"); 85 | } 86 | } 87 | -------------------------------------------------------------------------------- /UnityCaptureSample/Assets/CubesSwayBeeps.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 70cec3f0490dff14fbf273abb6a3a72d 3 | timeCreated: 1461153401 4 | licenseType: Free 5 | MonoImporter: 6 | serializedVersion: 2 7 | defaultReferences: [] 8 | executionOrder: 0 9 | icon: {instanceID: 0} 10 | userData: 11 | assetBundleName: 12 | assetBundleVariant: 13 | -------------------------------------------------------------------------------- /UnityCaptureSample/Assets/MultiCam.cs: -------------------------------------------------------------------------------- 1 | /* 2 | This sample code is for demonstrating and testing the functionality 3 | of Unity Capture, and is placed in the public domain. 4 | */ 5 | 6 | using UnityEngine; 7 | 8 | public class MultiCam : MonoBehaviour 9 | { 10 | public int CaptureResolutionWidth = 1920, CaptureResolutionHeight = 1080; 11 | public Camera CaptureCamera1, CaptureCamera2; 12 | 13 | void Awake() 14 | { 15 | Camera RenderToScreenCamera = gameObject.GetComponent(); 16 | if (RenderToScreenCamera == null) gameObject.AddComponent(); 17 | RenderToScreenCamera.clearFlags = CameraClearFlags.Nothing; 18 | RenderToScreenCamera.cullingMask = 0; 19 | RenderToScreenCamera.depth = 100; 20 | RenderToScreenCamera.useOcclusionCulling = false; 21 | RenderToScreenCamera.allowHDR = false; 22 | RenderToScreenCamera.allowMSAA = false; 23 | RenderToScreenCamera.allowDynamicResolution = false; 24 | RenderToScreenCamera.stereoTargetEye = StereoTargetEyeMask.None; 25 | CaptureCamera1.targetTexture = new RenderTexture(CaptureResolutionWidth, CaptureResolutionHeight, 24); 26 | CaptureCamera2.targetTexture = new RenderTexture(CaptureResolutionWidth, CaptureResolutionHeight, 24); 27 | } 28 | 29 | void OnPostRender() 30 | { 31 | float w = Screen.width, whalf = w/2, h = Screen.height; 32 | GL.PushMatrix(); 33 | GL.LoadPixelMatrix(); 34 | Graphics.DrawTexture(new Rect( 0, h, whalf, -h), CaptureCamera1.targetTexture); 35 | Graphics.DrawTexture(new Rect(whalf, h, whalf, -h), CaptureCamera2.targetTexture); 36 | GL.PopMatrix(); 37 | } 38 | } 39 | -------------------------------------------------------------------------------- /UnityCaptureSample/Assets/MultiCam.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: f7196fa938037bb46be5bc12531f7f10 3 | timeCreated: 1530683132 4 | licenseType: Free 5 | MonoImporter: 6 | externalObjects: {} 7 | serializedVersion: 2 8 | defaultReferences: [] 9 | executionOrder: 0 10 | icon: {instanceID: 0} 11 | userData: 12 | assetBundleName: 13 | assetBundleVariant: 14 | -------------------------------------------------------------------------------- /UnityCaptureSample/Assets/UnityCapture.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 64daacfb1be37bb4085e1ff8a9b4cceb 3 | folderAsset: yes 4 | timeCreated: 1519955760 5 | licenseType: Free 6 | DefaultImporter: 7 | externalObjects: {} 8 | userData: 9 | assetBundleName: 10 | assetBundleVariant: 11 | -------------------------------------------------------------------------------- /UnityCaptureSample/Assets/UnityCapture/Plugins.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: f452a138547dbb34b9edfa5d6695c929 3 | folderAsset: yes 4 | timeCreated: 1519955869 5 | licenseType: Free 6 | DefaultImporter: 7 | externalObjects: {} 8 | userData: 9 | assetBundleName: 10 | assetBundleVariant: 11 | -------------------------------------------------------------------------------- /UnityCaptureSample/Assets/UnityCapture/Plugins/x86.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 9cd051131b4a37240be23bed28adaa6a 3 | folderAsset: yes 4 | timeCreated: 1519954762 5 | licenseType: Free 6 | DefaultImporter: 7 | externalObjects: {} 8 | userData: 9 | assetBundleName: 10 | assetBundleVariant: 11 | -------------------------------------------------------------------------------- /UnityCaptureSample/Assets/UnityCapture/Plugins/x86/UnityCapturePlugin.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/schellingb/UnityCapture/3ed54c325e0ad71afcf4f246c07e5e17b3d7f2d2/UnityCaptureSample/Assets/UnityCapture/Plugins/x86/UnityCapturePlugin.dll -------------------------------------------------------------------------------- /UnityCaptureSample/Assets/UnityCapture/Plugins/x86/UnityCapturePlugin.dll.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 27f4f8798f88ca0459e783408e6846a1 3 | timeCreated: 1519954762 4 | licenseType: Free 5 | PluginImporter: 6 | externalObjects: {} 7 | serializedVersion: 2 8 | iconMap: {} 9 | executionOrder: {} 10 | isPreloaded: 0 11 | isOverridable: 0 12 | platformData: 13 | - first: 14 | '': OSXIntel 15 | second: 16 | enabled: 1 17 | settings: 18 | CPU: AnyCPU 19 | - first: 20 | '': OSXIntel64 21 | second: 22 | enabled: 0 23 | settings: 24 | CPU: None 25 | - first: 26 | Any: 27 | second: 28 | enabled: 1 29 | settings: {} 30 | - first: 31 | Editor: Editor 32 | second: 33 | enabled: 0 34 | settings: 35 | CPU: x86 36 | DefaultValueInitialized: true 37 | - first: 38 | Facebook: Win 39 | second: 40 | enabled: 1 41 | settings: 42 | CPU: AnyCPU 43 | - first: 44 | Facebook: Win64 45 | second: 46 | enabled: 0 47 | settings: 48 | CPU: None 49 | - first: 50 | Standalone: Linux 51 | second: 52 | enabled: 1 53 | settings: 54 | CPU: x86 55 | - first: 56 | Standalone: Linux64 57 | second: 58 | enabled: 0 59 | settings: 60 | CPU: None 61 | - first: 62 | Standalone: LinuxUniversal 63 | second: 64 | enabled: 1 65 | settings: 66 | CPU: x86 67 | - first: 68 | Standalone: OSXUniversal 69 | second: 70 | enabled: 0 71 | settings: 72 | CPU: x86 73 | - first: 74 | Standalone: Win 75 | second: 76 | enabled: 1 77 | settings: 78 | CPU: AnyCPU 79 | - first: 80 | Standalone: Win64 81 | second: 82 | enabled: 0 83 | settings: 84 | CPU: None 85 | userData: 86 | assetBundleName: 87 | assetBundleVariant: 88 | -------------------------------------------------------------------------------- /UnityCaptureSample/Assets/UnityCapture/Plugins/x86_64.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: c2dd877191f53794b810d198e4f4ac67 3 | folderAsset: yes 4 | timeCreated: 1460524653 5 | licenseType: Free 6 | DefaultImporter: 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /UnityCaptureSample/Assets/UnityCapture/Plugins/x86_64/UnityCapturePlugin.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/schellingb/UnityCapture/3ed54c325e0ad71afcf4f246c07e5e17b3d7f2d2/UnityCaptureSample/Assets/UnityCapture/Plugins/x86_64/UnityCapturePlugin.dll -------------------------------------------------------------------------------- /UnityCaptureSample/Assets/UnityCapture/Plugins/x86_64/UnityCapturePlugin.dll.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: ec414908dccab334fb32e19ccf8879bd 3 | timeCreated: 1519867776 4 | licenseType: Free 5 | PluginImporter: 6 | externalObjects: {} 7 | serializedVersion: 2 8 | iconMap: {} 9 | executionOrder: {} 10 | isPreloaded: 0 11 | isOverridable: 0 12 | platformData: 13 | - first: 14 | '': OSXIntel 15 | second: 16 | enabled: 0 17 | settings: 18 | CPU: None 19 | - first: 20 | '': OSXIntel64 21 | second: 22 | enabled: 1 23 | settings: 24 | CPU: AnyCPU 25 | - first: 26 | Any: 27 | second: 28 | enabled: 1 29 | settings: {} 30 | - first: 31 | Editor: Editor 32 | second: 33 | enabled: 0 34 | settings: 35 | CPU: x86_64 36 | DefaultValueInitialized: true 37 | - first: 38 | Facebook: Win 39 | second: 40 | enabled: 0 41 | settings: 42 | CPU: None 43 | - first: 44 | Facebook: Win64 45 | second: 46 | enabled: 1 47 | settings: 48 | CPU: AnyCPU 49 | - first: 50 | Standalone: Linux 51 | second: 52 | enabled: 0 53 | settings: 54 | CPU: None 55 | - first: 56 | Standalone: Linux64 57 | second: 58 | enabled: 1 59 | settings: 60 | CPU: x86_64 61 | - first: 62 | Standalone: LinuxUniversal 63 | second: 64 | enabled: 1 65 | settings: 66 | CPU: x86_64 67 | - first: 68 | Standalone: OSXUniversal 69 | second: 70 | enabled: 0 71 | settings: 72 | CPU: x86_64 73 | - first: 74 | Standalone: Win 75 | second: 76 | enabled: 0 77 | settings: 78 | CPU: None 79 | - first: 80 | Standalone: Win64 81 | second: 82 | enabled: 1 83 | settings: 84 | CPU: AnyCPU 85 | userData: 86 | assetBundleName: 87 | assetBundleVariant: 88 | -------------------------------------------------------------------------------- /UnityCaptureSample/Assets/UnityCapture/UnityCapture.cs: -------------------------------------------------------------------------------- 1 | /* 2 | Unity Capture 3 | Copyright (c) 2018 Bernhard Schelling 4 | 5 | Feature contributors: 6 | Brandon J Matthews (low-level interface for custom texture capture) 7 | 8 | Based on UnityCam 9 | https://github.com/mrayy/UnityCam 10 | Copyright (c) 2016 MHD Yamen Saraiji 11 | 12 | This software is provided 'as-is', without any express or implied 13 | warranty. In no event will the authors be held liable for any damages 14 | arising from the use of this software. 15 | 16 | Permission is granted to anyone to use this software for any purpose, 17 | including commercial applications, and to alter it and redistribute it 18 | freely, subject to the following restrictions: 19 | 20 | 1. The origin of this software must not be misrepresented; you must not 21 | claim that you wrote the original software. If you use this software 22 | in a product, an acknowledgment in the product documentation would be 23 | appreciated but is not required. 24 | 2. Altered source versions must be plainly marked as such, and must not be 25 | misrepresented as being the original software. 26 | 3. This notice may not be removed or altered from any source distribution. 27 | */ 28 | 29 | using UnityEngine; 30 | 31 | [RequireComponent(typeof(Camera))] 32 | public class UnityCapture : MonoBehaviour 33 | { 34 | public enum ECaptureDevice { CaptureDevice1 = 0, CaptureDevice2 = 1, CaptureDevice3 = 2, CaptureDevice4 = 3, CaptureDevice5 = 4, CaptureDevice6 = 5, CaptureDevice7 = 6, CaptureDevice8 = 7, CaptureDevice9 = 8, CaptureDevice10 = 9 } 35 | public enum EResizeMode { Disabled = 0, LinearResize = 1 } 36 | public enum EMirrorMode { Disabled = 0, MirrorHorizontally = 1 } 37 | public enum ECaptureSendResult { SUCCESS = 0, WARNING_FRAMESKIP = 1, WARNING_CAPTUREINACTIVE = 2, ERROR_UNSUPPORTEDGRAPHICSDEVICE = 100, ERROR_PARAMETER = 101, ERROR_TOOLARGERESOLUTION = 102, ERROR_TEXTUREFORMAT = 103, ERROR_READTEXTURE = 104, ERROR_INVALIDCAPTUREINSTANCEPTR = 200 }; 38 | 39 | [SerializeField] [Tooltip("Capture device index")] public ECaptureDevice CaptureDevice = ECaptureDevice.CaptureDevice1; 40 | [SerializeField] [Tooltip("Scale image if Unity and capture resolution don't match (can introduce frame dropping, not recommended)")] public EResizeMode ResizeMode = EResizeMode.Disabled; 41 | [SerializeField] [Tooltip("How many milliseconds to wait for a new frame until sending is considered to be stopped")] public int Timeout = 1000; 42 | [SerializeField] [Tooltip("Mirror captured output image")] public EMirrorMode MirrorMode = EMirrorMode.Disabled; 43 | [SerializeField] [Tooltip("Introduce a frame of latency in favor of frame rate")] public bool DoubleBuffering = false; 44 | [SerializeField] [Tooltip("Check to enable VSync during capturing")] public bool EnableVSync = false; 45 | [SerializeField] [Tooltip("Set the desired render target frame rate")] public int TargetFrameRate = 60; 46 | [SerializeField] [Tooltip("Check to disable output of warnings")] public bool HideWarnings = false; 47 | 48 | Interface CaptureInterface; 49 | 50 | void Awake() 51 | { 52 | QualitySettings.vSyncCount = (EnableVSync ? 1 : 0); 53 | Application.targetFrameRate = TargetFrameRate; 54 | 55 | if (Application.runInBackground == false) 56 | { 57 | Debug.LogWarning("Application.runInBackground switched to enabled for capture streaming"); 58 | Application.runInBackground = true; 59 | } 60 | } 61 | 62 | void Start() 63 | { 64 | CaptureInterface = new Interface(CaptureDevice); 65 | } 66 | 67 | void OnDestroy() 68 | { 69 | CaptureInterface.Close(); 70 | } 71 | 72 | void OnRenderImage(RenderTexture source, RenderTexture destination) 73 | { 74 | Graphics.Blit(source, destination); 75 | switch (CaptureInterface.SendTexture(source, Timeout, DoubleBuffering, ResizeMode, MirrorMode)) 76 | { 77 | case ECaptureSendResult.SUCCESS: break; 78 | case ECaptureSendResult.WARNING_FRAMESKIP: if (!HideWarnings) Debug.LogWarning("[UnityCapture] Capture device did skip a frame read, capture frame rate will not match render frame rate."); break; 79 | case ECaptureSendResult.WARNING_CAPTUREINACTIVE: if (!HideWarnings) Debug.LogWarning("[UnityCapture] Capture device is inactive"); break; 80 | case ECaptureSendResult.ERROR_UNSUPPORTEDGRAPHICSDEVICE: Debug.LogError("[UnityCapture] Unsupported graphics device (only D3D11 supported)"); break; 81 | case ECaptureSendResult.ERROR_PARAMETER: Debug.LogError("[UnityCapture] Input parameter error"); break; 82 | case ECaptureSendResult.ERROR_TOOLARGERESOLUTION: Debug.LogError("[UnityCapture] Render resolution is too large to send to capture device"); break; 83 | case ECaptureSendResult.ERROR_TEXTUREFORMAT: Debug.LogError("[UnityCapture] Render texture format is unsupported (only basic non-HDR (ARGB32) and HDR (FP16/ARGB Half) formats are supported)"); break; 84 | case ECaptureSendResult.ERROR_READTEXTURE: Debug.LogError("[UnityCapture] Error while reading texture image data"); break; 85 | case ECaptureSendResult.ERROR_INVALIDCAPTUREINSTANCEPTR: Debug.LogError("[UnityCapture] Invalid Capture Instance Pointer"); break; 86 | } 87 | } 88 | 89 | public class Interface 90 | { 91 | [System.Runtime.InteropServices.DllImport("UnityCapturePlugin")] extern static System.IntPtr CaptureCreateInstance(int CapNum); 92 | [System.Runtime.InteropServices.DllImport("UnityCapturePlugin")] extern static void CaptureDeleteInstance(System.IntPtr instance); 93 | [System.Runtime.InteropServices.DllImport("UnityCapturePlugin")] extern static ECaptureSendResult CaptureSendTexture(System.IntPtr instance, System.IntPtr nativetexture, int Timeout, bool UseDoubleBuffering, EResizeMode ResizeMode, EMirrorMode MirrorMode, bool IsLinearColorSpace); 94 | System.IntPtr CaptureInstance; 95 | 96 | public Interface(ECaptureDevice CaptureDevice) 97 | { 98 | CaptureInstance = CaptureCreateInstance((int)CaptureDevice); 99 | } 100 | 101 | ~Interface() 102 | { 103 | Close(); 104 | } 105 | 106 | public void Close() 107 | { 108 | if (CaptureInstance != System.IntPtr.Zero) CaptureDeleteInstance(CaptureInstance); 109 | CaptureInstance = System.IntPtr.Zero; 110 | } 111 | 112 | public ECaptureSendResult SendTexture(Texture Source, int Timeout = 1000, bool DoubleBuffering = false, EResizeMode ResizeMode = EResizeMode.Disabled, EMirrorMode MirrorMode = EMirrorMode.Disabled) 113 | { 114 | if (CaptureInstance == System.IntPtr.Zero) return ECaptureSendResult.ERROR_INVALIDCAPTUREINSTANCEPTR; 115 | return CaptureSendTexture(CaptureInstance, Source.GetNativeTexturePtr(), Timeout, DoubleBuffering, ResizeMode, MirrorMode, QualitySettings.activeColorSpace == ColorSpace.Linear); 116 | } 117 | } 118 | } 119 | -------------------------------------------------------------------------------- /UnityCaptureSample/Assets/UnityCapture/UnityCapture.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 5f1106d3744ef824496276c8274506b2 3 | timeCreated: 1463481058 4 | licenseType: Free 5 | MonoImporter: 6 | serializedVersion: 2 7 | defaultReferences: [] 8 | executionOrder: 0 9 | icon: {instanceID: 0} 10 | userData: 11 | assetBundleName: 12 | assetBundleVariant: 13 | -------------------------------------------------------------------------------- /UnityCaptureSample/Assets/UnityCaptureExample.unity: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!29 &1 4 | OcclusionCullingSettings: 5 | m_ObjectHideFlags: 0 6 | serializedVersion: 2 7 | m_OcclusionBakeSettings: 8 | smallestOccluder: 5 9 | smallestHole: 0.25 10 | backfaceThreshold: 100 11 | m_SceneGUID: 00000000000000000000000000000000 12 | m_OcclusionCullingData: {fileID: 0} 13 | --- !u!104 &2 14 | RenderSettings: 15 | m_ObjectHideFlags: 0 16 | serializedVersion: 8 17 | m_Fog: 0 18 | m_FogColor: {r: 0.5, g: 0.5, b: 0.5, a: 1} 19 | m_FogMode: 3 20 | m_FogDensity: 0.01 21 | m_LinearFogStart: 0 22 | m_LinearFogEnd: 300 23 | m_AmbientSkyColor: {r: 0.212, g: 0.227, b: 0.259, a: 1} 24 | m_AmbientEquatorColor: {r: 0.114, g: 0.125, b: 0.133, a: 1} 25 | m_AmbientGroundColor: {r: 0.047, g: 0.043, b: 0.035, a: 1} 26 | m_AmbientIntensity: 1 27 | m_AmbientMode: 0 28 | m_SubtractiveShadowColor: {r: 0.42, g: 0.478, b: 0.627, a: 1} 29 | m_SkyboxMaterial: {fileID: 10304, guid: 0000000000000000f000000000000000, type: 0} 30 | m_HaloStrength: 0.5 31 | m_FlareStrength: 1 32 | m_FlareFadeSpeed: 3 33 | m_HaloTexture: {fileID: 0} 34 | m_SpotCookie: {fileID: 10001, guid: 0000000000000000e000000000000000, type: 0} 35 | m_DefaultReflectionMode: 0 36 | m_DefaultReflectionResolution: 128 37 | m_ReflectionBounces: 1 38 | m_ReflectionIntensity: 1 39 | m_CustomReflection: {fileID: 0} 40 | m_Sun: {fileID: 0} 41 | m_IndirectSpecularColor: {r: 0.44657898, g: 0.4964133, b: 0.5748178, a: 1} 42 | --- !u!157 &3 43 | LightmapSettings: 44 | m_ObjectHideFlags: 0 45 | serializedVersion: 11 46 | m_GIWorkflowMode: 0 47 | m_GISettings: 48 | serializedVersion: 2 49 | m_BounceScale: 1 50 | m_IndirectOutputScale: 1 51 | m_AlbedoBoost: 1 52 | m_TemporalCoherenceThreshold: 1 53 | m_EnvironmentLightingMode: 0 54 | m_EnableBakedLightmaps: 1 55 | m_EnableRealtimeLightmaps: 1 56 | m_LightmapEditorSettings: 57 | serializedVersion: 9 58 | m_Resolution: 2 59 | m_BakeResolution: 40 60 | m_TextureWidth: 1024 61 | m_TextureHeight: 1024 62 | m_AO: 0 63 | m_AOMaxDistance: 1 64 | m_CompAOExponent: 0 65 | m_CompAOExponentDirect: 0 66 | m_Padding: 2 67 | m_LightmapParameters: {fileID: 0} 68 | m_LightmapsBakeMode: 1 69 | m_TextureCompression: 1 70 | m_FinalGather: 0 71 | m_FinalGatherFiltering: 1 72 | m_FinalGatherRayCount: 1024 73 | m_ReflectionCompression: 2 74 | m_MixedBakeMode: 1 75 | m_BakeBackend: 0 76 | m_PVRSampling: 1 77 | m_PVRDirectSampleCount: 32 78 | m_PVRSampleCount: 500 79 | m_PVRBounces: 2 80 | m_PVRFilterTypeDirect: 0 81 | m_PVRFilterTypeIndirect: 0 82 | m_PVRFilterTypeAO: 0 83 | m_PVRFilteringMode: 0 84 | m_PVRCulling: 1 85 | m_PVRFilteringGaussRadiusDirect: 1 86 | m_PVRFilteringGaussRadiusIndirect: 5 87 | m_PVRFilteringGaussRadiusAO: 2 88 | m_PVRFilteringAtrousPositionSigmaDirect: 0.5 89 | m_PVRFilteringAtrousPositionSigmaIndirect: 2 90 | m_PVRFilteringAtrousPositionSigmaAO: 1 91 | m_ShowResolutionOverlay: 1 92 | m_LightingDataAsset: {fileID: 0} 93 | m_UseShadowmask: 0 94 | --- !u!196 &4 95 | NavMeshSettings: 96 | serializedVersion: 2 97 | m_ObjectHideFlags: 0 98 | m_BuildSettings: 99 | serializedVersion: 2 100 | agentTypeID: 0 101 | agentRadius: 0.5 102 | agentHeight: 2 103 | agentSlope: 45 104 | agentClimb: 0.4 105 | ledgeDropHeight: 0 106 | maxJumpAcrossDistance: 0 107 | minRegionArea: 2 108 | manualCellSize: 0 109 | cellSize: 0.16666667 110 | manualTileSize: 0 111 | tileSize: 256 112 | accuratePlacement: 0 113 | debug: 114 | m_Flags: 0 115 | m_NavMeshData: {fileID: 0} 116 | --- !u!1 &1126630849 117 | GameObject: 118 | m_ObjectHideFlags: 0 119 | m_PrefabParentObject: {fileID: 0} 120 | m_PrefabInternal: {fileID: 0} 121 | serializedVersion: 5 122 | m_Component: 123 | - component: {fileID: 1126630855} 124 | - component: {fileID: 1126630854} 125 | - component: {fileID: 1126630853} 126 | - component: {fileID: 1126630851} 127 | - component: {fileID: 1126630852} 128 | - component: {fileID: 1126630850} 129 | m_Layer: 0 130 | m_Name: Camera 131 | m_TagString: Untagged 132 | m_Icon: {fileID: 0} 133 | m_NavMeshLayer: 0 134 | m_StaticEditorFlags: 0 135 | m_IsActive: 1 136 | --- !u!114 &1126630850 137 | MonoBehaviour: 138 | m_ObjectHideFlags: 0 139 | m_PrefabParentObject: {fileID: 0} 140 | m_PrefabInternal: {fileID: 0} 141 | m_GameObject: {fileID: 1126630849} 142 | m_Enabled: 1 143 | m_EditorHideFlags: 0 144 | m_Script: {fileID: 11500000, guid: 5f1106d3744ef824496276c8274506b2, type: 3} 145 | m_Name: 146 | m_EditorClassIdentifier: 147 | ResizeMode: 0 148 | MirrorMode: 0 149 | --- !u!81 &1126630851 150 | AudioListener: 151 | m_ObjectHideFlags: 0 152 | m_PrefabParentObject: {fileID: 0} 153 | m_PrefabInternal: {fileID: 0} 154 | m_GameObject: {fileID: 1126630849} 155 | m_Enabled: 1 156 | --- !u!114 &1126630852 157 | MonoBehaviour: 158 | m_ObjectHideFlags: 0 159 | m_PrefabParentObject: {fileID: 0} 160 | m_PrefabInternal: {fileID: 0} 161 | m_GameObject: {fileID: 1126630849} 162 | m_Enabled: 1 163 | m_EditorHideFlags: 0 164 | m_Script: {fileID: 11500000, guid: 70cec3f0490dff14fbf273abb6a3a72d, type: 3} 165 | m_Name: 166 | m_EditorClassIdentifier: 167 | CubeMaterial: {fileID: 10303, guid: 0000000000000000f000000000000000, type: 0} 168 | EnableSyncBeeps: false 169 | --- !u!124 &1126630853 170 | Behaviour: 171 | m_ObjectHideFlags: 0 172 | m_PrefabParentObject: {fileID: 0} 173 | m_PrefabInternal: {fileID: 0} 174 | m_GameObject: {fileID: 1126630849} 175 | m_Enabled: 1 176 | --- !u!20 &1126630854 177 | Camera: 178 | m_ObjectHideFlags: 0 179 | m_PrefabParentObject: {fileID: 0} 180 | m_PrefabInternal: {fileID: 0} 181 | m_GameObject: {fileID: 1126630849} 182 | m_Enabled: 1 183 | serializedVersion: 2 184 | m_ClearFlags: 2 185 | m_BackGroundColor: {r: 0.19215687, g: 0.3019608, b: 0.4745098, a: 0} 186 | m_NormalizedViewPortRect: 187 | serializedVersion: 2 188 | x: 0 189 | y: 0 190 | width: 1 191 | height: 1 192 | near clip plane: 0.3 193 | far clip plane: 1000 194 | field of view: 60 195 | orthographic: 0 196 | orthographic size: 5 197 | m_Depth: 0 198 | m_CullingMask: 199 | serializedVersion: 2 200 | m_Bits: 4294967295 201 | m_RenderingPath: -1 202 | m_TargetTexture: {fileID: 0} 203 | m_TargetDisplay: 0 204 | m_TargetEye: 3 205 | m_HDR: 0 206 | m_AllowMSAA: 1 207 | m_AllowDynamicResolution: 0 208 | m_ForceIntoRT: 0 209 | m_OcclusionCulling: 1 210 | m_StereoConvergence: 10 211 | m_StereoSeparation: 0.022 212 | --- !u!4 &1126630855 213 | Transform: 214 | m_ObjectHideFlags: 0 215 | m_PrefabParentObject: {fileID: 0} 216 | m_PrefabInternal: {fileID: 0} 217 | m_GameObject: {fileID: 1126630849} 218 | m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} 219 | m_LocalPosition: {x: -6.91, y: -2.4, z: 0} 220 | m_LocalScale: {x: 1, y: 1, z: 1} 221 | m_Children: [] 222 | m_Father: {fileID: 0} 223 | m_RootOrder: 1 224 | m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} 225 | --- !u!1 &1251162945 226 | GameObject: 227 | m_ObjectHideFlags: 0 228 | m_PrefabParentObject: {fileID: 0} 229 | m_PrefabInternal: {fileID: 0} 230 | serializedVersion: 5 231 | m_Component: 232 | - component: {fileID: 1251162947} 233 | - component: {fileID: 1251162946} 234 | m_Layer: 0 235 | m_Name: Directional Light 236 | m_TagString: Untagged 237 | m_Icon: {fileID: 0} 238 | m_NavMeshLayer: 0 239 | m_StaticEditorFlags: 0 240 | m_IsActive: 1 241 | --- !u!108 &1251162946 242 | Light: 243 | m_ObjectHideFlags: 0 244 | m_PrefabParentObject: {fileID: 0} 245 | m_PrefabInternal: {fileID: 0} 246 | m_GameObject: {fileID: 1251162945} 247 | m_Enabled: 1 248 | serializedVersion: 8 249 | m_Type: 1 250 | m_Color: {r: 1, g: 0.95686275, b: 0.8392157, a: 1} 251 | m_Intensity: 1 252 | m_Range: 10 253 | m_SpotAngle: 30 254 | m_CookieSize: 10 255 | m_Shadows: 256 | m_Type: 2 257 | m_Resolution: -1 258 | m_CustomResolution: -1 259 | m_Strength: 1 260 | m_Bias: 0.05 261 | m_NormalBias: 0.4 262 | m_NearPlane: 0.2 263 | m_Cookie: {fileID: 0} 264 | m_DrawHalo: 0 265 | m_Flare: {fileID: 0} 266 | m_RenderMode: 0 267 | m_CullingMask: 268 | serializedVersion: 2 269 | m_Bits: 4294967295 270 | m_Lightmapping: 4 271 | m_AreaSize: {x: 1, y: 1} 272 | m_BounceIntensity: 1 273 | m_ColorTemperature: 6570 274 | m_UseColorTemperature: 0 275 | m_ShadowRadius: 0 276 | m_ShadowAngle: 0 277 | --- !u!4 &1251162947 278 | Transform: 279 | m_ObjectHideFlags: 0 280 | m_PrefabParentObject: {fileID: 0} 281 | m_PrefabInternal: {fileID: 0} 282 | m_GameObject: {fileID: 1251162945} 283 | m_LocalRotation: {x: 0.40821797, y: -0.23456974, z: 0.10938168, w: 0.8754261} 284 | m_LocalPosition: {x: 0, y: 3, z: 0} 285 | m_LocalScale: {x: 1, y: 1, z: 1} 286 | m_Children: [] 287 | m_Father: {fileID: 0} 288 | m_RootOrder: 0 289 | m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} 290 | -------------------------------------------------------------------------------- /UnityCaptureSample/Assets/UnityCaptureExample.unity.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 91da01314302a514aa3176f8a4ad8536 3 | timeCreated: 1463485542 4 | licenseType: Free 5 | DefaultImporter: 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /UnityCaptureSample/Assets/UnityCaptureMultiCam.unity: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!29 &1 4 | OcclusionCullingSettings: 5 | m_ObjectHideFlags: 0 6 | serializedVersion: 2 7 | m_OcclusionBakeSettings: 8 | smallestOccluder: 5 9 | smallestHole: 0.25 10 | backfaceThreshold: 100 11 | m_SceneGUID: 00000000000000000000000000000000 12 | m_OcclusionCullingData: {fileID: 0} 13 | --- !u!104 &2 14 | RenderSettings: 15 | m_ObjectHideFlags: 0 16 | serializedVersion: 8 17 | m_Fog: 0 18 | m_FogColor: {r: 0.5, g: 0.5, b: 0.5, a: 1} 19 | m_FogMode: 3 20 | m_FogDensity: 0.01 21 | m_LinearFogStart: 0 22 | m_LinearFogEnd: 300 23 | m_AmbientSkyColor: {r: 0.212, g: 0.227, b: 0.259, a: 1} 24 | m_AmbientEquatorColor: {r: 0.114, g: 0.125, b: 0.133, a: 1} 25 | m_AmbientGroundColor: {r: 0.047, g: 0.043, b: 0.035, a: 1} 26 | m_AmbientIntensity: 1 27 | m_AmbientMode: 0 28 | m_SubtractiveShadowColor: {r: 0.42, g: 0.478, b: 0.627, a: 1} 29 | m_SkyboxMaterial: {fileID: 10304, guid: 0000000000000000f000000000000000, type: 0} 30 | m_HaloStrength: 0.5 31 | m_FlareStrength: 1 32 | m_FlareFadeSpeed: 3 33 | m_HaloTexture: {fileID: 0} 34 | m_SpotCookie: {fileID: 10001, guid: 0000000000000000e000000000000000, type: 0} 35 | m_DefaultReflectionMode: 0 36 | m_DefaultReflectionResolution: 128 37 | m_ReflectionBounces: 1 38 | m_ReflectionIntensity: 1 39 | m_CustomReflection: {fileID: 0} 40 | m_Sun: {fileID: 0} 41 | m_IndirectSpecularColor: {r: 0.44657898, g: 0.4964133, b: 0.5748178, a: 1} 42 | --- !u!157 &3 43 | LightmapSettings: 44 | m_ObjectHideFlags: 0 45 | serializedVersion: 11 46 | m_GIWorkflowMode: 0 47 | m_GISettings: 48 | serializedVersion: 2 49 | m_BounceScale: 1 50 | m_IndirectOutputScale: 1 51 | m_AlbedoBoost: 1 52 | m_TemporalCoherenceThreshold: 1 53 | m_EnvironmentLightingMode: 0 54 | m_EnableBakedLightmaps: 1 55 | m_EnableRealtimeLightmaps: 1 56 | m_LightmapEditorSettings: 57 | serializedVersion: 9 58 | m_Resolution: 2 59 | m_BakeResolution: 40 60 | m_TextureWidth: 1024 61 | m_TextureHeight: 1024 62 | m_AO: 0 63 | m_AOMaxDistance: 1 64 | m_CompAOExponent: 1 65 | m_CompAOExponentDirect: 0 66 | m_Padding: 2 67 | m_LightmapParameters: {fileID: 0} 68 | m_LightmapsBakeMode: 1 69 | m_TextureCompression: 1 70 | m_FinalGather: 0 71 | m_FinalGatherFiltering: 1 72 | m_FinalGatherRayCount: 256 73 | m_ReflectionCompression: 2 74 | m_MixedBakeMode: 2 75 | m_BakeBackend: 0 76 | m_PVRSampling: 1 77 | m_PVRDirectSampleCount: 32 78 | m_PVRSampleCount: 500 79 | m_PVRBounces: 2 80 | m_PVRFilterTypeDirect: 0 81 | m_PVRFilterTypeIndirect: 0 82 | m_PVRFilterTypeAO: 0 83 | m_PVRFilteringMode: 1 84 | m_PVRCulling: 1 85 | m_PVRFilteringGaussRadiusDirect: 1 86 | m_PVRFilteringGaussRadiusIndirect: 5 87 | m_PVRFilteringGaussRadiusAO: 2 88 | m_PVRFilteringAtrousPositionSigmaDirect: 0.5 89 | m_PVRFilteringAtrousPositionSigmaIndirect: 2 90 | m_PVRFilteringAtrousPositionSigmaAO: 1 91 | m_ShowResolutionOverlay: 1 92 | m_LightingDataAsset: {fileID: 0} 93 | m_UseShadowmask: 1 94 | --- !u!196 &4 95 | NavMeshSettings: 96 | serializedVersion: 2 97 | m_ObjectHideFlags: 0 98 | m_BuildSettings: 99 | serializedVersion: 2 100 | agentTypeID: 0 101 | agentRadius: 0.5 102 | agentHeight: 2 103 | agentSlope: 45 104 | agentClimb: 0.4 105 | ledgeDropHeight: 0 106 | maxJumpAcrossDistance: 0 107 | minRegionArea: 2 108 | manualCellSize: 0 109 | cellSize: 0.16666667 110 | manualTileSize: 0 111 | tileSize: 256 112 | accuratePlacement: 0 113 | debug: 114 | m_Flags: 0 115 | m_NavMeshData: {fileID: 0} 116 | --- !u!1 &592828463 117 | GameObject: 118 | m_ObjectHideFlags: 0 119 | m_PrefabParentObject: {fileID: 0} 120 | m_PrefabInternal: {fileID: 0} 121 | serializedVersion: 5 122 | m_Component: 123 | - component: {fileID: 592828467} 124 | - component: {fileID: 592828466} 125 | - component: {fileID: 592828465} 126 | - component: {fileID: 592828464} 127 | m_Layer: 0 128 | m_Name: Sphere 129 | m_TagString: Untagged 130 | m_Icon: {fileID: 0} 131 | m_NavMeshLayer: 0 132 | m_StaticEditorFlags: 0 133 | m_IsActive: 1 134 | --- !u!23 &592828464 135 | MeshRenderer: 136 | m_ObjectHideFlags: 0 137 | m_PrefabParentObject: {fileID: 0} 138 | m_PrefabInternal: {fileID: 0} 139 | m_GameObject: {fileID: 592828463} 140 | m_Enabled: 1 141 | m_CastShadows: 1 142 | m_ReceiveShadows: 1 143 | m_DynamicOccludee: 1 144 | m_MotionVectors: 1 145 | m_LightProbeUsage: 1 146 | m_ReflectionProbeUsage: 1 147 | m_Materials: 148 | - {fileID: 10303, guid: 0000000000000000f000000000000000, type: 0} 149 | m_StaticBatchInfo: 150 | firstSubMesh: 0 151 | subMeshCount: 0 152 | m_StaticBatchRoot: {fileID: 0} 153 | m_ProbeAnchor: {fileID: 0} 154 | m_LightProbeVolumeOverride: {fileID: 0} 155 | m_ScaleInLightmap: 1 156 | m_PreserveUVs: 1 157 | m_IgnoreNormalsForChartDetection: 0 158 | m_ImportantGI: 0 159 | m_StitchLightmapSeams: 0 160 | m_SelectedEditorRenderState: 3 161 | m_MinimumChartSize: 4 162 | m_AutoUVMaxDistance: 0.5 163 | m_AutoUVMaxAngle: 89 164 | m_LightmapParameters: {fileID: 0} 165 | m_SortingLayerID: 0 166 | m_SortingLayer: 0 167 | m_SortingOrder: 0 168 | --- !u!135 &592828465 169 | SphereCollider: 170 | m_ObjectHideFlags: 0 171 | m_PrefabParentObject: {fileID: 0} 172 | m_PrefabInternal: {fileID: 0} 173 | m_GameObject: {fileID: 592828463} 174 | m_Material: {fileID: 0} 175 | m_IsTrigger: 0 176 | m_Enabled: 1 177 | serializedVersion: 2 178 | m_Radius: 0.5 179 | m_Center: {x: 0, y: 0, z: 0} 180 | --- !u!33 &592828466 181 | MeshFilter: 182 | m_ObjectHideFlags: 0 183 | m_PrefabParentObject: {fileID: 0} 184 | m_PrefabInternal: {fileID: 0} 185 | m_GameObject: {fileID: 592828463} 186 | m_Mesh: {fileID: 10207, guid: 0000000000000000e000000000000000, type: 0} 187 | --- !u!4 &592828467 188 | Transform: 189 | m_ObjectHideFlags: 0 190 | m_PrefabParentObject: {fileID: 0} 191 | m_PrefabInternal: {fileID: 0} 192 | m_GameObject: {fileID: 592828463} 193 | m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} 194 | m_LocalPosition: {x: 0.6, y: 0, z: 0} 195 | m_LocalScale: {x: 1, y: 1, z: 1} 196 | m_Children: [] 197 | m_Father: {fileID: 0} 198 | m_RootOrder: 6 199 | m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} 200 | --- !u!1 &658370335 201 | GameObject: 202 | m_ObjectHideFlags: 0 203 | m_PrefabParentObject: {fileID: 0} 204 | m_PrefabInternal: {fileID: 0} 205 | serializedVersion: 5 206 | m_Component: 207 | - component: {fileID: 658370339} 208 | - component: {fileID: 658370338} 209 | - component: {fileID: 658370336} 210 | - component: {fileID: 658370337} 211 | m_Layer: 0 212 | m_Name: DisplayCamera 213 | m_TagString: MainCamera 214 | m_Icon: {fileID: 0} 215 | m_NavMeshLayer: 0 216 | m_StaticEditorFlags: 0 217 | m_IsActive: 1 218 | --- !u!81 &658370336 219 | AudioListener: 220 | m_ObjectHideFlags: 0 221 | m_PrefabParentObject: {fileID: 0} 222 | m_PrefabInternal: {fileID: 0} 223 | m_GameObject: {fileID: 658370335} 224 | m_Enabled: 1 225 | --- !u!114 &658370337 226 | MonoBehaviour: 227 | m_ObjectHideFlags: 0 228 | m_PrefabParentObject: {fileID: 0} 229 | m_PrefabInternal: {fileID: 0} 230 | m_GameObject: {fileID: 658370335} 231 | m_Enabled: 1 232 | m_EditorHideFlags: 0 233 | m_Script: {fileID: 11500000, guid: f7196fa938037bb46be5bc12531f7f10, type: 3} 234 | m_Name: 235 | m_EditorClassIdentifier: 236 | CaptureResolutionWidth: 1920 237 | CaptureResolutionHeight: 1080 238 | CaptureCamera1: {fileID: 1989115845} 239 | CaptureCamera2: {fileID: 1198875011} 240 | --- !u!20 &658370338 241 | Camera: 242 | m_ObjectHideFlags: 0 243 | m_PrefabParentObject: {fileID: 0} 244 | m_PrefabInternal: {fileID: 0} 245 | m_GameObject: {fileID: 658370335} 246 | m_Enabled: 1 247 | serializedVersion: 2 248 | m_ClearFlags: 1 249 | m_BackGroundColor: {r: 0.19215687, g: 0.3019608, b: 0.4745098, a: 0} 250 | m_NormalizedViewPortRect: 251 | serializedVersion: 2 252 | x: 0 253 | y: 0 254 | width: 1 255 | height: 1 256 | near clip plane: 0.3 257 | far clip plane: 1000 258 | field of view: 60 259 | orthographic: 0 260 | orthographic size: 5 261 | m_Depth: 0 262 | m_CullingMask: 263 | serializedVersion: 2 264 | m_Bits: 4294967295 265 | m_RenderingPath: -1 266 | m_TargetTexture: {fileID: 0} 267 | m_TargetDisplay: 0 268 | m_TargetEye: 3 269 | m_HDR: 1 270 | m_AllowMSAA: 1 271 | m_AllowDynamicResolution: 0 272 | m_ForceIntoRT: 0 273 | m_OcclusionCulling: 1 274 | m_StereoConvergence: 10 275 | m_StereoSeparation: 0.022 276 | --- !u!4 &658370339 277 | Transform: 278 | m_ObjectHideFlags: 0 279 | m_PrefabParentObject: {fileID: 0} 280 | m_PrefabInternal: {fileID: 0} 281 | m_GameObject: {fileID: 658370335} 282 | m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} 283 | m_LocalPosition: {x: 0, y: 0, z: 0} 284 | m_LocalScale: {x: 1, y: 1, z: 1} 285 | m_Children: [] 286 | m_Father: {fileID: 0} 287 | m_RootOrder: 1 288 | m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} 289 | --- !u!1 &1095384612 290 | GameObject: 291 | m_ObjectHideFlags: 0 292 | m_PrefabParentObject: {fileID: 0} 293 | m_PrefabInternal: {fileID: 0} 294 | serializedVersion: 5 295 | m_Component: 296 | - component: {fileID: 1095384614} 297 | - component: {fileID: 1095384613} 298 | m_Layer: 0 299 | m_Name: Directional Light 300 | m_TagString: Untagged 301 | m_Icon: {fileID: 0} 302 | m_NavMeshLayer: 0 303 | m_StaticEditorFlags: 0 304 | m_IsActive: 1 305 | --- !u!108 &1095384613 306 | Light: 307 | m_ObjectHideFlags: 0 308 | m_PrefabParentObject: {fileID: 0} 309 | m_PrefabInternal: {fileID: 0} 310 | m_GameObject: {fileID: 1095384612} 311 | m_Enabled: 1 312 | serializedVersion: 8 313 | m_Type: 1 314 | m_Color: {r: 1, g: 0.95686275, b: 0.8392157, a: 1} 315 | m_Intensity: 1 316 | m_Range: 10 317 | m_SpotAngle: 30 318 | m_CookieSize: 10 319 | m_Shadows: 320 | m_Type: 2 321 | m_Resolution: -1 322 | m_CustomResolution: -1 323 | m_Strength: 1 324 | m_Bias: 0.05 325 | m_NormalBias: 0.4 326 | m_NearPlane: 0.2 327 | m_Cookie: {fileID: 0} 328 | m_DrawHalo: 0 329 | m_Flare: {fileID: 0} 330 | m_RenderMode: 0 331 | m_CullingMask: 332 | serializedVersion: 2 333 | m_Bits: 4294967295 334 | m_Lightmapping: 4 335 | m_AreaSize: {x: 1, y: 1} 336 | m_BounceIntensity: 1 337 | m_ColorTemperature: 6570 338 | m_UseColorTemperature: 0 339 | m_ShadowRadius: 0 340 | m_ShadowAngle: 0 341 | --- !u!4 &1095384614 342 | Transform: 343 | m_ObjectHideFlags: 0 344 | m_PrefabParentObject: {fileID: 0} 345 | m_PrefabInternal: {fileID: 0} 346 | m_GameObject: {fileID: 1095384612} 347 | m_LocalRotation: {x: 0.40821788, y: -0.23456968, z: 0.10938163, w: 0.8754261} 348 | m_LocalPosition: {x: 0, y: 3, z: 0} 349 | m_LocalScale: {x: 1, y: 1, z: 1} 350 | m_Children: [] 351 | m_Father: {fileID: 0} 352 | m_RootOrder: 0 353 | m_LocalEulerAnglesHint: {x: 50, y: -30, z: 0} 354 | --- !u!1 &1198875009 355 | GameObject: 356 | m_ObjectHideFlags: 0 357 | m_PrefabParentObject: {fileID: 0} 358 | m_PrefabInternal: {fileID: 0} 359 | serializedVersion: 5 360 | m_Component: 361 | - component: {fileID: 1198875012} 362 | - component: {fileID: 1198875011} 363 | - component: {fileID: 1198875010} 364 | m_Layer: 0 365 | m_Name: CaptureCamera2 366 | m_TagString: Untagged 367 | m_Icon: {fileID: 0} 368 | m_NavMeshLayer: 0 369 | m_StaticEditorFlags: 0 370 | m_IsActive: 1 371 | --- !u!114 &1198875010 372 | MonoBehaviour: 373 | m_ObjectHideFlags: 0 374 | m_PrefabParentObject: {fileID: 0} 375 | m_PrefabInternal: {fileID: 0} 376 | m_GameObject: {fileID: 1198875009} 377 | m_Enabled: 1 378 | m_EditorHideFlags: 0 379 | m_Script: {fileID: 11500000, guid: 5f1106d3744ef824496276c8274506b2, type: 3} 380 | m_Name: 381 | m_EditorClassIdentifier: 382 | CaptureDevice: 1 383 | ResizeMode: 0 384 | MirrorMode: 0 385 | DoubleBuffering: 0 386 | EnableVSync: 0 387 | TargetFrameRate: 60 388 | HideWarnings: 0 389 | --- !u!20 &1198875011 390 | Camera: 391 | m_ObjectHideFlags: 0 392 | m_PrefabParentObject: {fileID: 0} 393 | m_PrefabInternal: {fileID: 0} 394 | m_GameObject: {fileID: 1198875009} 395 | m_Enabled: 1 396 | serializedVersion: 2 397 | m_ClearFlags: 1 398 | m_BackGroundColor: {r: 0.19215687, g: 0.3019608, b: 0.4745098, a: 0} 399 | m_NormalizedViewPortRect: 400 | serializedVersion: 2 401 | x: 0 402 | y: 0 403 | width: 1 404 | height: 1 405 | near clip plane: 0.3 406 | far clip plane: 1000 407 | field of view: 15 408 | orthographic: 0 409 | orthographic size: 5 410 | m_Depth: 0 411 | m_CullingMask: 412 | serializedVersion: 2 413 | m_Bits: 4294967295 414 | m_RenderingPath: -1 415 | m_TargetTexture: {fileID: 0} 416 | m_TargetDisplay: 0 417 | m_TargetEye: 3 418 | m_HDR: 1 419 | m_AllowMSAA: 1 420 | m_AllowDynamicResolution: 0 421 | m_ForceIntoRT: 0 422 | m_OcclusionCulling: 1 423 | m_StereoConvergence: 10 424 | m_StereoSeparation: 0.022 425 | --- !u!4 &1198875012 426 | Transform: 427 | m_ObjectHideFlags: 0 428 | m_PrefabParentObject: {fileID: 0} 429 | m_PrefabInternal: {fileID: 0} 430 | m_GameObject: {fileID: 1198875009} 431 | m_LocalRotation: {x: 0.3050128, y: -0.26139337, z: 0.087460995, w: 0.91158724} 432 | m_LocalPosition: {x: 4.5, y: 7, z: -7} 433 | m_LocalScale: {x: 1, y: 1, z: 1} 434 | m_Children: [] 435 | m_Father: {fileID: 0} 436 | m_RootOrder: 3 437 | m_LocalEulerAnglesHint: {x: 37, y: -32, z: 0} 438 | --- !u!1 &1785607102 439 | GameObject: 440 | m_ObjectHideFlags: 0 441 | m_PrefabParentObject: {fileID: 0} 442 | m_PrefabInternal: {fileID: 0} 443 | serializedVersion: 5 444 | m_Component: 445 | - component: {fileID: 1785607106} 446 | - component: {fileID: 1785607105} 447 | - component: {fileID: 1785607104} 448 | - component: {fileID: 1785607103} 449 | m_Layer: 0 450 | m_Name: Cylinder 451 | m_TagString: Untagged 452 | m_Icon: {fileID: 0} 453 | m_NavMeshLayer: 0 454 | m_StaticEditorFlags: 0 455 | m_IsActive: 1 456 | --- !u!23 &1785607103 457 | MeshRenderer: 458 | m_ObjectHideFlags: 0 459 | m_PrefabParentObject: {fileID: 0} 460 | m_PrefabInternal: {fileID: 0} 461 | m_GameObject: {fileID: 1785607102} 462 | m_Enabled: 1 463 | m_CastShadows: 1 464 | m_ReceiveShadows: 1 465 | m_DynamicOccludee: 1 466 | m_MotionVectors: 1 467 | m_LightProbeUsage: 1 468 | m_ReflectionProbeUsage: 1 469 | m_Materials: 470 | - {fileID: 10303, guid: 0000000000000000f000000000000000, type: 0} 471 | m_StaticBatchInfo: 472 | firstSubMesh: 0 473 | subMeshCount: 0 474 | m_StaticBatchRoot: {fileID: 0} 475 | m_ProbeAnchor: {fileID: 0} 476 | m_LightProbeVolumeOverride: {fileID: 0} 477 | m_ScaleInLightmap: 1 478 | m_PreserveUVs: 1 479 | m_IgnoreNormalsForChartDetection: 0 480 | m_ImportantGI: 0 481 | m_StitchLightmapSeams: 0 482 | m_SelectedEditorRenderState: 3 483 | m_MinimumChartSize: 4 484 | m_AutoUVMaxDistance: 0.5 485 | m_AutoUVMaxAngle: 89 486 | m_LightmapParameters: {fileID: 0} 487 | m_SortingLayerID: 0 488 | m_SortingLayer: 0 489 | m_SortingOrder: 0 490 | --- !u!136 &1785607104 491 | CapsuleCollider: 492 | m_ObjectHideFlags: 0 493 | m_PrefabParentObject: {fileID: 0} 494 | m_PrefabInternal: {fileID: 0} 495 | m_GameObject: {fileID: 1785607102} 496 | m_Material: {fileID: 0} 497 | m_IsTrigger: 0 498 | m_Enabled: 1 499 | m_Radius: 0.5 500 | m_Height: 2 501 | m_Direction: 1 502 | m_Center: {x: 0, y: 0, z: 0} 503 | --- !u!33 &1785607105 504 | MeshFilter: 505 | m_ObjectHideFlags: 0 506 | m_PrefabParentObject: {fileID: 0} 507 | m_PrefabInternal: {fileID: 0} 508 | m_GameObject: {fileID: 1785607102} 509 | m_Mesh: {fileID: 10206, guid: 0000000000000000e000000000000000, type: 0} 510 | --- !u!4 &1785607106 511 | Transform: 512 | m_ObjectHideFlags: 0 513 | m_PrefabParentObject: {fileID: 0} 514 | m_PrefabInternal: {fileID: 0} 515 | m_GameObject: {fileID: 1785607102} 516 | m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} 517 | m_LocalPosition: {x: 0.01999998, y: 0, z: 1.7} 518 | m_LocalScale: {x: 1, y: 1, z: 1} 519 | m_Children: [] 520 | m_Father: {fileID: 0} 521 | m_RootOrder: 5 522 | m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} 523 | --- !u!1 &1989115843 524 | GameObject: 525 | m_ObjectHideFlags: 0 526 | m_PrefabParentObject: {fileID: 0} 527 | m_PrefabInternal: {fileID: 0} 528 | serializedVersion: 5 529 | m_Component: 530 | - component: {fileID: 1989115846} 531 | - component: {fileID: 1989115845} 532 | - component: {fileID: 1989115844} 533 | m_Layer: 0 534 | m_Name: CaptureCamera1 535 | m_TagString: Untagged 536 | m_Icon: {fileID: 0} 537 | m_NavMeshLayer: 0 538 | m_StaticEditorFlags: 0 539 | m_IsActive: 1 540 | --- !u!114 &1989115844 541 | MonoBehaviour: 542 | m_ObjectHideFlags: 0 543 | m_PrefabParentObject: {fileID: 0} 544 | m_PrefabInternal: {fileID: 0} 545 | m_GameObject: {fileID: 1989115843} 546 | m_Enabled: 1 547 | m_EditorHideFlags: 0 548 | m_Script: {fileID: 11500000, guid: 5f1106d3744ef824496276c8274506b2, type: 3} 549 | m_Name: 550 | m_EditorClassIdentifier: 551 | CaptureDevice: 0 552 | ResizeMode: 0 553 | MirrorMode: 0 554 | DoubleBuffering: 0 555 | EnableVSync: 0 556 | TargetFrameRate: 60 557 | HideWarnings: 0 558 | --- !u!20 &1989115845 559 | Camera: 560 | m_ObjectHideFlags: 0 561 | m_PrefabParentObject: {fileID: 0} 562 | m_PrefabInternal: {fileID: 0} 563 | m_GameObject: {fileID: 1989115843} 564 | m_Enabled: 1 565 | serializedVersion: 2 566 | m_ClearFlags: 1 567 | m_BackGroundColor: {r: 0.19215687, g: 0.3019608, b: 0.4745098, a: 0} 568 | m_NormalizedViewPortRect: 569 | serializedVersion: 2 570 | x: 0 571 | y: 0 572 | width: 1 573 | height: 1 574 | near clip plane: 0.3 575 | far clip plane: 1000 576 | field of view: 60 577 | orthographic: 0 578 | orthographic size: 5 579 | m_Depth: 0 580 | m_CullingMask: 581 | serializedVersion: 2 582 | m_Bits: 4294967295 583 | m_RenderingPath: -1 584 | m_TargetTexture: {fileID: 0} 585 | m_TargetDisplay: 0 586 | m_TargetEye: 3 587 | m_HDR: 1 588 | m_AllowMSAA: 1 589 | m_AllowDynamicResolution: 0 590 | m_ForceIntoRT: 0 591 | m_OcclusionCulling: 1 592 | m_StereoConvergence: 10 593 | m_StereoSeparation: 0.022 594 | --- !u!4 &1989115846 595 | Transform: 596 | m_ObjectHideFlags: 0 597 | m_PrefabParentObject: {fileID: 0} 598 | m_PrefabInternal: {fileID: 0} 599 | m_GameObject: {fileID: 1989115843} 600 | m_LocalRotation: {x: 0.12378104, y: 0.31459007, z: -0.041416556, w: 0.94021064} 601 | m_LocalPosition: {x: -2.6, y: 1, z: -3} 602 | m_LocalScale: {x: 1, y: 1, z: 1} 603 | m_Children: [] 604 | m_Father: {fileID: 0} 605 | m_RootOrder: 2 606 | m_LocalEulerAnglesHint: {x: 15, y: 37, z: 0} 607 | --- !u!1 &2109363506 608 | GameObject: 609 | m_ObjectHideFlags: 0 610 | m_PrefabParentObject: {fileID: 0} 611 | m_PrefabInternal: {fileID: 0} 612 | serializedVersion: 5 613 | m_Component: 614 | - component: {fileID: 2109363510} 615 | - component: {fileID: 2109363509} 616 | - component: {fileID: 2109363508} 617 | - component: {fileID: 2109363507} 618 | m_Layer: 0 619 | m_Name: Cube 620 | m_TagString: Untagged 621 | m_Icon: {fileID: 0} 622 | m_NavMeshLayer: 0 623 | m_StaticEditorFlags: 0 624 | m_IsActive: 1 625 | --- !u!23 &2109363507 626 | MeshRenderer: 627 | m_ObjectHideFlags: 0 628 | m_PrefabParentObject: {fileID: 0} 629 | m_PrefabInternal: {fileID: 0} 630 | m_GameObject: {fileID: 2109363506} 631 | m_Enabled: 1 632 | m_CastShadows: 1 633 | m_ReceiveShadows: 1 634 | m_DynamicOccludee: 1 635 | m_MotionVectors: 1 636 | m_LightProbeUsage: 1 637 | m_ReflectionProbeUsage: 1 638 | m_Materials: 639 | - {fileID: 10303, guid: 0000000000000000f000000000000000, type: 0} 640 | m_StaticBatchInfo: 641 | firstSubMesh: 0 642 | subMeshCount: 0 643 | m_StaticBatchRoot: {fileID: 0} 644 | m_ProbeAnchor: {fileID: 0} 645 | m_LightProbeVolumeOverride: {fileID: 0} 646 | m_ScaleInLightmap: 1 647 | m_PreserveUVs: 1 648 | m_IgnoreNormalsForChartDetection: 0 649 | m_ImportantGI: 0 650 | m_StitchLightmapSeams: 0 651 | m_SelectedEditorRenderState: 3 652 | m_MinimumChartSize: 4 653 | m_AutoUVMaxDistance: 0.5 654 | m_AutoUVMaxAngle: 89 655 | m_LightmapParameters: {fileID: 0} 656 | m_SortingLayerID: 0 657 | m_SortingLayer: 0 658 | m_SortingOrder: 0 659 | --- !u!65 &2109363508 660 | BoxCollider: 661 | m_ObjectHideFlags: 0 662 | m_PrefabParentObject: {fileID: 0} 663 | m_PrefabInternal: {fileID: 0} 664 | m_GameObject: {fileID: 2109363506} 665 | m_Material: {fileID: 0} 666 | m_IsTrigger: 0 667 | m_Enabled: 1 668 | serializedVersion: 2 669 | m_Size: {x: 1, y: 1, z: 1} 670 | m_Center: {x: 0, y: 0, z: 0} 671 | --- !u!33 &2109363509 672 | MeshFilter: 673 | m_ObjectHideFlags: 0 674 | m_PrefabParentObject: {fileID: 0} 675 | m_PrefabInternal: {fileID: 0} 676 | m_GameObject: {fileID: 2109363506} 677 | m_Mesh: {fileID: 10202, guid: 0000000000000000e000000000000000, type: 0} 678 | --- !u!4 &2109363510 679 | Transform: 680 | m_ObjectHideFlags: 0 681 | m_PrefabParentObject: {fileID: 0} 682 | m_PrefabInternal: {fileID: 0} 683 | m_GameObject: {fileID: 2109363506} 684 | m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} 685 | m_LocalPosition: {x: -0.6, y: 0, z: 0} 686 | m_LocalScale: {x: 1, y: 1, z: 1} 687 | m_Children: [] 688 | m_Father: {fileID: 0} 689 | m_RootOrder: 4 690 | m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} 691 | -------------------------------------------------------------------------------- /UnityCaptureSample/Assets/UnityCaptureMultiCam.unity.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 11a64de95dd5931409a8adddd311a26d 3 | timeCreated: 1530682853 4 | licenseType: Free 5 | DefaultImporter: 6 | externalObjects: {} 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /UnityCaptureSample/Assets/UnityCaptureTextureExample.unity: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!29 &1 4 | OcclusionCullingSettings: 5 | m_ObjectHideFlags: 0 6 | serializedVersion: 2 7 | m_OcclusionBakeSettings: 8 | smallestOccluder: 5 9 | smallestHole: 0.25 10 | backfaceThreshold: 100 11 | m_SceneGUID: 00000000000000000000000000000000 12 | m_OcclusionCullingData: {fileID: 0} 13 | --- !u!104 &2 14 | RenderSettings: 15 | m_ObjectHideFlags: 0 16 | serializedVersion: 8 17 | m_Fog: 0 18 | m_FogColor: {r: 0.5, g: 0.5, b: 0.5, a: 1} 19 | m_FogMode: 3 20 | m_FogDensity: 0.01 21 | m_LinearFogStart: 0 22 | m_LinearFogEnd: 300 23 | m_AmbientSkyColor: {r: 0.212, g: 0.227, b: 0.259, a: 1} 24 | m_AmbientEquatorColor: {r: 0.114, g: 0.125, b: 0.133, a: 1} 25 | m_AmbientGroundColor: {r: 0.047, g: 0.043, b: 0.035, a: 1} 26 | m_AmbientIntensity: 1 27 | m_AmbientMode: 0 28 | m_SubtractiveShadowColor: {r: 0.42, g: 0.478, b: 0.627, a: 1} 29 | m_SkyboxMaterial: {fileID: 10304, guid: 0000000000000000f000000000000000, type: 0} 30 | m_HaloStrength: 0.5 31 | m_FlareStrength: 1 32 | m_FlareFadeSpeed: 3 33 | m_HaloTexture: {fileID: 0} 34 | m_SpotCookie: {fileID: 10001, guid: 0000000000000000e000000000000000, type: 0} 35 | m_DefaultReflectionMode: 0 36 | m_DefaultReflectionResolution: 128 37 | m_ReflectionBounces: 1 38 | m_ReflectionIntensity: 1 39 | m_CustomReflection: {fileID: 0} 40 | m_Sun: {fileID: 0} 41 | m_IndirectSpecularColor: {r: 0.44657898, g: 0.4964133, b: 0.5748178, a: 1} 42 | --- !u!157 &3 43 | LightmapSettings: 44 | m_ObjectHideFlags: 0 45 | serializedVersion: 11 46 | m_GIWorkflowMode: 0 47 | m_GISettings: 48 | serializedVersion: 2 49 | m_BounceScale: 1 50 | m_IndirectOutputScale: 1 51 | m_AlbedoBoost: 1 52 | m_TemporalCoherenceThreshold: 1 53 | m_EnvironmentLightingMode: 0 54 | m_EnableBakedLightmaps: 1 55 | m_EnableRealtimeLightmaps: 1 56 | m_LightmapEditorSettings: 57 | serializedVersion: 9 58 | m_Resolution: 2 59 | m_BakeResolution: 40 60 | m_TextureWidth: 1024 61 | m_TextureHeight: 1024 62 | m_AO: 0 63 | m_AOMaxDistance: 1 64 | m_CompAOExponent: 0 65 | m_CompAOExponentDirect: 0 66 | m_Padding: 2 67 | m_LightmapParameters: {fileID: 0} 68 | m_LightmapsBakeMode: 1 69 | m_TextureCompression: 1 70 | m_FinalGather: 0 71 | m_FinalGatherFiltering: 1 72 | m_FinalGatherRayCount: 1024 73 | m_ReflectionCompression: 2 74 | m_MixedBakeMode: 1 75 | m_BakeBackend: 0 76 | m_PVRSampling: 1 77 | m_PVRDirectSampleCount: 32 78 | m_PVRSampleCount: 500 79 | m_PVRBounces: 2 80 | m_PVRFilterTypeDirect: 0 81 | m_PVRFilterTypeIndirect: 0 82 | m_PVRFilterTypeAO: 0 83 | m_PVRFilteringMode: 0 84 | m_PVRCulling: 1 85 | m_PVRFilteringGaussRadiusDirect: 1 86 | m_PVRFilteringGaussRadiusIndirect: 5 87 | m_PVRFilteringGaussRadiusAO: 2 88 | m_PVRFilteringAtrousPositionSigmaDirect: 0.5 89 | m_PVRFilteringAtrousPositionSigmaIndirect: 2 90 | m_PVRFilteringAtrousPositionSigmaAO: 1 91 | m_ShowResolutionOverlay: 1 92 | m_LightingDataAsset: {fileID: 0} 93 | m_UseShadowmask: 0 94 | --- !u!196 &4 95 | NavMeshSettings: 96 | serializedVersion: 2 97 | m_ObjectHideFlags: 0 98 | m_BuildSettings: 99 | serializedVersion: 2 100 | agentTypeID: 0 101 | agentRadius: 0.5 102 | agentHeight: 2 103 | agentSlope: 45 104 | agentClimb: 0.4 105 | ledgeDropHeight: 0 106 | maxJumpAcrossDistance: 0 107 | minRegionArea: 2 108 | manualCellSize: 0 109 | cellSize: 0.16666667 110 | manualTileSize: 0 111 | tileSize: 256 112 | accuratePlacement: 0 113 | debug: 114 | m_Flags: 0 115 | m_NavMeshData: {fileID: 0} 116 | --- !u!1 &922515556 117 | GameObject: 118 | m_ObjectHideFlags: 0 119 | m_PrefabParentObject: {fileID: 0} 120 | m_PrefabInternal: {fileID: 0} 121 | serializedVersion: 5 122 | m_Component: 123 | - component: {fileID: 922515559} 124 | - component: {fileID: 922515557} 125 | m_Layer: 0 126 | m_Name: Capturer 127 | m_TagString: Untagged 128 | m_Icon: {fileID: 0} 129 | m_NavMeshLayer: 0 130 | m_StaticEditorFlags: 0 131 | m_IsActive: 1 132 | --- !u!114 &922515557 133 | MonoBehaviour: 134 | m_ObjectHideFlags: 0 135 | m_PrefabParentObject: {fileID: 0} 136 | m_PrefabInternal: {fileID: 0} 137 | m_GameObject: {fileID: 922515556} 138 | m_Enabled: 1 139 | m_EditorHideFlags: 0 140 | m_Script: {fileID: 11500000, guid: c8e68187542b37846b4a604d28bd90e1, type: 3} 141 | m_Name: 142 | m_EditorClassIdentifier: 143 | width: 320 144 | height: 240 145 | outputRenderer: {fileID: 1893059143} 146 | --- !u!4 &922515559 147 | Transform: 148 | m_ObjectHideFlags: 0 149 | m_PrefabParentObject: {fileID: 0} 150 | m_PrefabInternal: {fileID: 0} 151 | m_GameObject: {fileID: 922515556} 152 | m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} 153 | m_LocalPosition: {x: -6.91, y: -2.4, z: 0} 154 | m_LocalScale: {x: 1, y: 1, z: 1} 155 | m_Children: [] 156 | m_Father: {fileID: 0} 157 | m_RootOrder: 2 158 | m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} 159 | --- !u!1 &1251162945 160 | GameObject: 161 | m_ObjectHideFlags: 0 162 | m_PrefabParentObject: {fileID: 0} 163 | m_PrefabInternal: {fileID: 0} 164 | serializedVersion: 5 165 | m_Component: 166 | - component: {fileID: 1251162947} 167 | - component: {fileID: 1251162946} 168 | m_Layer: 0 169 | m_Name: Directional Light 170 | m_TagString: Untagged 171 | m_Icon: {fileID: 0} 172 | m_NavMeshLayer: 0 173 | m_StaticEditorFlags: 0 174 | m_IsActive: 1 175 | --- !u!108 &1251162946 176 | Light: 177 | m_ObjectHideFlags: 0 178 | m_PrefabParentObject: {fileID: 0} 179 | m_PrefabInternal: {fileID: 0} 180 | m_GameObject: {fileID: 1251162945} 181 | m_Enabled: 1 182 | serializedVersion: 8 183 | m_Type: 1 184 | m_Color: {r: 1, g: 0.95686275, b: 0.8392157, a: 1} 185 | m_Intensity: 1 186 | m_Range: 10 187 | m_SpotAngle: 30 188 | m_CookieSize: 10 189 | m_Shadows: 190 | m_Type: 2 191 | m_Resolution: -1 192 | m_CustomResolution: -1 193 | m_Strength: 1 194 | m_Bias: 0.05 195 | m_NormalBias: 0.4 196 | m_NearPlane: 0.2 197 | m_Cookie: {fileID: 0} 198 | m_DrawHalo: 0 199 | m_Flare: {fileID: 0} 200 | m_RenderMode: 0 201 | m_CullingMask: 202 | serializedVersion: 2 203 | m_Bits: 4294967295 204 | m_Lightmapping: 4 205 | m_AreaSize: {x: 1, y: 1} 206 | m_BounceIntensity: 1 207 | m_ColorTemperature: 6570 208 | m_UseColorTemperature: 0 209 | m_ShadowRadius: 0 210 | m_ShadowAngle: 0 211 | --- !u!4 &1251162947 212 | Transform: 213 | m_ObjectHideFlags: 0 214 | m_PrefabParentObject: {fileID: 0} 215 | m_PrefabInternal: {fileID: 0} 216 | m_GameObject: {fileID: 1251162945} 217 | m_LocalRotation: {x: 0.40821797, y: -0.23456974, z: 0.10938168, w: 0.8754261} 218 | m_LocalPosition: {x: 0, y: 3, z: 0} 219 | m_LocalScale: {x: 1, y: 1, z: 1} 220 | m_Children: [] 221 | m_Father: {fileID: 0} 222 | m_RootOrder: 0 223 | m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} 224 | --- !u!1 &1776439397 225 | GameObject: 226 | m_ObjectHideFlags: 0 227 | m_PrefabParentObject: {fileID: 0} 228 | m_PrefabInternal: {fileID: 0} 229 | serializedVersion: 5 230 | m_Component: 231 | - component: {fileID: 1776439401} 232 | - component: {fileID: 1776439400} 233 | - component: {fileID: 1776439399} 234 | - component: {fileID: 1776439398} 235 | m_Layer: 0 236 | m_Name: Camera 237 | m_TagString: Untagged 238 | m_Icon: {fileID: 0} 239 | m_NavMeshLayer: 0 240 | m_StaticEditorFlags: 0 241 | m_IsActive: 1 242 | --- !u!81 &1776439398 243 | AudioListener: 244 | m_ObjectHideFlags: 0 245 | m_PrefabParentObject: {fileID: 0} 246 | m_PrefabInternal: {fileID: 0} 247 | m_GameObject: {fileID: 1776439397} 248 | m_Enabled: 1 249 | --- !u!124 &1776439399 250 | Behaviour: 251 | m_ObjectHideFlags: 0 252 | m_PrefabParentObject: {fileID: 0} 253 | m_PrefabInternal: {fileID: 0} 254 | m_GameObject: {fileID: 1776439397} 255 | m_Enabled: 1 256 | --- !u!20 &1776439400 257 | Camera: 258 | m_ObjectHideFlags: 0 259 | m_PrefabParentObject: {fileID: 0} 260 | m_PrefabInternal: {fileID: 0} 261 | m_GameObject: {fileID: 1776439397} 262 | m_Enabled: 1 263 | serializedVersion: 2 264 | m_ClearFlags: 1 265 | m_BackGroundColor: {r: 0.19215687, g: 0.3019608, b: 0.4745098, a: 0} 266 | m_NormalizedViewPortRect: 267 | serializedVersion: 2 268 | x: 0 269 | y: 0 270 | width: 1 271 | height: 1 272 | near clip plane: 0.3 273 | far clip plane: 1000 274 | field of view: 60 275 | orthographic: 0 276 | orthographic size: 5 277 | m_Depth: 0 278 | m_CullingMask: 279 | serializedVersion: 2 280 | m_Bits: 4294967295 281 | m_RenderingPath: -1 282 | m_TargetTexture: {fileID: 0} 283 | m_TargetDisplay: 0 284 | m_TargetEye: 3 285 | m_HDR: 1 286 | m_AllowMSAA: 1 287 | m_AllowDynamicResolution: 0 288 | m_ForceIntoRT: 0 289 | m_OcclusionCulling: 1 290 | m_StereoConvergence: 10 291 | m_StereoSeparation: 0.022 292 | --- !u!4 &1776439401 293 | Transform: 294 | m_ObjectHideFlags: 0 295 | m_PrefabParentObject: {fileID: 0} 296 | m_PrefabInternal: {fileID: 0} 297 | m_GameObject: {fileID: 1776439397} 298 | m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} 299 | m_LocalPosition: {x: -6.91, y: -2.4, z: 0} 300 | m_LocalScale: {x: 1, y: 1, z: 1} 301 | m_Children: [] 302 | m_Father: {fileID: 0} 303 | m_RootOrder: 1 304 | m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} 305 | --- !u!1 &1893059142 306 | GameObject: 307 | m_ObjectHideFlags: 0 308 | m_PrefabParentObject: {fileID: 0} 309 | m_PrefabInternal: {fileID: 0} 310 | serializedVersion: 5 311 | m_Component: 312 | - component: {fileID: 1893059146} 313 | - component: {fileID: 1893059145} 314 | - component: {fileID: 1893059144} 315 | - component: {fileID: 1893059143} 316 | m_Layer: 0 317 | m_Name: Quad 318 | m_TagString: Untagged 319 | m_Icon: {fileID: 0} 320 | m_NavMeshLayer: 0 321 | m_StaticEditorFlags: 0 322 | m_IsActive: 1 323 | --- !u!23 &1893059143 324 | MeshRenderer: 325 | m_ObjectHideFlags: 0 326 | m_PrefabParentObject: {fileID: 0} 327 | m_PrefabInternal: {fileID: 0} 328 | m_GameObject: {fileID: 1893059142} 329 | m_Enabled: 1 330 | m_CastShadows: 1 331 | m_ReceiveShadows: 1 332 | m_DynamicOccludee: 1 333 | m_MotionVectors: 1 334 | m_LightProbeUsage: 1 335 | m_ReflectionProbeUsage: 1 336 | m_Materials: 337 | - {fileID: 2100000, guid: 07c56e3f5854b144bb9eca95eacc0425, type: 2} 338 | m_StaticBatchInfo: 339 | firstSubMesh: 0 340 | subMeshCount: 0 341 | m_StaticBatchRoot: {fileID: 0} 342 | m_ProbeAnchor: {fileID: 0} 343 | m_LightProbeVolumeOverride: {fileID: 0} 344 | m_ScaleInLightmap: 1 345 | m_PreserveUVs: 1 346 | m_IgnoreNormalsForChartDetection: 0 347 | m_ImportantGI: 0 348 | m_StitchLightmapSeams: 0 349 | m_SelectedEditorRenderState: 3 350 | m_MinimumChartSize: 4 351 | m_AutoUVMaxDistance: 0.5 352 | m_AutoUVMaxAngle: 89 353 | m_LightmapParameters: {fileID: 0} 354 | m_SortingLayerID: 0 355 | m_SortingLayer: 0 356 | m_SortingOrder: 0 357 | --- !u!64 &1893059144 358 | MeshCollider: 359 | m_ObjectHideFlags: 0 360 | m_PrefabParentObject: {fileID: 0} 361 | m_PrefabInternal: {fileID: 0} 362 | m_GameObject: {fileID: 1893059142} 363 | m_Material: {fileID: 0} 364 | m_IsTrigger: 0 365 | m_Enabled: 1 366 | serializedVersion: 3 367 | m_Convex: 0 368 | m_CookingOptions: 14 369 | m_SkinWidth: 0.01 370 | m_Mesh: {fileID: 10210, guid: 0000000000000000e000000000000000, type: 0} 371 | --- !u!33 &1893059145 372 | MeshFilter: 373 | m_ObjectHideFlags: 0 374 | m_PrefabParentObject: {fileID: 0} 375 | m_PrefabInternal: {fileID: 0} 376 | m_GameObject: {fileID: 1893059142} 377 | m_Mesh: {fileID: 10210, guid: 0000000000000000e000000000000000, type: 0} 378 | --- !u!4 &1893059146 379 | Transform: 380 | m_ObjectHideFlags: 0 381 | m_PrefabParentObject: {fileID: 0} 382 | m_PrefabInternal: {fileID: 0} 383 | m_GameObject: {fileID: 1893059142} 384 | m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} 385 | m_LocalPosition: {x: -6.91, y: -2.4, z: 1.41} 386 | m_LocalScale: {x: 1, y: 1, z: 1} 387 | m_Children: [] 388 | m_Father: {fileID: 0} 389 | m_RootOrder: 3 390 | m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} 391 | -------------------------------------------------------------------------------- /UnityCaptureSample/Assets/UnityCaptureTextureExample.unity.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 0e5521c3918e4e94e896eb15f27dcde5 3 | timeCreated: 1536023064 4 | licenseType: Free 5 | DefaultImporter: 6 | externalObjects: {} 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /UnityCaptureSample/ProjectSettings/AudioManager.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!11 &1 4 | AudioManager: 5 | m_ObjectHideFlags: 0 6 | m_Volume: 1 7 | Rolloff Scale: 1 8 | Doppler Factor: 1 9 | Default Speaker Mode: 2 10 | m_SampleRate: 0 11 | m_DSPBufferSize: 0 12 | m_VirtualVoiceCount: 512 13 | m_RealVoiceCount: 32 14 | m_SpatializerPlugin: 15 | m_AmbisonicDecoderPlugin: 16 | m_DisableAudio: 0 17 | m_VirtualizeEffects: 1 18 | -------------------------------------------------------------------------------- /UnityCaptureSample/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 | -------------------------------------------------------------------------------- /UnityCaptureSample/ProjectSettings/DynamicsManager.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!55 &1 4 | PhysicsManager: 5 | m_ObjectHideFlags: 0 6 | serializedVersion: 7 7 | m_Gravity: {x: 0, y: -9.81, z: 0} 8 | m_DefaultMaterial: {fileID: 0} 9 | m_BounceThreshold: 2 10 | m_SleepThreshold: 0.005 11 | m_DefaultContactOffset: 0.01 12 | m_DefaultSolverIterations: 6 13 | m_DefaultSolverVelocityIterations: 1 14 | m_QueriesHitBackfaces: 0 15 | m_QueriesHitTriggers: 1 16 | m_EnableAdaptiveForce: 0 17 | m_ClothInterCollisionDistance: 0 18 | m_ClothInterCollisionStiffness: 0 19 | m_ContactsGeneration: 1 20 | m_LayerCollisionMatrix: ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff 21 | m_AutoSimulation: 1 22 | m_AutoSyncTransforms: 1 23 | m_ClothInterCollisionSettingsToggle: 0 24 | m_ContactPairsMode: 0 25 | m_BroadphaseType: 0 26 | m_WorldBounds: 27 | m_Center: {x: 0, y: 0, z: 0} 28 | m_Extent: {x: 250, y: 250, z: 250} 29 | m_WorldSubdivisions: 8 30 | -------------------------------------------------------------------------------- /UnityCaptureSample/ProjectSettings/EditorBuildSettings.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!1045 &1 4 | EditorBuildSettings: 5 | m_ObjectHideFlags: 0 6 | serializedVersion: 2 7 | m_Scenes: 8 | - enabled: 1 9 | path: Assets/UnityCam/Example/CubesScene.unity 10 | guid: 91da01314302a514aa3176f8a4ad8536 11 | -------------------------------------------------------------------------------- /UnityCaptureSample/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: 7 7 | m_ExternalVersionControlSupport: Visible Meta Files 8 | m_SerializationMode: 2 9 | m_LineEndingsForNewScripts: 2 10 | m_DefaultBehaviorMode: 0 11 | m_SpritePackerMode: 0 12 | m_SpritePackerPaddingPower: 1 13 | m_EtcTextureCompressorBehavior: 1 14 | m_EtcTextureFastCompressor: 1 15 | m_EtcTextureNormalCompressor: 2 16 | m_EtcTextureBestCompressor: 4 17 | m_ProjectGenerationIncludedExtensions: txt;xml;fnt;cd;asmdef;rsp 18 | m_ProjectGenerationRootNamespace: 19 | m_UserGeneratedProjectSuffix: 20 | m_CollabEditorSettings: 21 | inProgressEnabled: 1 22 | -------------------------------------------------------------------------------- /UnityCaptureSample/ProjectSettings/GraphicsSettings.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!30 &1 4 | GraphicsSettings: 5 | m_ObjectHideFlags: 0 6 | serializedVersion: 12 7 | m_Deferred: 8 | m_Mode: 1 9 | m_Shader: {fileID: 69, guid: 0000000000000000f000000000000000, type: 0} 10 | m_DeferredReflections: 11 | m_Mode: 1 12 | m_Shader: {fileID: 74, guid: 0000000000000000f000000000000000, type: 0} 13 | m_ScreenSpaceShadows: 14 | m_Mode: 1 15 | m_Shader: {fileID: 64, guid: 0000000000000000f000000000000000, type: 0} 16 | m_LegacyDeferred: 17 | m_Mode: 1 18 | m_Shader: {fileID: 63, guid: 0000000000000000f000000000000000, type: 0} 19 | m_DepthNormals: 20 | m_Mode: 1 21 | m_Shader: {fileID: 62, guid: 0000000000000000f000000000000000, type: 0} 22 | m_MotionVectors: 23 | m_Mode: 1 24 | m_Shader: {fileID: 75, guid: 0000000000000000f000000000000000, type: 0} 25 | m_LightHalo: 26 | m_Mode: 1 27 | m_Shader: {fileID: 105, guid: 0000000000000000f000000000000000, type: 0} 28 | m_LensFlare: 29 | m_Mode: 1 30 | m_Shader: {fileID: 102, guid: 0000000000000000f000000000000000, type: 0} 31 | m_AlwaysIncludedShaders: 32 | - {fileID: 7, guid: 0000000000000000f000000000000000, type: 0} 33 | - {fileID: 15104, guid: 0000000000000000f000000000000000, type: 0} 34 | - {fileID: 15105, guid: 0000000000000000f000000000000000, type: 0} 35 | - {fileID: 15106, guid: 0000000000000000f000000000000000, type: 0} 36 | - {fileID: 10753, guid: 0000000000000000f000000000000000, type: 0} 37 | - {fileID: 10770, guid: 0000000000000000f000000000000000, type: 0} 38 | - {fileID: 17000, guid: 0000000000000000f000000000000000, type: 0} 39 | - {fileID: 16000, guid: 0000000000000000f000000000000000, type: 0} 40 | m_PreloadedShaders: [] 41 | m_SpritesDefaultMaterial: {fileID: 10754, guid: 0000000000000000f000000000000000, 42 | type: 0} 43 | m_CustomRenderPipeline: {fileID: 0} 44 | m_TransparencySortMode: 0 45 | m_TransparencySortAxis: {x: 0, y: 0, z: 1} 46 | m_DefaultRenderingPath: 1 47 | m_DefaultMobileRenderingPath: 1 48 | m_TierSettings: [] 49 | m_LightmapStripping: 0 50 | m_FogStripping: 0 51 | m_InstancingStripping: 0 52 | m_LightmapKeepPlain: 1 53 | m_LightmapKeepDirCombined: 1 54 | m_LightmapKeepDynamicPlain: 1 55 | m_LightmapKeepDynamicDirCombined: 1 56 | m_LightmapKeepShadowMask: 1 57 | m_LightmapKeepSubtractive: 1 58 | m_FogKeepLinear: 1 59 | m_FogKeepExp: 1 60 | m_FogKeepExp2: 1 61 | m_AlbedoSwatchInfos: [] 62 | m_LightsUseLinearIntensity: 0 63 | m_LightsUseColorTemperature: 0 64 | -------------------------------------------------------------------------------- /UnityCaptureSample/ProjectSettings/InputManager.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!13 &1 4 | InputManager: 5 | m_ObjectHideFlags: 0 6 | serializedVersion: 2 7 | m_Axes: 8 | - serializedVersion: 3 9 | m_Name: Horizontal 10 | descriptiveName: 11 | descriptiveNegativeName: 12 | negativeButton: left 13 | positiveButton: right 14 | altNegativeButton: a 15 | altPositiveButton: d 16 | gravity: 3 17 | dead: 0.001 18 | sensitivity: 3 19 | snap: 1 20 | invert: 0 21 | type: 0 22 | axis: 0 23 | joyNum: 0 24 | - serializedVersion: 3 25 | m_Name: Vertical 26 | descriptiveName: 27 | descriptiveNegativeName: 28 | negativeButton: down 29 | positiveButton: up 30 | altNegativeButton: s 31 | altPositiveButton: w 32 | gravity: 3 33 | dead: 0.001 34 | sensitivity: 3 35 | snap: 1 36 | invert: 0 37 | type: 0 38 | axis: 0 39 | joyNum: 0 40 | - serializedVersion: 3 41 | m_Name: Fire1 42 | descriptiveName: 43 | descriptiveNegativeName: 44 | negativeButton: 45 | positiveButton: left ctrl 46 | altNegativeButton: 47 | altPositiveButton: mouse 0 48 | gravity: 1000 49 | dead: 0.001 50 | sensitivity: 1000 51 | snap: 0 52 | invert: 0 53 | type: 0 54 | axis: 0 55 | joyNum: 0 56 | - serializedVersion: 3 57 | m_Name: Fire2 58 | descriptiveName: 59 | descriptiveNegativeName: 60 | negativeButton: 61 | positiveButton: left alt 62 | altNegativeButton: 63 | altPositiveButton: mouse 1 64 | gravity: 1000 65 | dead: 0.001 66 | sensitivity: 1000 67 | snap: 0 68 | invert: 0 69 | type: 0 70 | axis: 0 71 | joyNum: 0 72 | - serializedVersion: 3 73 | m_Name: Fire3 74 | descriptiveName: 75 | descriptiveNegativeName: 76 | negativeButton: 77 | positiveButton: left shift 78 | altNegativeButton: 79 | altPositiveButton: mouse 2 80 | gravity: 1000 81 | dead: 0.001 82 | sensitivity: 1000 83 | snap: 0 84 | invert: 0 85 | type: 0 86 | axis: 0 87 | joyNum: 0 88 | - serializedVersion: 3 89 | m_Name: Jump 90 | descriptiveName: 91 | descriptiveNegativeName: 92 | negativeButton: 93 | positiveButton: space 94 | altNegativeButton: 95 | altPositiveButton: 96 | gravity: 1000 97 | dead: 0.001 98 | sensitivity: 1000 99 | snap: 0 100 | invert: 0 101 | type: 0 102 | axis: 0 103 | joyNum: 0 104 | - serializedVersion: 3 105 | m_Name: Mouse X 106 | descriptiveName: 107 | descriptiveNegativeName: 108 | negativeButton: 109 | positiveButton: 110 | altNegativeButton: 111 | altPositiveButton: 112 | gravity: 0 113 | dead: 0 114 | sensitivity: 0.1 115 | snap: 0 116 | invert: 0 117 | type: 1 118 | axis: 0 119 | joyNum: 0 120 | - serializedVersion: 3 121 | m_Name: Mouse Y 122 | descriptiveName: 123 | descriptiveNegativeName: 124 | negativeButton: 125 | positiveButton: 126 | altNegativeButton: 127 | altPositiveButton: 128 | gravity: 0 129 | dead: 0 130 | sensitivity: 0.1 131 | snap: 0 132 | invert: 0 133 | type: 1 134 | axis: 1 135 | joyNum: 0 136 | - serializedVersion: 3 137 | m_Name: Mouse ScrollWheel 138 | descriptiveName: 139 | descriptiveNegativeName: 140 | negativeButton: 141 | positiveButton: 142 | altNegativeButton: 143 | altPositiveButton: 144 | gravity: 0 145 | dead: 0 146 | sensitivity: 0.1 147 | snap: 0 148 | invert: 0 149 | type: 1 150 | axis: 2 151 | joyNum: 0 152 | - serializedVersion: 3 153 | m_Name: Horizontal 154 | descriptiveName: 155 | descriptiveNegativeName: 156 | negativeButton: 157 | positiveButton: 158 | altNegativeButton: 159 | altPositiveButton: 160 | gravity: 0 161 | dead: 0.19 162 | sensitivity: 1 163 | snap: 0 164 | invert: 0 165 | type: 2 166 | axis: 0 167 | joyNum: 0 168 | - serializedVersion: 3 169 | m_Name: Vertical 170 | descriptiveName: 171 | descriptiveNegativeName: 172 | negativeButton: 173 | positiveButton: 174 | altNegativeButton: 175 | altPositiveButton: 176 | gravity: 0 177 | dead: 0.19 178 | sensitivity: 1 179 | snap: 0 180 | invert: 1 181 | type: 2 182 | axis: 1 183 | joyNum: 0 184 | - serializedVersion: 3 185 | m_Name: Fire1 186 | descriptiveName: 187 | descriptiveNegativeName: 188 | negativeButton: 189 | positiveButton: joystick button 0 190 | altNegativeButton: 191 | altPositiveButton: 192 | gravity: 1000 193 | dead: 0.001 194 | sensitivity: 1000 195 | snap: 0 196 | invert: 0 197 | type: 0 198 | axis: 0 199 | joyNum: 0 200 | - serializedVersion: 3 201 | m_Name: Fire2 202 | descriptiveName: 203 | descriptiveNegativeName: 204 | negativeButton: 205 | positiveButton: joystick button 1 206 | altNegativeButton: 207 | altPositiveButton: 208 | gravity: 1000 209 | dead: 0.001 210 | sensitivity: 1000 211 | snap: 0 212 | invert: 0 213 | type: 0 214 | axis: 0 215 | joyNum: 0 216 | - serializedVersion: 3 217 | m_Name: Fire3 218 | descriptiveName: 219 | descriptiveNegativeName: 220 | negativeButton: 221 | positiveButton: joystick button 2 222 | altNegativeButton: 223 | altPositiveButton: 224 | gravity: 1000 225 | dead: 0.001 226 | sensitivity: 1000 227 | snap: 0 228 | invert: 0 229 | type: 0 230 | axis: 0 231 | joyNum: 0 232 | - serializedVersion: 3 233 | m_Name: Jump 234 | descriptiveName: 235 | descriptiveNegativeName: 236 | negativeButton: 237 | positiveButton: joystick button 3 238 | altNegativeButton: 239 | altPositiveButton: 240 | gravity: 1000 241 | dead: 0.001 242 | sensitivity: 1000 243 | snap: 0 244 | invert: 0 245 | type: 0 246 | axis: 0 247 | joyNum: 0 248 | - serializedVersion: 3 249 | m_Name: Submit 250 | descriptiveName: 251 | descriptiveNegativeName: 252 | negativeButton: 253 | positiveButton: return 254 | altNegativeButton: 255 | altPositiveButton: joystick button 0 256 | gravity: 1000 257 | dead: 0.001 258 | sensitivity: 1000 259 | snap: 0 260 | invert: 0 261 | type: 0 262 | axis: 0 263 | joyNum: 0 264 | - serializedVersion: 3 265 | m_Name: Submit 266 | descriptiveName: 267 | descriptiveNegativeName: 268 | negativeButton: 269 | positiveButton: enter 270 | altNegativeButton: 271 | altPositiveButton: space 272 | gravity: 1000 273 | dead: 0.001 274 | sensitivity: 1000 275 | snap: 0 276 | invert: 0 277 | type: 0 278 | axis: 0 279 | joyNum: 0 280 | - serializedVersion: 3 281 | m_Name: Cancel 282 | descriptiveName: 283 | descriptiveNegativeName: 284 | negativeButton: 285 | positiveButton: escape 286 | altNegativeButton: 287 | altPositiveButton: joystick button 1 288 | gravity: 1000 289 | dead: 0.001 290 | sensitivity: 1000 291 | snap: 0 292 | invert: 0 293 | type: 0 294 | axis: 0 295 | joyNum: 0 296 | -------------------------------------------------------------------------------- /UnityCaptureSample/ProjectSettings/NavMeshAreas.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!126 &1 4 | NavMeshProjectSettings: 5 | m_ObjectHideFlags: 0 6 | serializedVersion: 2 7 | areas: 8 | - name: Walkable 9 | cost: 1 10 | - name: Not Walkable 11 | cost: 1 12 | - name: Jump 13 | cost: 2 14 | - name: 15 | cost: 1 16 | - name: 17 | cost: 1 18 | - name: 19 | cost: 1 20 | - name: 21 | cost: 1 22 | - name: 23 | cost: 1 24 | - name: 25 | cost: 1 26 | - name: 27 | cost: 1 28 | - name: 29 | cost: 1 30 | - name: 31 | cost: 1 32 | - name: 33 | cost: 1 34 | - name: 35 | cost: 1 36 | - name: 37 | cost: 1 38 | - name: 39 | cost: 1 40 | - name: 41 | cost: 1 42 | - name: 43 | cost: 1 44 | - name: 45 | cost: 1 46 | - name: 47 | cost: 1 48 | - name: 49 | cost: 1 50 | - name: 51 | cost: 1 52 | - name: 53 | cost: 1 54 | - name: 55 | cost: 1 56 | - name: 57 | cost: 1 58 | - name: 59 | cost: 1 60 | - name: 61 | cost: 1 62 | - name: 63 | cost: 1 64 | - name: 65 | cost: 1 66 | - name: 67 | cost: 1 68 | - name: 69 | cost: 1 70 | - name: 71 | cost: 1 72 | m_LastAgentTypeID: -887442657 73 | m_Settings: 74 | - serializedVersion: 2 75 | agentTypeID: 0 76 | agentRadius: 0.5 77 | agentHeight: 2 78 | agentSlope: 45 79 | agentClimb: 0.75 80 | ledgeDropHeight: 0 81 | maxJumpAcrossDistance: 0 82 | minRegionArea: 2 83 | manualCellSize: 0 84 | cellSize: 0.16666667 85 | manualTileSize: 0 86 | tileSize: 256 87 | accuratePlacement: 0 88 | debug: 89 | m_Flags: 0 90 | m_SettingNames: 91 | - Humanoid 92 | -------------------------------------------------------------------------------- /UnityCaptureSample/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 | -------------------------------------------------------------------------------- /UnityCaptureSample/ProjectSettings/Physics2DSettings.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!19 &1 4 | Physics2DSettings: 5 | m_ObjectHideFlags: 0 6 | serializedVersion: 3 7 | m_Gravity: {x: 0, y: -9.81} 8 | m_DefaultMaterial: {fileID: 0} 9 | m_VelocityIterations: 8 10 | m_PositionIterations: 3 11 | m_VelocityThreshold: 1 12 | m_MaxLinearCorrection: 0.2 13 | m_MaxAngularCorrection: 8 14 | m_MaxTranslationSpeed: 100 15 | m_MaxRotationSpeed: 360 16 | m_BaumgarteScale: 0.2 17 | m_BaumgarteTimeOfImpactScale: 0.75 18 | m_TimeToSleep: 0.5 19 | m_LinearSleepTolerance: 0.01 20 | m_AngularSleepTolerance: 2 21 | m_DefaultContactOffset: 0.01 22 | m_AutoSimulation: 1 23 | m_QueriesHitTriggers: 1 24 | m_QueriesStartInColliders: 1 25 | m_ChangeStopsCallbacks: 0 26 | m_CallbacksOnDisable: 1 27 | m_AutoSyncTransforms: 1 28 | m_AlwaysShowColliders: 0 29 | m_ShowColliderSleep: 1 30 | m_ShowColliderContacts: 0 31 | m_ShowColliderAABB: 0 32 | m_ContactArrowScale: 0.2 33 | m_ColliderAwakeColor: {r: 0.5686275, g: 0.95686275, b: 0.54509807, a: 0.7529412} 34 | m_ColliderAsleepColor: {r: 0.5686275, g: 0.95686275, b: 0.54509807, a: 0.36078432} 35 | m_ColliderContactColor: {r: 1, g: 0, b: 1, a: 0.6862745} 36 | m_ColliderAABBColor: {r: 1, g: 1, b: 0, a: 0.2509804} 37 | m_LayerCollisionMatrix: ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff 38 | -------------------------------------------------------------------------------- /UnityCaptureSample/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: 14 7 | productGUID: 25ebdaf9f91a03340a849d4e2b2c5542 8 | AndroidProfiler: 0 9 | AndroidFilterTouchesWhenObscured: 0 10 | defaultScreenOrientation: 4 11 | targetDevice: 2 12 | useOnDemandResources: 0 13 | accelerometerFrequency: 60 14 | companyName: DefaultCompany 15 | productName: UnityCaptureSample 16 | defaultCursor: {fileID: 0} 17 | cursorHotspot: {x: 0, y: 0} 18 | m_SplashScreenBackgroundColor: {r: 0.13725491, g: 0.12156863, b: 0.1254902, a: 1} 19 | m_ShowUnitySplashScreen: 1 20 | m_ShowUnitySplashLogo: 1 21 | m_SplashScreenOverlayOpacity: 1 22 | m_SplashScreenAnimation: 1 23 | m_SplashScreenLogoStyle: 1 24 | m_SplashScreenDrawMode: 0 25 | m_SplashScreenBackgroundAnimationZoom: 1 26 | m_SplashScreenLogoAnimationZoom: 1 27 | m_SplashScreenBackgroundLandscapeAspect: 1 28 | m_SplashScreenBackgroundPortraitAspect: 1 29 | m_SplashScreenBackgroundLandscapeUvs: 30 | serializedVersion: 2 31 | x: 0 32 | y: 0 33 | width: 1 34 | height: 1 35 | m_SplashScreenBackgroundPortraitUvs: 36 | serializedVersion: 2 37 | x: 0 38 | y: 0 39 | width: 1 40 | height: 1 41 | m_SplashScreenLogos: [] 42 | m_VirtualRealitySplashScreen: {fileID: 0} 43 | m_HolographicTrackingLossScreen: {fileID: 0} 44 | defaultScreenWidth: 1024 45 | defaultScreenHeight: 768 46 | defaultScreenWidthWeb: 960 47 | defaultScreenHeightWeb: 600 48 | m_StereoRenderingPath: 0 49 | m_ActiveColorSpace: 0 50 | m_MTRendering: 1 51 | m_StackTraceTypes: 010000000100000001000000010000000100000001000000 52 | iosShowActivityIndicatorOnLoading: -1 53 | androidShowActivityIndicatorOnLoading: -1 54 | tizenShowActivityIndicatorOnLoading: -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: 1 64 | preserveFramebufferAlpha: 0 65 | disableDepthAndStencilBuffers: 0 66 | androidBlitType: 0 67 | defaultIsFullScreen: 1 68 | defaultIsNativeResolution: 1 69 | macRetinaSupport: 1 70 | runInBackground: 1 71 | captureSingleScreen: 0 72 | muteOtherAudioSources: 0 73 | Prepare IOS For Recording: 0 74 | Force IOS Speakers When Recording: 0 75 | deferSystemGesturesMode: 0 76 | hideHomeButton: 0 77 | submitAnalytics: 1 78 | usePlayerLog: 1 79 | bakeCollisionMeshes: 0 80 | forceSingleInstance: 0 81 | resizableWindow: 0 82 | useMacAppStoreValidation: 0 83 | macAppStoreCategory: public.app-category.games 84 | gpuSkinning: 0 85 | graphicsJobs: 0 86 | xboxPIXTextureCapture: 0 87 | xboxEnableAvatar: 0 88 | xboxEnableKinect: 0 89 | xboxEnableKinectAutoTracking: 0 90 | xboxEnableFitness: 0 91 | visibleInBackground: 1 92 | allowFullscreenSwitch: 1 93 | graphicsJobMode: 0 94 | macFullscreenMode: 2 95 | d3d11FullscreenMode: 1 96 | xboxSpeechDB: 0 97 | xboxEnableHeadOrientation: 0 98 | xboxEnableGuest: 0 99 | xboxEnablePIXSampling: 0 100 | metalFramebufferOnly: 0 101 | n3dsDisableStereoscopicView: 0 102 | n3dsEnableSharedListOpt: 1 103 | n3dsEnableVSync: 0 104 | xboxOneResolution: 0 105 | xboxOneSResolution: 0 106 | xboxOneXResolution: 3 107 | xboxOneMonoLoggingLevel: 0 108 | xboxOneLoggingLevel: 1 109 | xboxOneDisableEsram: 0 110 | xboxOnePresentImmediateThreshold: 0 111 | videoMemoryForVertexBuffers: 0 112 | psp2PowerMode: 0 113 | psp2AcquireBGM: 1 114 | wiiUTVResolution: 0 115 | wiiUGamePadMSAA: 1 116 | wiiUSupportsNunchuk: 0 117 | wiiUSupportsClassicController: 0 118 | wiiUSupportsBalanceBoard: 0 119 | wiiUSupportsMotionPlus: 0 120 | wiiUSupportsProController: 0 121 | wiiUAllowScreenCapture: 1 122 | wiiUControllerCount: 0 123 | m_SupportedAspectRatios: 124 | 4:3: 1 125 | 5:4: 1 126 | 16:10: 1 127 | 16:9: 1 128 | Others: 1 129 | bundleVersion: 1.0 130 | preloadedAssets: [] 131 | metroInputSource: 0 132 | wsaTransparentSwapchain: 0 133 | m_HolographicPauseOnTrackingLoss: 1 134 | xboxOneDisableKinectGpuReservation: 0 135 | xboxOneEnable7thCore: 0 136 | vrSettings: 137 | cardboard: 138 | depthFormat: 0 139 | enableTransitionView: 0 140 | daydream: 141 | depthFormat: 0 142 | useSustainedPerformanceMode: 0 143 | enableVideoLayer: 0 144 | useProtectedVideoMemory: 0 145 | minimumSupportedHeadTracking: 0 146 | maximumSupportedHeadTracking: 1 147 | hololens: 148 | depthFormat: 1 149 | depthBufferSharingEnabled: 0 150 | oculus: 151 | sharedDepthBuffer: 0 152 | dashSupport: 0 153 | protectGraphicsMemory: 0 154 | useHDRDisplay: 0 155 | m_ColorGamuts: 00000000 156 | targetPixelDensity: 30 157 | resolutionScalingMode: 0 158 | androidSupportedAspectRatio: 1 159 | androidMaxAspectRatio: 2.1 160 | applicationIdentifier: {} 161 | buildNumber: {} 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: 177 | serializedVersion: 2 178 | m_Bits: 238 179 | iPhoneSdkVersion: 988 180 | iOSTargetOSVersionString: 7.0 181 | tvOSSdkVersion: 0 182 | tvOSRequireExtendedGameController: 0 183 | tvOSTargetOSVersionString: 9.0 184 | uIPrerenderedIcon: 0 185 | uIRequiresPersistentWiFi: 0 186 | uIRequiresFullScreen: 1 187 | uIStatusBarHidden: 1 188 | uIExitOnSuspend: 0 189 | uIStatusBarStyle: 0 190 | iPhoneSplashScreen: {fileID: 0} 191 | iPhoneHighResSplashScreen: {fileID: 0} 192 | iPhoneTallHighResSplashScreen: {fileID: 0} 193 | iPhone47inSplashScreen: {fileID: 0} 194 | iPhone55inPortraitSplashScreen: {fileID: 0} 195 | iPhone55inLandscapeSplashScreen: {fileID: 0} 196 | iPhone58inPortraitSplashScreen: {fileID: 0} 197 | iPhone58inLandscapeSplashScreen: {fileID: 0} 198 | iPadPortraitSplashScreen: {fileID: 0} 199 | iPadHighResPortraitSplashScreen: {fileID: 0} 200 | iPadLandscapeSplashScreen: {fileID: 0} 201 | iPadHighResLandscapeSplashScreen: {fileID: 0} 202 | appleTVSplashScreen: {fileID: 0} 203 | appleTVSplashScreen2x: {fileID: 0} 204 | tvOSSmallIconLayers: [] 205 | tvOSSmallIconLayers2x: [] 206 | tvOSLargeIconLayers: [] 207 | tvOSTopShelfImageLayers: [] 208 | tvOSTopShelfImageLayers2x: [] 209 | tvOSTopShelfImageWideLayers: [] 210 | tvOSTopShelfImageWideLayers2x: [] 211 | iOSLaunchScreenType: 0 212 | iOSLaunchScreenPortrait: {fileID: 0} 213 | iOSLaunchScreenLandscape: {fileID: 0} 214 | iOSLaunchScreenBackgroundColor: 215 | serializedVersion: 2 216 | rgba: 0 217 | iOSLaunchScreenFillPct: 100 218 | iOSLaunchScreenSize: 100 219 | iOSLaunchScreenCustomXibPath: 220 | iOSLaunchScreeniPadType: 0 221 | iOSLaunchScreeniPadImage: {fileID: 0} 222 | iOSLaunchScreeniPadBackgroundColor: 223 | serializedVersion: 2 224 | rgba: 0 225 | iOSLaunchScreeniPadFillPct: 100 226 | iOSLaunchScreeniPadSize: 100 227 | iOSLaunchScreeniPadCustomXibPath: 228 | iOSUseLaunchScreenStoryboard: 0 229 | iOSLaunchScreenCustomStoryboardPath: 230 | iOSDeviceRequirements: [] 231 | iOSURLSchemes: [] 232 | iOSBackgroundModes: 0 233 | iOSMetalForceHardShadows: 0 234 | metalEditorSupport: 1 235 | metalAPIValidation: 1 236 | iOSRenderExtraFrameOnPause: 0 237 | appleDeveloperTeamID: 238 | iOSManualSigningProvisioningProfileID: 239 | tvOSManualSigningProvisioningProfileID: 240 | appleEnableAutomaticSigning: 0 241 | clonedFromGUID: 00000000000000000000000000000000 242 | AndroidTargetDevice: 0 243 | AndroidSplashScreenScale: 0 244 | androidSplashScreen: {fileID: 0} 245 | AndroidKeystoreName: 246 | AndroidKeyaliasName: 247 | AndroidTVCompatibility: 1 248 | AndroidIsGame: 1 249 | AndroidEnableTango: 0 250 | androidEnableBanner: 1 251 | androidUseLowAccuracyLocation: 0 252 | m_AndroidBanners: 253 | - width: 320 254 | height: 180 255 | banner: {fileID: 0} 256 | androidGamepadSupportLevel: 0 257 | resolutionDialogBanner: {fileID: 0} 258 | m_BuildTargetIcons: [] 259 | m_BuildTargetBatching: [] 260 | m_BuildTargetGraphicsAPIs: [] 261 | m_BuildTargetVRSettings: [] 262 | m_BuildTargetEnableVuforiaSettings: [] 263 | openGLRequireES31: 0 264 | openGLRequireES31AEP: 0 265 | m_TemplateCustomTags: {} 266 | mobileMTRendering: 267 | iPhone: 1 268 | tvOS: 1 269 | m_BuildTargetGroupLightmapEncodingQuality: [] 270 | wiiUTitleID: 0005000011000000 271 | wiiUGroupID: 00010000 272 | wiiUCommonSaveSize: 4096 273 | wiiUAccountSaveSize: 2048 274 | wiiUOlvAccessKey: 0 275 | wiiUTinCode: 0 276 | wiiUJoinGameId: 0 277 | wiiUJoinGameModeMask: 0000000000000000 278 | wiiUCommonBossSize: 0 279 | wiiUAccountBossSize: 0 280 | wiiUAddOnUniqueIDs: [] 281 | wiiUMainThreadStackSize: 3072 282 | wiiULoaderThreadStackSize: 1024 283 | wiiUSystemHeapSize: 128 284 | wiiUTVStartupScreen: {fileID: 0} 285 | wiiUGamePadStartupScreen: {fileID: 0} 286 | wiiUDrcBufferDisabled: 0 287 | wiiUProfilerLibPath: 288 | playModeTestRunnerEnabled: 0 289 | actionOnDotNetUnhandledException: 1 290 | enableInternalProfiler: 0 291 | logObjCUncaughtExceptions: 1 292 | enableCrashReportAPI: 0 293 | cameraUsageDescription: 294 | locationUsageDescription: 295 | microphoneUsageDescription: 296 | switchNetLibKey: 297 | switchSocketMemoryPoolSize: 6144 298 | switchSocketAllocatorPoolSize: 128 299 | switchSocketConcurrencyLimit: 14 300 | switchScreenResolutionBehavior: 2 301 | switchUseCPUProfiler: 0 302 | switchApplicationID: 0x01004b9000490000 303 | switchNSODependencies: 304 | switchTitleNames_0: 305 | switchTitleNames_1: 306 | switchTitleNames_2: 307 | switchTitleNames_3: 308 | switchTitleNames_4: 309 | switchTitleNames_5: 310 | switchTitleNames_6: 311 | switchTitleNames_7: 312 | switchTitleNames_8: 313 | switchTitleNames_9: 314 | switchTitleNames_10: 315 | switchTitleNames_11: 316 | switchTitleNames_12: 317 | switchTitleNames_13: 318 | switchTitleNames_14: 319 | switchPublisherNames_0: 320 | switchPublisherNames_1: 321 | switchPublisherNames_2: 322 | switchPublisherNames_3: 323 | switchPublisherNames_4: 324 | switchPublisherNames_5: 325 | switchPublisherNames_6: 326 | switchPublisherNames_7: 327 | switchPublisherNames_8: 328 | switchPublisherNames_9: 329 | switchPublisherNames_10: 330 | switchPublisherNames_11: 331 | switchPublisherNames_12: 332 | switchPublisherNames_13: 333 | switchPublisherNames_14: 334 | switchIcons_0: {fileID: 0} 335 | switchIcons_1: {fileID: 0} 336 | switchIcons_2: {fileID: 0} 337 | switchIcons_3: {fileID: 0} 338 | switchIcons_4: {fileID: 0} 339 | switchIcons_5: {fileID: 0} 340 | switchIcons_6: {fileID: 0} 341 | switchIcons_7: {fileID: 0} 342 | switchIcons_8: {fileID: 0} 343 | switchIcons_9: {fileID: 0} 344 | switchIcons_10: {fileID: 0} 345 | switchIcons_11: {fileID: 0} 346 | switchIcons_12: {fileID: 0} 347 | switchIcons_13: {fileID: 0} 348 | switchIcons_14: {fileID: 0} 349 | switchSmallIcons_0: {fileID: 0} 350 | switchSmallIcons_1: {fileID: 0} 351 | switchSmallIcons_2: {fileID: 0} 352 | switchSmallIcons_3: {fileID: 0} 353 | switchSmallIcons_4: {fileID: 0} 354 | switchSmallIcons_5: {fileID: 0} 355 | switchSmallIcons_6: {fileID: 0} 356 | switchSmallIcons_7: {fileID: 0} 357 | switchSmallIcons_8: {fileID: 0} 358 | switchSmallIcons_9: {fileID: 0} 359 | switchSmallIcons_10: {fileID: 0} 360 | switchSmallIcons_11: {fileID: 0} 361 | switchSmallIcons_12: {fileID: 0} 362 | switchSmallIcons_13: {fileID: 0} 363 | switchSmallIcons_14: {fileID: 0} 364 | switchManualHTML: 365 | switchAccessibleURLs: 366 | switchLegalInformation: 367 | switchMainThreadStackSize: 1048576 368 | switchPresenceGroupId: 369 | switchLogoHandling: 0 370 | switchReleaseVersion: 0 371 | switchDisplayVersion: 1.0.0 372 | switchStartupUserAccount: 0 373 | switchTouchScreenUsage: 0 374 | switchSupportedLanguagesMask: 0 375 | switchLogoType: 0 376 | switchApplicationErrorCodeCategory: 377 | switchUserAccountSaveDataSize: 0 378 | switchUserAccountSaveDataJournalSize: 0 379 | switchApplicationAttribute: 0 380 | switchCardSpecSize: -1 381 | switchCardSpecClock: -1 382 | switchRatingsMask: 0 383 | switchRatingsInt_0: 0 384 | switchRatingsInt_1: 0 385 | switchRatingsInt_2: 0 386 | switchRatingsInt_3: 0 387 | switchRatingsInt_4: 0 388 | switchRatingsInt_5: 0 389 | switchRatingsInt_6: 0 390 | switchRatingsInt_7: 0 391 | switchRatingsInt_8: 0 392 | switchRatingsInt_9: 0 393 | switchRatingsInt_10: 0 394 | switchRatingsInt_11: 0 395 | switchLocalCommunicationIds_0: 396 | switchLocalCommunicationIds_1: 397 | switchLocalCommunicationIds_2: 398 | switchLocalCommunicationIds_3: 399 | switchLocalCommunicationIds_4: 400 | switchLocalCommunicationIds_5: 401 | switchLocalCommunicationIds_6: 402 | switchLocalCommunicationIds_7: 403 | switchParentalControl: 0 404 | switchAllowsScreenshot: 1 405 | switchAllowsVideoCapturing: 1 406 | switchAllowsRuntimeAddOnContentInstall: 0 407 | switchDataLossConfirmation: 0 408 | switchSupportedNpadStyles: 3 409 | switchSocketConfigEnabled: 0 410 | switchTcpInitialSendBufferSize: 32 411 | switchTcpInitialReceiveBufferSize: 64 412 | switchTcpAutoSendBufferSizeMax: 256 413 | switchTcpAutoReceiveBufferSizeMax: 256 414 | switchUdpSendBufferSize: 9 415 | switchUdpReceiveBufferSize: 42 416 | switchSocketBufferEfficiency: 4 417 | switchSocketInitializeEnabled: 1 418 | switchNetworkInterfaceManagerInitializeEnabled: 1 419 | switchPlayerConnectionEnabled: 1 420 | ps4NPAgeRating: 12 421 | ps4NPTitleSecret: 422 | ps4NPTrophyPackPath: 423 | ps4ParentalLevel: 11 424 | ps4ContentID: ED1633-NPXX51362_00-0000000000000000 425 | ps4Category: 0 426 | ps4MasterVersion: 01.00 427 | ps4AppVersion: 01.00 428 | ps4AppType: 0 429 | ps4ParamSfxPath: 430 | ps4VideoOutPixelFormat: 0 431 | ps4VideoOutInitialWidth: 1920 432 | ps4VideoOutBaseModeInitialWidth: 1920 433 | ps4VideoOutReprojectionRate: 60 434 | ps4PronunciationXMLPath: 435 | ps4PronunciationSIGPath: 436 | ps4BackgroundImagePath: 437 | ps4StartupImagePath: 438 | ps4StartupImagesFolder: 439 | ps4IconImagesFolder: 440 | ps4SaveDataImagePath: 441 | ps4SdkOverride: 442 | ps4BGMPath: 443 | ps4ShareFilePath: 444 | ps4ShareOverlayImagePath: 445 | ps4PrivacyGuardImagePath: 446 | ps4NPtitleDatPath: 447 | ps4RemotePlayKeyAssignment: -1 448 | ps4RemotePlayKeyMappingDir: 449 | ps4PlayTogetherPlayerCount: 0 450 | ps4EnterButtonAssignment: 1 451 | ps4ApplicationParam1: 0 452 | ps4ApplicationParam2: 0 453 | ps4ApplicationParam3: 0 454 | ps4ApplicationParam4: 0 455 | ps4DownloadDataSize: 0 456 | ps4GarlicHeapSize: 2048 457 | ps4ProGarlicHeapSize: 2560 458 | ps4Passcode: frAQBc8Wsa1xVPfvJcrgRYwTiizs2trQ 459 | ps4pnSessions: 1 460 | ps4pnPresence: 1 461 | ps4pnFriends: 1 462 | ps4pnGameCustomData: 1 463 | playerPrefsSupport: 0 464 | restrictedAudioUsageRights: 0 465 | ps4UseResolutionFallback: 0 466 | ps4ReprojectionSupport: 0 467 | ps4UseAudio3dBackend: 0 468 | ps4SocialScreenEnabled: 0 469 | ps4ScriptOptimizationLevel: 0 470 | ps4Audio3dVirtualSpeakerCount: 14 471 | ps4attribCpuUsage: 0 472 | ps4PatchPkgPath: 473 | ps4PatchLatestPkgPath: 474 | ps4PatchChangeinfoPath: 475 | ps4PatchDayOne: 0 476 | ps4attribUserManagement: 0 477 | ps4attribMoveSupport: 0 478 | ps4attrib3DSupport: 0 479 | ps4attribShareSupport: 0 480 | ps4attribExclusiveVR: 0 481 | ps4disableAutoHideSplash: 0 482 | ps4videoRecordingFeaturesUsed: 0 483 | ps4contentSearchFeaturesUsed: 0 484 | ps4attribEyeToEyeDistanceSettingVR: 0 485 | ps4IncludedModules: [] 486 | monoEnv: 487 | psp2Splashimage: {fileID: 0} 488 | psp2NPTrophyPackPath: 489 | psp2NPSupportGBMorGJP: 0 490 | psp2NPAgeRating: 12 491 | psp2NPTitleDatPath: 492 | psp2NPCommsID: 493 | psp2NPCommunicationsID: 494 | psp2NPCommsPassphrase: 495 | psp2NPCommsSig: 496 | psp2ParamSfxPath: 497 | psp2ManualPath: 498 | psp2LiveAreaGatePath: 499 | psp2LiveAreaBackroundPath: 500 | psp2LiveAreaPath: 501 | psp2LiveAreaTrialPath: 502 | psp2PatchChangeInfoPath: 503 | psp2PatchOriginalPackage: 504 | psp2PackagePassword: F69AzBlax3CF3EDNhm3soLBPh71Yexui 505 | psp2KeystoneFile: 506 | psp2MemoryExpansionMode: 0 507 | psp2DRMType: 0 508 | psp2StorageType: 0 509 | psp2MediaCapacity: 0 510 | psp2DLCConfigPath: 511 | psp2ThumbnailPath: 512 | psp2BackgroundPath: 513 | psp2SoundPath: 514 | psp2TrophyCommId: 515 | psp2TrophyPackagePath: 516 | psp2PackagedResourcesPath: 517 | psp2SaveDataQuota: 10240 518 | psp2ParentalLevel: 1 519 | psp2ShortTitle: Not Set 520 | psp2ContentID: IV0000-ABCD12345_00-0123456789ABCDEF 521 | psp2Category: 0 522 | psp2MasterVersion: 01.00 523 | psp2AppVersion: 01.00 524 | psp2TVBootMode: 0 525 | psp2EnterButtonAssignment: 2 526 | psp2TVDisableEmu: 0 527 | psp2AllowTwitterDialog: 1 528 | psp2Upgradable: 0 529 | psp2HealthWarning: 0 530 | psp2UseLibLocation: 0 531 | psp2InfoBarOnStartup: 0 532 | psp2InfoBarColor: 0 533 | psp2ScriptOptimizationLevel: 0 534 | psmSplashimage: {fileID: 0} 535 | splashScreenBackgroundSourceLandscape: {fileID: 0} 536 | splashScreenBackgroundSourcePortrait: {fileID: 0} 537 | spritePackerPolicy: 538 | webGLMemorySize: 256 539 | webGLExceptionSupport: 1 540 | webGLNameFilesAsHashes: 0 541 | webGLDataCaching: 0 542 | webGLDebugSymbols: 0 543 | webGLEmscriptenArgs: 544 | webGLModulesDirectory: 545 | webGLTemplate: APPLICATION:Default 546 | webGLAnalyzeBuildSize: 0 547 | webGLUseEmbeddedResources: 0 548 | webGLUseWasm: 0 549 | webGLCompressionFormat: 1 550 | scriptingDefineSymbols: {} 551 | platformArchitecture: {} 552 | scriptingBackend: {} 553 | incrementalIl2cppBuild: {} 554 | additionalIl2CppArgs: 555 | scriptingRuntimeVersion: 0 556 | apiCompatibilityLevelPerPlatform: {} 557 | m_RenderingPath: 1 558 | m_MobileRenderingPath: 1 559 | metroPackageName: UnityCaptureSample 560 | metroPackageVersion: 561 | metroCertificatePath: 562 | metroCertificatePassword: 563 | metroCertificateSubject: 564 | metroCertificateIssuer: 565 | metroCertificateNotAfter: 0000000000000000 566 | metroApplicationDescription: UnityCaptureSample 567 | wsaImages: {} 568 | metroTileShortName: 569 | metroCommandLineArgsFile: 570 | metroTileShowName: 0 571 | metroMediumTileShowName: 0 572 | metroLargeTileShowName: 0 573 | metroWideTileShowName: 0 574 | metroDefaultTileSize: 1 575 | metroTileForegroundText: 2 576 | metroTileBackgroundColor: {r: 0.13333334, g: 0.17254902, b: 0.21568628, a: 0} 577 | metroSplashScreenBackgroundColor: {r: 0.12941177, g: 0.17254902, b: 0.21568628, 578 | a: 1} 579 | metroSplashScreenUseBackgroundColor: 0 580 | platformCapabilities: {} 581 | metroFTAName: 582 | metroFTAFileTypes: [] 583 | metroProtocolName: 584 | metroCompilationOverrides: 1 585 | tizenProductDescription: 586 | tizenProductURL: 587 | tizenSigningProfileName: 588 | tizenGPSPermissions: 0 589 | tizenMicrophonePermissions: 0 590 | tizenDeploymentTarget: 591 | tizenDeploymentTargetType: -1 592 | tizenMinOSVersion: 1 593 | n3dsUseExtSaveData: 0 594 | n3dsCompressStaticMem: 1 595 | n3dsExtSaveDataNumber: 0x12345 596 | n3dsStackSize: 131072 597 | n3dsTargetPlatform: 2 598 | n3dsRegion: 7 599 | n3dsMediaSize: 0 600 | n3dsLogoStyle: 3 601 | n3dsTitle: GameName 602 | n3dsProductCode: 603 | n3dsApplicationId: 0xFF3FF 604 | XboxOneProductId: 605 | XboxOneUpdateKey: 606 | XboxOneSandboxId: 607 | XboxOneContentId: 608 | XboxOneTitleId: 609 | XboxOneSCId: 610 | XboxOneGameOsOverridePath: 611 | XboxOnePackagingOverridePath: 612 | XboxOneAppManifestOverridePath: 613 | XboxOnePackageEncryption: 0 614 | XboxOnePackageUpdateGranularity: 2 615 | XboxOneDescription: 616 | XboxOneLanguage: 617 | - enus 618 | XboxOneCapability: [] 619 | XboxOneGameRating: {} 620 | XboxOneIsContentPackage: 0 621 | XboxOneEnableGPUVariability: 0 622 | XboxOneSockets: {} 623 | XboxOneSplashScreen: {fileID: 0} 624 | XboxOneAllowedProductIds: [] 625 | XboxOnePersistentLocalStorageSize: 0 626 | xboxOneScriptCompiler: 0 627 | vrEditorSettings: 628 | daydream: 629 | daydreamIconForeground: {fileID: 0} 630 | daydreamIconBackground: {fileID: 0} 631 | cloudServicesEnabled: {} 632 | facebookSdkVersion: 7.9.4 633 | apiCompatibilityLevel: 2 634 | cloudProjectId: 635 | projectName: 636 | organizationId: 637 | cloudEnabled: 0 638 | enableNativePlatformBackendsForNewInputSystem: 0 639 | disableOldInputManagerSupport: 0 640 | -------------------------------------------------------------------------------- /UnityCaptureSample/ProjectSettings/ProjectVersion.txt: -------------------------------------------------------------------------------- 1 | m_EditorVersion: 2017.3.1p1 2 | -------------------------------------------------------------------------------- /UnityCaptureSample/ProjectSettings/QualitySettings.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!47 &1 4 | QualitySettings: 5 | m_ObjectHideFlags: 0 6 | serializedVersion: 5 7 | m_CurrentQuality: 5 8 | m_QualitySettings: 9 | - serializedVersion: 2 10 | name: Very Low 11 | pixelLightCount: 0 12 | shadows: 0 13 | shadowResolution: 0 14 | shadowProjection: 1 15 | shadowCascades: 1 16 | shadowDistance: 15 17 | shadowNearPlaneOffset: 3 18 | shadowCascade2Split: 0.33333334 19 | shadowCascade4Split: {x: 0.06666667, y: 0.2, z: 0.46666667} 20 | shadowmaskMode: 0 21 | blendWeights: 1 22 | textureQuality: 1 23 | anisotropicTextures: 0 24 | antiAliasing: 0 25 | softParticles: 0 26 | softVegetation: 0 27 | realtimeReflectionProbes: 0 28 | billboardsFaceCameraPosition: 0 29 | vSyncCount: 0 30 | lodBias: 0.3 31 | maximumLODLevel: 0 32 | particleRaycastBudget: 4 33 | asyncUploadTimeSlice: 2 34 | asyncUploadBufferSize: 4 35 | resolutionScalingFixedDPIFactor: 1 36 | excludedTargetPlatforms: [] 37 | - serializedVersion: 2 38 | name: Low 39 | pixelLightCount: 0 40 | shadows: 0 41 | shadowResolution: 0 42 | shadowProjection: 1 43 | shadowCascades: 1 44 | shadowDistance: 20 45 | shadowNearPlaneOffset: 3 46 | shadowCascade2Split: 0.33333334 47 | shadowCascade4Split: {x: 0.06666667, y: 0.2, z: 0.46666667} 48 | shadowmaskMode: 0 49 | blendWeights: 2 50 | textureQuality: 0 51 | anisotropicTextures: 0 52 | antiAliasing: 0 53 | softParticles: 0 54 | softVegetation: 0 55 | realtimeReflectionProbes: 0 56 | billboardsFaceCameraPosition: 0 57 | vSyncCount: 0 58 | lodBias: 0.4 59 | maximumLODLevel: 0 60 | particleRaycastBudget: 16 61 | asyncUploadTimeSlice: 2 62 | asyncUploadBufferSize: 4 63 | resolutionScalingFixedDPIFactor: 1 64 | excludedTargetPlatforms: [] 65 | - serializedVersion: 2 66 | name: Medium 67 | pixelLightCount: 1 68 | shadows: 1 69 | shadowResolution: 0 70 | shadowProjection: 1 71 | shadowCascades: 1 72 | shadowDistance: 20 73 | shadowNearPlaneOffset: 3 74 | shadowCascade2Split: 0.33333334 75 | shadowCascade4Split: {x: 0.06666667, y: 0.2, z: 0.46666667} 76 | shadowmaskMode: 0 77 | blendWeights: 2 78 | textureQuality: 0 79 | anisotropicTextures: 1 80 | antiAliasing: 0 81 | softParticles: 0 82 | softVegetation: 0 83 | realtimeReflectionProbes: 0 84 | billboardsFaceCameraPosition: 0 85 | vSyncCount: 1 86 | lodBias: 0.7 87 | maximumLODLevel: 0 88 | particleRaycastBudget: 64 89 | asyncUploadTimeSlice: 2 90 | asyncUploadBufferSize: 4 91 | resolutionScalingFixedDPIFactor: 1 92 | excludedTargetPlatforms: [] 93 | - serializedVersion: 2 94 | name: High 95 | pixelLightCount: 2 96 | shadows: 2 97 | shadowResolution: 1 98 | shadowProjection: 1 99 | shadowCascades: 2 100 | shadowDistance: 40 101 | shadowNearPlaneOffset: 3 102 | shadowCascade2Split: 0.33333334 103 | shadowCascade4Split: {x: 0.06666667, y: 0.2, z: 0.46666667} 104 | shadowmaskMode: 1 105 | blendWeights: 2 106 | textureQuality: 0 107 | anisotropicTextures: 1 108 | antiAliasing: 0 109 | softParticles: 0 110 | softVegetation: 1 111 | realtimeReflectionProbes: 1 112 | billboardsFaceCameraPosition: 1 113 | vSyncCount: 1 114 | lodBias: 1 115 | maximumLODLevel: 0 116 | particleRaycastBudget: 256 117 | asyncUploadTimeSlice: 2 118 | asyncUploadBufferSize: 4 119 | resolutionScalingFixedDPIFactor: 1 120 | excludedTargetPlatforms: [] 121 | - serializedVersion: 2 122 | name: Very High 123 | pixelLightCount: 3 124 | shadows: 2 125 | shadowResolution: 2 126 | shadowProjection: 1 127 | shadowCascades: 2 128 | shadowDistance: 70 129 | shadowNearPlaneOffset: 3 130 | shadowCascade2Split: 0.33333334 131 | shadowCascade4Split: {x: 0.06666667, y: 0.2, z: 0.46666667} 132 | shadowmaskMode: 1 133 | blendWeights: 4 134 | textureQuality: 0 135 | anisotropicTextures: 2 136 | antiAliasing: 2 137 | softParticles: 1 138 | softVegetation: 1 139 | realtimeReflectionProbes: 1 140 | billboardsFaceCameraPosition: 1 141 | vSyncCount: 1 142 | lodBias: 1.5 143 | maximumLODLevel: 0 144 | particleRaycastBudget: 1024 145 | asyncUploadTimeSlice: 2 146 | asyncUploadBufferSize: 4 147 | resolutionScalingFixedDPIFactor: 1 148 | excludedTargetPlatforms: [] 149 | - serializedVersion: 2 150 | name: Ultra 151 | pixelLightCount: 4 152 | shadows: 2 153 | shadowResolution: 2 154 | shadowProjection: 1 155 | shadowCascades: 4 156 | shadowDistance: 150 157 | shadowNearPlaneOffset: 3 158 | shadowCascade2Split: 0.33333334 159 | shadowCascade4Split: {x: 0.06666667, y: 0.2, z: 0.46666667} 160 | shadowmaskMode: 1 161 | blendWeights: 4 162 | textureQuality: 0 163 | anisotropicTextures: 2 164 | antiAliasing: 2 165 | softParticles: 1 166 | softVegetation: 1 167 | realtimeReflectionProbes: 1 168 | billboardsFaceCameraPosition: 1 169 | vSyncCount: 1 170 | lodBias: 2 171 | maximumLODLevel: 0 172 | particleRaycastBudget: 4096 173 | asyncUploadTimeSlice: 2 174 | asyncUploadBufferSize: 4 175 | resolutionScalingFixedDPIFactor: 1 176 | excludedTargetPlatforms: [] 177 | m_PerPlatformDefaultQuality: 178 | Android: 2 179 | Nintendo 3DS: 5 180 | Nintendo Switch: 5 181 | PS4: 5 182 | PSM: 5 183 | PSP2: 2 184 | Standalone: 5 185 | Tizen: 2 186 | WebGL: 3 187 | WiiU: 5 188 | Windows Store Apps: 5 189 | XboxOne: 5 190 | iPhone: 2 191 | tvOS: 2 192 | -------------------------------------------------------------------------------- /UnityCaptureSample/ProjectSettings/TagManager.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!78 &1 4 | TagManager: 5 | serializedVersion: 2 6 | tags: [] 7 | layers: 8 | - Default 9 | - TransparentFX 10 | - Ignore Raycast 11 | - 12 | - Water 13 | - UI 14 | - 15 | - 16 | - 17 | - 18 | - 19 | - 20 | - 21 | - 22 | - 23 | - 24 | - 25 | - 26 | - 27 | - 28 | - 29 | - 30 | - 31 | - 32 | - 33 | - 34 | - 35 | - 36 | - 37 | - 38 | - 39 | - 40 | m_SortingLayers: 41 | - name: Default 42 | uniqueID: 0 43 | locked: 0 44 | -------------------------------------------------------------------------------- /UnityCaptureSample/ProjectSettings/TimeManager.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!5 &1 4 | TimeManager: 5 | m_ObjectHideFlags: 0 6 | Fixed Timestep: 0.02 7 | Maximum Allowed Timestep: 0.33333334 8 | m_TimeScale: 1 9 | Maximum Particle Timestep: 0.03 10 | -------------------------------------------------------------------------------- /UnityCaptureSample/ProjectSettings/UnityConnectSettings.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!310 &1 4 | UnityConnectSettings: 5 | m_ObjectHideFlags: 0 6 | m_Enabled: 0 7 | m_TestMode: 0 8 | m_TestEventUrl: 9 | m_TestConfigUrl: 10 | m_TestInitMode: 0 11 | CrashReportingSettings: 12 | m_EventUrl: https://perf-events.cloud.unity3d.com/api/events/crashes 13 | m_NativeEventUrl: https://perf-events.cloud.unity3d.com/symbolicate 14 | m_Enabled: 0 15 | m_CaptureEditorExceptions: 1 16 | UnityPurchasingSettings: 17 | m_Enabled: 0 18 | m_TestMode: 0 19 | UnityAnalyticsSettings: 20 | m_Enabled: 0 21 | m_InitializeOnStartup: 1 22 | m_TestMode: 0 23 | m_TestEventUrl: 24 | m_TestConfigUrl: 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 | --------------------------------------------------------------------------------