├── .gitignore ├── README.md └── src ├── .cproject ├── .project ├── RenderingPlugin ├── RenderingPlugin.cpp ├── RenderingPluginGLES.cpp ├── UnityPluginInterface.h ├── VisualStudio2008 │ ├── RenderingPlugin.sln │ └── RenderingPlugin.vcproj ├── VisualStudio2013 │ ├── RenderingPlugin.sln │ └── RenderingPlugin.vcxproj ├── WSAVisualStudio2012 │ ├── ReadMe.txt │ ├── RenderingPlugin.sln │ ├── RenderingPlugin.vcxproj │ ├── RenderingPlugin.vcxproj.filters │ ├── SimplePixelShader.hlsl │ ├── SimpleVertexShader.hlsl │ └── dllmain.cpp └── Xcode3 │ ├── Info.plist │ └── RenderingPlugin.xcodeproj │ └── project.pbxproj ├── Unity4Project ├── Assets │ ├── Editor │ │ └── MyBuildPostprocessor.cs │ ├── Plugins │ │ ├── Android │ │ │ └── libRenderingPlugin.so │ │ ├── Metro │ │ │ ├── ARM │ │ │ │ └── RenderingPlugin.dll │ │ │ └── x86 │ │ │ │ └── RenderingPlugin.dll │ │ ├── RenderingPlugin.bundle │ │ │ └── Contents │ │ │ │ ├── Info.plist │ │ │ │ └── MacOS │ │ │ │ └── RenderingPlugin │ │ ├── RenderingPlugin.dll │ │ ├── iOS │ │ │ └── MyAppController.mm │ │ ├── x86 │ │ │ └── libRenderingPlugin.so │ │ └── x86_64 │ │ │ └── libRenderingPlugin.so │ ├── StreamingAssets │ │ ├── SimplePixelShader.cso │ │ └── SimpleVertexShader.cso │ ├── UseRenderingPlugin.cs │ └── scene.unity └── ProjectSettings │ ├── AudioManager.asset │ ├── DynamicsManager.asset │ ├── EditorSettings.asset │ ├── InputManager.asset │ ├── NavMeshAreas.asset │ ├── NavMeshLayers.asset │ ├── NetworkManager.asset │ ├── ProjectSettings.asset │ ├── QualitySettings.asset │ ├── TagManager.asset │ └── TimeManager.asset └── Unity5Project ├── Assets ├── Editor │ └── MyBuildPostprocessor.cs ├── Plugins │ ├── Android │ │ └── libRenderingPlugin.so │ ├── Metro │ │ ├── ARM │ │ │ └── RenderingPlugin.dll │ │ └── x86 │ │ │ └── RenderingPlugin.dll │ ├── RenderingPlugin.bundle │ │ └── Contents │ │ │ ├── Info.plist │ │ │ └── MacOS │ │ │ └── RenderingPlugin │ ├── RenderingPlugin.dll │ ├── iOS │ │ └── MyAppController.mm │ ├── x86 │ │ └── libRenderingPlugin.so │ └── x86_64 │ │ └── libRenderingPlugin.so ├── StreamingAssets │ ├── SimplePixelShader.cso │ └── SimpleVertexShader.cso ├── UseRenderingPlugin.cs └── scene.unity └── ProjectSettings ├── AudioManager.asset ├── DynamicsManager.asset ├── EditorBuildSettings.asset ├── EditorSettings.asset ├── GraphicsSettings.asset ├── InputManager.asset ├── NavMeshAreas.asset ├── NavMeshLayers.asset ├── NetworkManager.asset ├── Physics2DSettings.asset ├── ProjectSettings.asset ├── ProjectVersion.txt ├── QualitySettings.asset ├── TagManager.asset └── TimeManager.asset /.gitignore: -------------------------------------------------------------------------------- 1 | #================ 2 | # Unity generated 3 | #================ 4 | Temp/ 5 | Library/ 6 | # Exclude always-generated Visual Studio / MonoDevelop project files. 7 | src/Unity5Project/*.sln 8 | src/Unity5Project/*.csproj 9 | 10 | 11 | #================ 12 | # Xcode 6 / OS X 13 | #================ 14 | 15 | .DS_Store 16 | xcuserdata/ 17 | 18 | #================ 19 | # Visual Studio 20 | #================ 21 | 22 | ## Ignore Visual Studio temporary files, build results, and 23 | ## files generated by popular Visual Studio add-ons. 24 | 25 | # User-specific files 26 | *.suo 27 | *.user 28 | *.sln.docstates 29 | 30 | # Build results 31 | [Dd]ebug/ 32 | [Rr]elease/ 33 | x64/ 34 | build/ 35 | [Bb]in/ 36 | [Oo]bj/ 37 | 38 | # MSTest test Results 39 | [Tt]est[Rr]esult*/ 40 | [Bb]uild[Ll]og.* 41 | 42 | *_i.c 43 | *_p.c 44 | *.ilk 45 | *.meta 46 | *.obj 47 | *.pch 48 | *.pdb 49 | *.pgc 50 | *.pgd 51 | *.rsp 52 | *.sbr 53 | *.tlb 54 | *.tli 55 | *.tlh 56 | *.tmp 57 | *.tmp_proj 58 | *.log 59 | *.vspscc 60 | *.vssscc 61 | .builds 62 | *.pidb 63 | *.log 64 | *.scc 65 | 66 | # Visual C++ cache files 67 | ipch/ 68 | *.aps 69 | *.ncb 70 | *.opensdf 71 | *.sdf 72 | *.cachefile 73 | 74 | # Visual Studio profiler 75 | *.psess 76 | *.vsp 77 | *.vspx 78 | 79 | # Guidance Automation Toolkit 80 | *.gpState 81 | 82 | # ReSharper is a .NET coding add-in 83 | _ReSharper*/ 84 | *.[Rr]e[Ss]harper 85 | 86 | # Click-Once directory 87 | publish/ 88 | 89 | # Publish Web Output 90 | *.Publish.xml 91 | *.pubxml 92 | *.publishproj 93 | 94 | # NuGet Packages Directory 95 | ## TODO: If you have NuGet Package Restore enabled, uncomment the next line 96 | #packages/ 97 | 98 | # Windows Azure Build Output 99 | csx 100 | *.build.csdef 101 | 102 | # Windows Store app package directory 103 | AppPackages/ 104 | 105 | # Others 106 | sql/ 107 | *.Cache 108 | ClientBin/ 109 | [Ss]tyle[Cc]op.* 110 | ~$* 111 | *~ 112 | *.dbmdl 113 | *.[Pp]ublish.xml 114 | *.pfx 115 | *.publishsettings 116 | 117 | # RIA/Silverlight projects 118 | Generated_Code/ 119 | 120 | # Backup & report files from converting an old project file to a newer 121 | # Visual Studio version. Backup files are not needed, because we have git ;-) 122 | _UpgradeReport_Files/ 123 | Backup*/ 124 | UpgradeLog*.XML 125 | UpgradeLog*.htm 126 | 127 | # SQL Server files 128 | App_Data/*.mdf 129 | App_Data/*.ldf 130 | 131 | #================ 132 | # OS detritus 133 | #================ 134 | 135 | # Windows image file caches 136 | Thumbs.db 137 | ehthumbs.db 138 | 139 | # Folder config file 140 | Desktop.ini 141 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | unity-render-native 2 | === 3 | A simple native C++ rendering plugin for Unity 5. Based on the [sample][1] from 4 | the documentation for Unity's [Native Plugin Interface][2]. 5 | 6 | [1]: http://docs.unity3d.com/Manual/NativePluginInterface.html 7 | [2]: http://docs.unity3d.com/Manual/NativePluginInterface.html 8 | -------------------------------------------------------------------------------- /src/.cproject: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 36 | 37 | 43 | 44 | 46 | 47 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | 94 | 95 | 100 | 101 | 103 | 104 | 110 | 111 | 112 | 113 | 114 | 115 | 116 | 117 | 118 | 119 | 120 | 121 | 122 | 123 | 124 | 125 | 126 | 127 | 128 | 129 | 130 | 131 | 132 | 133 | 134 | 135 | 136 | 137 | 138 | 139 | 140 | 141 | 142 | 143 | 144 | 145 | 151 | 152 | 158 | 159 | 161 | 162 | 169 | 170 | 171 | 172 | 173 | 174 | 175 | 176 | 177 | 178 | 179 | 180 | 181 | 182 | 183 | 184 | 185 | 186 | 187 | 188 | 189 | 190 | 191 | 192 | 193 | 194 | 195 | 196 | 197 | 198 | 199 | 200 | 201 | 202 | 203 | 204 | 210 | 211 | 217 | 218 | 220 | 221 | 228 | 229 | 230 | 231 | 232 | 233 | 234 | 235 | 236 | 237 | 238 | 239 | 240 | 241 | 242 | 243 | 244 | 245 | 246 | 247 | 248 | 249 | 250 | 251 | 252 | 253 | 254 | 255 | 256 | 257 | 258 | 259 | 260 | 261 | 262 | 263 | 264 | 265 | 266 | -------------------------------------------------------------------------------- /src/.project: -------------------------------------------------------------------------------- 1 | 2 | 3 | RenderingPlugin 4 | 5 | 6 | 7 | 8 | 9 | org.eclipse.cdt.managedbuilder.core.genmakebuilder 10 | clean,full,incremental, 11 | 12 | 13 | 14 | 15 | org.eclipse.cdt.managedbuilder.core.ScannerConfigBuilder 16 | full,incremental, 17 | 18 | 19 | 20 | 21 | 22 | org.eclipse.cdt.core.cnature 23 | org.eclipse.cdt.core.ccnature 24 | org.eclipse.cdt.managedbuilder.core.managedBuildNature 25 | org.eclipse.cdt.managedbuilder.core.ScannerConfigNature 26 | 27 | 28 | -------------------------------------------------------------------------------- /src/RenderingPlugin/RenderingPlugin.cpp: -------------------------------------------------------------------------------- 1 | // Example low level rendering Unity plugin 2 | 3 | 4 | #include "UnityPluginInterface.h" 5 | 6 | #include 7 | #include 8 | #include 9 | 10 | // -------------------------------------------------------------------------- 11 | // Include headers for the graphics APIs we support 12 | 13 | #if SUPPORT_D3D9 14 | #include 15 | #endif 16 | #if SUPPORT_D3D11 17 | #include 18 | #endif 19 | #if SUPPORT_OPENGL 20 | #if UNITY_WIN || UNITY_LINUX 21 | #include 22 | #else 23 | #include 24 | #endif 25 | #endif 26 | 27 | 28 | 29 | // -------------------------------------------------------------------------- 30 | // Helper utilities 31 | 32 | 33 | // Prints a string 34 | static void DebugLog (const char* str) 35 | { 36 | #if UNITY_WIN 37 | OutputDebugStringA (str); 38 | #else 39 | printf ("%s", str); 40 | #endif 41 | } 42 | 43 | // COM-like Release macro 44 | #ifndef SAFE_RELEASE 45 | #define SAFE_RELEASE(a) if (a) { a->Release(); a = NULL; } 46 | #endif 47 | 48 | 49 | 50 | // -------------------------------------------------------------------------- 51 | // SetTimeFromUnity, an example function we export which is called by one of the scripts. 52 | 53 | static float g_Time; 54 | 55 | extern "C" void EXPORT_API SetTimeFromUnity (float t) { g_Time = t; } 56 | 57 | 58 | 59 | // -------------------------------------------------------------------------- 60 | // SetTextureFromUnity, an example function we export which is called by one of the scripts. 61 | 62 | static void* g_TexturePointer; 63 | 64 | extern "C" void EXPORT_API SetTextureFromUnity (void* texturePtr) 65 | { 66 | // A script calls this at initialization time; just remember the texture pointer here. 67 | // Will update texture pixels each frame from the plugin rendering event (texture update 68 | // needs to happen on the rendering thread). 69 | g_TexturePointer = texturePtr; 70 | } 71 | 72 | 73 | 74 | // -------------------------------------------------------------------------- 75 | // UnitySetGraphicsDevice 76 | 77 | static int g_DeviceType = -1; 78 | 79 | 80 | // Actual setup/teardown functions defined below 81 | #if SUPPORT_D3D9 82 | static void SetGraphicsDeviceD3D9 (IDirect3DDevice9* device, GfxDeviceEventType eventType); 83 | #endif 84 | #if SUPPORT_D3D11 85 | static void SetGraphicsDeviceD3D11 (ID3D11Device* device, GfxDeviceEventType eventType); 86 | #endif 87 | 88 | 89 | extern "C" void EXPORT_API UnitySetGraphicsDevice (void* device, int deviceType, int eventType) 90 | { 91 | // Set device type to -1, i.e. "not recognized by our plugin" 92 | g_DeviceType = -1; 93 | 94 | #if SUPPORT_D3D9 95 | // D3D9 device, remember device pointer and device type. 96 | // The pointer we get is IDirect3DDevice9. 97 | if (deviceType == kGfxRendererD3D9) 98 | { 99 | DebugLog ("Set D3D9 graphics device\n"); 100 | g_DeviceType = deviceType; 101 | SetGraphicsDeviceD3D9 ((IDirect3DDevice9*)device, (GfxDeviceEventType)eventType); 102 | } 103 | #endif 104 | 105 | #if SUPPORT_D3D11 106 | // D3D11 device, remember device pointer and device type. 107 | // The pointer we get is ID3D11Device. 108 | if (deviceType == kGfxRendererD3D11) 109 | { 110 | DebugLog ("Set D3D11 graphics device\n"); 111 | g_DeviceType = deviceType; 112 | SetGraphicsDeviceD3D11 ((ID3D11Device*)device, (GfxDeviceEventType)eventType); 113 | } 114 | #endif 115 | 116 | #if SUPPORT_OPENGL 117 | // If we've got an OpenGL device, remember device type. There's no OpenGL 118 | // "device pointer" to remember since OpenGL always operates on a currently set 119 | // global context. 120 | if (deviceType == kGfxRendererOpenGL) 121 | { 122 | DebugLog ("Set OpenGL graphics device\n"); 123 | g_DeviceType = deviceType; 124 | } 125 | #endif 126 | } 127 | 128 | 129 | 130 | // -------------------------------------------------------------------------- 131 | // UnityRenderEvent 132 | // This will be called for GL.IssuePluginEvent script calls; eventID will 133 | // be the integer passed to IssuePluginEvent. In this example, we just ignore 134 | // that value. 135 | 136 | 137 | struct MyVertex { 138 | float x, y, z; 139 | unsigned int color; 140 | }; 141 | static void SetDefaultGraphicsState (); 142 | static void DoRendering (const float* worldMatrix, const float* identityMatrix, float* projectionMatrix, const MyVertex* verts); 143 | 144 | 145 | extern "C" void EXPORT_API UnityRenderEvent (int eventID) 146 | { 147 | // Unknown graphics device type? Do nothing. 148 | if (g_DeviceType == -1) 149 | return; 150 | 151 | 152 | // A colored triangle. Note that colors will come out differently 153 | // in D3D9/11 and OpenGL, for example, since they expect color bytes 154 | // in different ordering. 155 | MyVertex verts[3] = { 156 | { -0.5f, -0.25f, 0, 0xFFff0000 }, 157 | { 0.5f, -0.25f, 0, 0xFF00ff00 }, 158 | { 0, 0.5f , 0, 0xFF0000ff }, 159 | }; 160 | 161 | 162 | // Some transformation matrices: rotate around Z axis for world 163 | // matrix, identity view matrix, and identity projection matrix. 164 | 165 | float phi = g_Time; 166 | float cosPhi = cosf(phi); 167 | float sinPhi = sinf(phi); 168 | 169 | float worldMatrix[16] = { 170 | cosPhi,-sinPhi,0,0, 171 | sinPhi,cosPhi,0,0, 172 | 0,0,1,0, 173 | 0,0,0.7f,1, 174 | }; 175 | float identityMatrix[16] = { 176 | 1,0,0,0, 177 | 0,1,0,0, 178 | 0,0,1,0, 179 | 0,0,0,1, 180 | }; 181 | float projectionMatrix[16] = { 182 | 1,0,0,0, 183 | 0,1,0,0, 184 | 0,0,1,0, 185 | 0,0,0,1, 186 | }; 187 | 188 | // Actual functions defined below 189 | SetDefaultGraphicsState (); 190 | DoRendering (worldMatrix, identityMatrix, projectionMatrix, verts); 191 | } 192 | 193 | 194 | // ------------------------------------------------------------------- 195 | // Direct3D 9 setup/teardown code 196 | 197 | 198 | #if SUPPORT_D3D9 199 | 200 | static IDirect3DDevice9* g_D3D9Device; 201 | 202 | // A dynamic vertex buffer just to demonstrate how to handle D3D9 device resets. 203 | static IDirect3DVertexBuffer9* g_D3D9DynamicVB; 204 | 205 | static void SetGraphicsDeviceD3D9 (IDirect3DDevice9* device, GfxDeviceEventType eventType) 206 | { 207 | g_D3D9Device = device; 208 | 209 | // Create or release a small dynamic vertex buffer depending on the event type. 210 | switch (eventType) { 211 | case kGfxDeviceEventInitialize: 212 | case kGfxDeviceEventAfterReset: 213 | // After device is initialized or was just reset, create the VB. 214 | if (!g_D3D9DynamicVB) 215 | g_D3D9Device->CreateVertexBuffer (1024, D3DUSAGE_WRITEONLY | D3DUSAGE_DYNAMIC, 0, D3DPOOL_DEFAULT, &g_D3D9DynamicVB, NULL); 216 | break; 217 | case kGfxDeviceEventBeforeReset: 218 | case kGfxDeviceEventShutdown: 219 | // Before device is reset or being shut down, release the VB. 220 | SAFE_RELEASE(g_D3D9DynamicVB); 221 | break; 222 | } 223 | } 224 | 225 | #endif // #if SUPPORT_D3D9 226 | 227 | 228 | 229 | // ------------------------------------------------------------------- 230 | // Direct3D 11 setup/teardown code 231 | 232 | 233 | #if SUPPORT_D3D11 234 | 235 | static ID3D11Device* g_D3D11Device; 236 | static ID3D11Buffer* g_D3D11VB; // vertex buffer 237 | static ID3D11Buffer* g_D3D11CB; // constant buffer 238 | static ID3D11VertexShader* g_D3D11VertexShader; 239 | static ID3D11PixelShader* g_D3D11PixelShader; 240 | static ID3D11InputLayout* g_D3D11InputLayout; 241 | static ID3D11RasterizerState* g_D3D11RasterState; 242 | static ID3D11BlendState* g_D3D11BlendState; 243 | static ID3D11DepthStencilState* g_D3D11DepthState; 244 | 245 | #if !UNITY_METRO 246 | typedef HRESULT (WINAPI *D3DCompileFunc)( 247 | const void* pSrcData, 248 | unsigned long SrcDataSize, 249 | const char* pFileName, 250 | const D3D10_SHADER_MACRO* pDefines, 251 | ID3D10Include* pInclude, 252 | const char* pEntrypoint, 253 | const char* pTarget, 254 | unsigned int Flags1, 255 | unsigned int Flags2, 256 | ID3D10Blob** ppCode, 257 | ID3D10Blob** ppErrorMsgs); 258 | 259 | static const char* kD3D11ShaderText = 260 | "cbuffer MyCB : register(b0) {\n" 261 | " float4x4 worldMatrix;\n" 262 | "}\n" 263 | "void VS (float3 pos : POSITION, float4 color : COLOR, out float4 ocolor : COLOR, out float4 opos : SV_Position) {\n" 264 | " opos = mul (worldMatrix, float4(pos,1));\n" 265 | " ocolor = color;\n" 266 | "}\n" 267 | "float4 PS (float4 color : COLOR) : SV_TARGET {\n" 268 | " return color;\n" 269 | "}\n"; 270 | #elif UNITY_METRO 271 | typedef std::vector Buffer; 272 | bool LoadFileIntoBuffer(const char* fileName, Buffer& data) 273 | { 274 | FILE* fp; 275 | fopen_s(&fp, fileName,"rb"); 276 | if (fp) 277 | { 278 | fseek (fp, 0, SEEK_END); 279 | int size = ftell (fp); 280 | fseek (fp, 0, SEEK_SET); 281 | data.resize(size); 282 | 283 | fread(&data[0], size, 1, fp); 284 | 285 | fclose(fp); 286 | 287 | return true; 288 | } 289 | else 290 | { 291 | return false; 292 | } 293 | } 294 | 295 | #endif 296 | static D3D11_INPUT_ELEMENT_DESC s_DX11InputElementDesc[] = { 297 | { "POSITION", 0, DXGI_FORMAT_R32G32B32_FLOAT, 0, 0, D3D11_INPUT_PER_VERTEX_DATA, 0 }, 298 | { "COLOR", 0, DXGI_FORMAT_R8G8B8A8_UNORM, 0, 12, D3D11_INPUT_PER_VERTEX_DATA, 0 }, 299 | }; 300 | static void CreateD3D11Resources() 301 | { 302 | D3D11_BUFFER_DESC desc; 303 | memset (&desc, 0, sizeof(desc)); 304 | 305 | // vertex buffer 306 | desc.Usage = D3D11_USAGE_DEFAULT; 307 | desc.ByteWidth = 1024; 308 | desc.BindFlags = D3D11_BIND_VERTEX_BUFFER; 309 | g_D3D11Device->CreateBuffer (&desc, NULL, &g_D3D11VB); 310 | 311 | // constant buffer 312 | desc.Usage = D3D11_USAGE_DEFAULT; 313 | desc.ByteWidth = 64; // hold 1 matrix 314 | desc.BindFlags = D3D11_BIND_CONSTANT_BUFFER; 315 | desc.CPUAccessFlags = 0; 316 | g_D3D11Device->CreateBuffer (&desc, NULL, &g_D3D11CB); 317 | 318 | #if !UNITY_METRO 319 | // shaders 320 | HMODULE compiler = LoadLibraryA("D3DCompiler_43.dll"); 321 | 322 | if (compiler == NULL) 323 | { 324 | // Try compiler from Windows 8 SDK 325 | compiler = LoadLibraryA("D3DCompiler_46.dll"); 326 | } 327 | if (compiler) 328 | { 329 | ID3D10Blob* vsBlob = NULL; 330 | ID3D10Blob* psBlob = NULL; 331 | 332 | D3DCompileFunc compileFunc = (D3DCompileFunc)GetProcAddress (compiler, "D3DCompile"); 333 | if (compileFunc) 334 | { 335 | HRESULT hr; 336 | hr = compileFunc(kD3D11ShaderText, strlen(kD3D11ShaderText), NULL, NULL, NULL, "VS", "vs_4_0", 0, 0, &vsBlob, NULL); 337 | if (SUCCEEDED(hr)) 338 | { 339 | g_D3D11Device->CreateVertexShader (vsBlob->GetBufferPointer(), vsBlob->GetBufferSize(), NULL, &g_D3D11VertexShader); 340 | } 341 | 342 | hr = compileFunc(kD3D11ShaderText, strlen(kD3D11ShaderText), NULL, NULL, NULL, "PS", "ps_4_0", 0, 0, &psBlob, NULL); 343 | if (SUCCEEDED(hr)) 344 | { 345 | g_D3D11Device->CreatePixelShader (psBlob->GetBufferPointer(), psBlob->GetBufferSize(), NULL, &g_D3D11PixelShader); 346 | } 347 | } 348 | 349 | // input layout 350 | if (g_D3D11VertexShader && vsBlob) 351 | { 352 | g_D3D11Device->CreateInputLayout (s_DX11InputElementDesc, 2, vsBlob->GetBufferPointer(), vsBlob->GetBufferSize(), &g_D3D11InputLayout); 353 | } 354 | 355 | SAFE_RELEASE(vsBlob); 356 | SAFE_RELEASE(psBlob); 357 | 358 | FreeLibrary (compiler); 359 | } 360 | else 361 | { 362 | DebugLog ("D3D11: HLSL shader compiler not found, will not render anything\n"); 363 | } 364 | #elif UNITY_METRO 365 | HRESULT hr = -1; 366 | Buffer vertexShader; 367 | Buffer pixelShader; 368 | LoadFileIntoBuffer("Data\\StreamingAssets\\SimpleVertexShader.cso", vertexShader); 369 | LoadFileIntoBuffer("Data\\StreamingAssets\\SimplePixelShader.cso", pixelShader); 370 | 371 | if (vertexShader.size() > 0 && pixelShader.size() > 0) 372 | { 373 | hr = g_D3D11Device->CreateVertexShader(&vertexShader[0], vertexShader.size(), nullptr, &g_D3D11VertexShader); 374 | if (FAILED(hr)) DebugLog("Failed to create vertex shader."); 375 | hr = g_D3D11Device->CreatePixelShader(&pixelShader[0], pixelShader.size(), nullptr, &g_D3D11PixelShader); 376 | if (FAILED(hr)) DebugLog("Failed to create pixel shader."); 377 | } 378 | else 379 | { 380 | DebugLog("Failed to load vertex or pixel shader."); 381 | } 382 | // input layout 383 | if (g_D3D11VertexShader && vertexShader.size() > 0) 384 | { 385 | g_D3D11Device->CreateInputLayout (s_DX11InputElementDesc, 2, &vertexShader[0], vertexShader.size(), &g_D3D11InputLayout); 386 | } 387 | #endif 388 | // render states 389 | D3D11_RASTERIZER_DESC rsdesc; 390 | memset (&rsdesc, 0, sizeof(rsdesc)); 391 | rsdesc.FillMode = D3D11_FILL_SOLID; 392 | rsdesc.CullMode = D3D11_CULL_NONE; 393 | rsdesc.DepthClipEnable = TRUE; 394 | g_D3D11Device->CreateRasterizerState (&rsdesc, &g_D3D11RasterState); 395 | 396 | D3D11_DEPTH_STENCIL_DESC dsdesc; 397 | memset (&dsdesc, 0, sizeof(dsdesc)); 398 | dsdesc.DepthEnable = TRUE; 399 | dsdesc.DepthWriteMask = D3D11_DEPTH_WRITE_MASK_ZERO; 400 | dsdesc.DepthFunc = D3D11_COMPARISON_LESS_EQUAL; 401 | g_D3D11Device->CreateDepthStencilState (&dsdesc, &g_D3D11DepthState); 402 | 403 | D3D11_BLEND_DESC bdesc; 404 | memset (&bdesc, 0, sizeof(bdesc)); 405 | bdesc.RenderTarget[0].BlendEnable = FALSE; 406 | bdesc.RenderTarget[0].RenderTargetWriteMask = 0xF; 407 | g_D3D11Device->CreateBlendState (&bdesc, &g_D3D11BlendState); 408 | } 409 | 410 | static void ReleaseD3D11Resources() 411 | { 412 | SAFE_RELEASE(g_D3D11VB); 413 | SAFE_RELEASE(g_D3D11CB); 414 | SAFE_RELEASE(g_D3D11VertexShader); 415 | SAFE_RELEASE(g_D3D11PixelShader); 416 | SAFE_RELEASE(g_D3D11InputLayout); 417 | SAFE_RELEASE(g_D3D11RasterState); 418 | SAFE_RELEASE(g_D3D11BlendState); 419 | SAFE_RELEASE(g_D3D11DepthState); 420 | } 421 | 422 | static void SetGraphicsDeviceD3D11 (ID3D11Device* device, GfxDeviceEventType eventType) 423 | { 424 | g_D3D11Device = device; 425 | 426 | if (eventType == kGfxDeviceEventInitialize) 427 | CreateD3D11Resources(); 428 | if (eventType == kGfxDeviceEventShutdown) 429 | ReleaseD3D11Resources(); 430 | } 431 | 432 | #endif // #if SUPPORT_D3D11 433 | 434 | 435 | 436 | // -------------------------------------------------------------------------- 437 | // SetDefaultGraphicsState 438 | // 439 | // Helper function to setup some "sane" graphics state. Rendering state 440 | // upon call into our plugin can be almost completely arbitrary depending 441 | // on what was rendered in Unity before. 442 | // Before calling into the plugin, Unity will set shaders to null, 443 | // and will unbind most of "current" objects (e.g. VBOs in OpenGL case). 444 | // 445 | // Here, we set culling off, lighting off, alpha blend & test off, Z 446 | // comparison to less equal, and Z writes off. 447 | 448 | static void SetDefaultGraphicsState () 449 | { 450 | #if SUPPORT_D3D9 451 | // D3D9 case 452 | if (g_DeviceType == kGfxRendererD3D9) 453 | { 454 | g_D3D9Device->SetRenderState (D3DRS_CULLMODE, D3DCULL_NONE); 455 | g_D3D9Device->SetRenderState (D3DRS_LIGHTING, FALSE); 456 | g_D3D9Device->SetRenderState (D3DRS_ALPHABLENDENABLE, FALSE); 457 | g_D3D9Device->SetRenderState (D3DRS_ALPHATESTENABLE, FALSE); 458 | g_D3D9Device->SetRenderState (D3DRS_ZFUNC, D3DCMP_LESSEQUAL); 459 | g_D3D9Device->SetRenderState (D3DRS_ZWRITEENABLE, FALSE); 460 | } 461 | #endif 462 | 463 | 464 | #if SUPPORT_D3D11 465 | // D3D11 case 466 | if (g_DeviceType == kGfxRendererD3D11) 467 | { 468 | ID3D11DeviceContext* ctx = NULL; 469 | g_D3D11Device->GetImmediateContext (&ctx); 470 | ctx->OMSetDepthStencilState (g_D3D11DepthState, 0); 471 | ctx->RSSetState (g_D3D11RasterState); 472 | ctx->OMSetBlendState (g_D3D11BlendState, NULL, 0xFFFFFFFF); 473 | ctx->Release(); 474 | } 475 | #endif 476 | 477 | 478 | #if SUPPORT_OPENGL 479 | // OpenGL case 480 | if (g_DeviceType == kGfxRendererOpenGL) 481 | { 482 | glDisable (GL_CULL_FACE); 483 | glDisable (GL_LIGHTING); 484 | glDisable (GL_BLEND); 485 | glDisable (GL_ALPHA_TEST); 486 | glDepthFunc (GL_LEQUAL); 487 | glEnable (GL_DEPTH_TEST); 488 | glDepthMask (GL_FALSE); 489 | } 490 | #endif 491 | } 492 | 493 | 494 | static void FillTextureFromCode (int width, int height, int stride, unsigned char* dst) 495 | { 496 | const float t = g_Time * 4.0f; 497 | 498 | for (int y = 0; y < height; ++y) 499 | { 500 | unsigned char* ptr = dst; 501 | for (int x = 0; x < width; ++x) 502 | { 503 | // Simple oldskool "plasma effect", a bunch of combined sine waves 504 | int vv = int( 505 | (127.0f + (127.0f * sinf(x/7.0f+t))) + 506 | (127.0f + (127.0f * sinf(y/5.0f-t))) + 507 | (127.0f + (127.0f * sinf((x+y)/6.0f-t))) + 508 | (127.0f + (127.0f * sinf(sqrtf(float(x*x + y*y))/4.0f-t))) 509 | ) / 4; 510 | 511 | // Write the texture pixel 512 | ptr[0] = vv; 513 | ptr[1] = vv; 514 | ptr[2] = vv; 515 | ptr[3] = vv; 516 | 517 | // To next pixel (our pixels are 4 bpp) 518 | ptr += 4; 519 | } 520 | 521 | // To next image row 522 | dst += stride; 523 | } 524 | } 525 | 526 | 527 | static void DoRendering (const float* worldMatrix, const float* identityMatrix, float* projectionMatrix, const MyVertex* verts) 528 | { 529 | // Does actual rendering of a simple triangle 530 | 531 | #if SUPPORT_D3D9 532 | // D3D9 case 533 | if (g_DeviceType == kGfxRendererD3D9) 534 | { 535 | // Transformation matrices 536 | g_D3D9Device->SetTransform (D3DTS_WORLD, (const D3DMATRIX*)worldMatrix); 537 | g_D3D9Device->SetTransform (D3DTS_VIEW, (const D3DMATRIX*)identityMatrix); 538 | g_D3D9Device->SetTransform (D3DTS_PROJECTION, (const D3DMATRIX*)projectionMatrix); 539 | 540 | // Vertex layout 541 | g_D3D9Device->SetFVF (D3DFVF_XYZ|D3DFVF_DIFFUSE); 542 | 543 | // Texture stage states to output vertex color 544 | g_D3D9Device->SetTextureStageState (0, D3DTSS_COLOROP, D3DTOP_SELECTARG1); 545 | g_D3D9Device->SetTextureStageState (0, D3DTSS_COLORARG1, D3DTA_CURRENT); 546 | g_D3D9Device->SetTextureStageState (0, D3DTSS_ALPHAOP, D3DTOP_SELECTARG1); 547 | g_D3D9Device->SetTextureStageState (0, D3DTSS_ALPHAARG1, D3DTA_CURRENT); 548 | g_D3D9Device->SetTextureStageState (1, D3DTSS_COLOROP, D3DTOP_DISABLE); 549 | g_D3D9Device->SetTextureStageState (1, D3DTSS_ALPHAOP, D3DTOP_DISABLE); 550 | 551 | // Copy vertex data into our small dynamic vertex buffer. We could have used 552 | // DrawPrimitiveUP just fine as well. 553 | void* vbPtr; 554 | g_D3D9DynamicVB->Lock (0, 0, &vbPtr, D3DLOCK_DISCARD); 555 | memcpy (vbPtr, verts, sizeof(verts[0])*3); 556 | g_D3D9DynamicVB->Unlock (); 557 | g_D3D9Device->SetStreamSource (0, g_D3D9DynamicVB, 0, sizeof(MyVertex)); 558 | 559 | // Draw! 560 | g_D3D9Device->DrawPrimitive (D3DPT_TRIANGLELIST, 0, 1); 561 | 562 | // Update native texture from code 563 | if (g_TexturePointer) 564 | { 565 | IDirect3DTexture9* d3dtex = (IDirect3DTexture9*)g_TexturePointer; 566 | D3DSURFACE_DESC desc; 567 | d3dtex->GetLevelDesc (0, &desc); 568 | D3DLOCKED_RECT lr; 569 | d3dtex->LockRect (0, &lr, NULL, 0); 570 | FillTextureFromCode (desc.Width, desc.Height, lr.Pitch, (unsigned char*)lr.pBits); 571 | d3dtex->UnlockRect (0); 572 | } 573 | } 574 | #endif 575 | 576 | 577 | #if SUPPORT_D3D11 578 | // D3D11 case 579 | if (g_DeviceType == kGfxRendererD3D11 && g_D3D11VertexShader) 580 | { 581 | ID3D11DeviceContext* ctx = NULL; 582 | g_D3D11Device->GetImmediateContext (&ctx); 583 | 584 | // update constant buffer - just the world matrix in our case 585 | ctx->UpdateSubresource (g_D3D11CB, 0, NULL, worldMatrix, 64, 0); 586 | 587 | // set shaders 588 | ctx->VSSetConstantBuffers (0, 1, &g_D3D11CB); 589 | ctx->VSSetShader (g_D3D11VertexShader, NULL, 0); 590 | ctx->PSSetShader (g_D3D11PixelShader, NULL, 0); 591 | 592 | // update vertex buffer 593 | ctx->UpdateSubresource (g_D3D11VB, 0, NULL, verts, sizeof(verts[0])*3, 0); 594 | 595 | // set input assembler data and draw 596 | ctx->IASetInputLayout (g_D3D11InputLayout); 597 | ctx->IASetPrimitiveTopology (D3D11_PRIMITIVE_TOPOLOGY_TRIANGLELIST); 598 | UINT stride = sizeof(MyVertex); 599 | UINT offset = 0; 600 | ctx->IASetVertexBuffers (0, 1, &g_D3D11VB, &stride, &offset); 601 | ctx->Draw (3, 0); 602 | 603 | // update native texture from code 604 | if (g_TexturePointer) 605 | { 606 | ID3D11Texture2D* d3dtex = (ID3D11Texture2D*)g_TexturePointer; 607 | D3D11_TEXTURE2D_DESC desc; 608 | d3dtex->GetDesc (&desc); 609 | 610 | unsigned char* data = new unsigned char[desc.Width*desc.Height*4]; 611 | FillTextureFromCode (desc.Width, desc.Height, desc.Width*4, data); 612 | ctx->UpdateSubresource (d3dtex, 0, NULL, data, desc.Width*4, 0); 613 | delete[] data; 614 | } 615 | 616 | ctx->Release(); 617 | } 618 | #endif 619 | 620 | 621 | #if SUPPORT_OPENGL 622 | // OpenGL case 623 | if (g_DeviceType == kGfxRendererOpenGL) 624 | { 625 | // Transformation matrices 626 | glMatrixMode (GL_MODELVIEW); 627 | glLoadMatrixf (worldMatrix); 628 | glMatrixMode (GL_PROJECTION); 629 | // Tweak the projection matrix a bit to make it match what identity 630 | // projection would do in D3D case. 631 | projectionMatrix[10] = 2.0f; 632 | projectionMatrix[14] = -1.0f; 633 | glLoadMatrixf (projectionMatrix); 634 | 635 | // Vertex layout 636 | glVertexPointer (3, GL_FLOAT, sizeof(verts[0]), &verts[0].x); 637 | glEnableClientState (GL_VERTEX_ARRAY); 638 | glColorPointer (4, GL_UNSIGNED_BYTE, sizeof(verts[0]), &verts[0].color); 639 | glEnableClientState (GL_COLOR_ARRAY); 640 | 641 | // Draw! 642 | glDrawArrays (GL_TRIANGLES, 0, 3); 643 | 644 | // update native texture from code 645 | if (g_TexturePointer) 646 | { 647 | GLuint gltex = (GLuint)(size_t)(g_TexturePointer); 648 | glBindTexture (GL_TEXTURE_2D, gltex); 649 | int texWidth, texHeight; 650 | glGetTexLevelParameteriv (GL_TEXTURE_2D, 0, GL_TEXTURE_WIDTH, &texWidth); 651 | glGetTexLevelParameteriv (GL_TEXTURE_2D, 0, GL_TEXTURE_HEIGHT, &texHeight); 652 | 653 | unsigned char* data = new unsigned char[texWidth*texHeight*4]; 654 | FillTextureFromCode (texWidth, texHeight, texHeight*4, data); 655 | glTexSubImage2D (GL_TEXTURE_2D, 0, 0, 0, texWidth, texHeight, GL_RGBA, GL_UNSIGNED_BYTE, data); 656 | delete[] data; 657 | } 658 | } 659 | #endif 660 | } 661 | -------------------------------------------------------------------------------- /src/RenderingPlugin/RenderingPluginGLES.cpp: -------------------------------------------------------------------------------- 1 | // Example low level rendering Unity plugin 2 | // OpenGL ES implementation 3 | 4 | #include "UnityPluginInterface.h" 5 | 6 | #if !SUPPORT_OPENGLES 7 | #error RenderingPluginGLES should be built only for OpenGL ES enabled platforms. 8 | #endif 9 | 10 | #include 11 | #include 12 | #include 13 | 14 | // -------------------------------------------------------------------------- 15 | // Include headers for the graphics APIs we support 16 | 17 | #if UNITY_IPHONE 18 | #include 19 | #elif UNITY_ANDROID 20 | #include 21 | #endif 22 | 23 | 24 | // TODO: these are common to all plugins: just extract it 25 | 26 | static float g_Time = 0.0f; 27 | extern "C" void SetTimeFromUnity(float t) 28 | { 29 | g_Time = t; 30 | } 31 | 32 | static void* g_TexturePointer = 0; 33 | static int g_TexWidth = 0; 34 | static int g_TexHeight = 0; 35 | extern "C" void SetTextureFromUnity(void* texturePtr, int w, int h) 36 | { 37 | g_TexturePointer = texturePtr; 38 | g_TexWidth = w; 39 | g_TexHeight = h; 40 | } 41 | 42 | 43 | // -------------------------------------------------------------------------- 44 | // shaders 45 | 46 | #define VPROG_SRC(ver, attr, varying) \ 47 | ver \ 48 | attr " highp vec3 pos;\n" \ 49 | attr " lowp vec4 color;\n" \ 50 | "\n" \ 51 | varying " lowp vec4 ocolor;\n" \ 52 | "\n" \ 53 | "uniform highp mat4 worldMatrix;\n" \ 54 | "uniform highp mat4 projMatrix;\n" \ 55 | "\n" \ 56 | "void main()\n" \ 57 | "{\n" \ 58 | " gl_Position = (projMatrix * worldMatrix) * vec4(pos,1);\n" \ 59 | " ocolor = color;\n" \ 60 | "}\n" \ 61 | 62 | static const char* kGlesVProgTextGLES2 = VPROG_SRC("\n", "attribute", "varying"); 63 | static const char* kGlesVProgTextGLES3 = VPROG_SRC("#version 300 es\n", "in", "out"); 64 | 65 | #undef VPROG_SRC 66 | 67 | #define FSHADER_SRC(ver, varying, outDecl, outVar) \ 68 | ver \ 69 | outDecl \ 70 | varying " lowp vec4 ocolor;\n" \ 71 | "\n" \ 72 | "void main()\n" \ 73 | "{\n" \ 74 | " " outVar " = ocolor;\n" \ 75 | "}\n" \ 76 | 77 | static const char* kGlesFShaderTextGLES2 = FSHADER_SRC("\n", "varying", "\n", "gl_FragColor"); 78 | static const char* kGlesFShaderTextGLES3 = FSHADER_SRC("#version 300 es\n", "in", "out lowp vec4 fragColor;\n", "fragColor"); 79 | 80 | #undef FSHADER_SRC 81 | 82 | static GLuint g_VProg; 83 | static GLuint g_FShader; 84 | static GLuint g_Program; 85 | static int g_WorldMatrixUniformIndex; 86 | static int g_ProjMatrixUniformIndex; 87 | 88 | static GLuint CreateShader(GLenum type, const char* text) 89 | { 90 | GLuint ret = glCreateShader(type); 91 | glShaderSource(ret, 1, &text, NULL); 92 | glCompileShader(ret); 93 | 94 | return ret; 95 | } 96 | 97 | 98 | // -------------------------------------------------------------------------- 99 | // UnitySetGraphicsDevice 100 | 101 | static int g_DeviceType = -1; 102 | 103 | extern "C" void EXPORT_API UnitySetGraphicsDevice (void* device, int deviceType, int eventType) 104 | { 105 | // Set device type to -1, i.e. "not recognized by our plugin" 106 | g_DeviceType = -1; 107 | 108 | if(deviceType == kGfxRendererOpenGLES20Mobile) 109 | { 110 | ::printf("OpenGLES 2.0 device\n"); 111 | g_DeviceType = deviceType; 112 | 113 | g_VProg = CreateShader(GL_VERTEX_SHADER, kGlesVProgTextGLES2); 114 | g_FShader = CreateShader(GL_FRAGMENT_SHADER, kGlesFShaderTextGLES2); 115 | } 116 | else if(deviceType == kGfxRendererOpenGLES30) 117 | { 118 | ::printf("OpenGLES 3.0 device\n"); 119 | g_DeviceType = deviceType; 120 | 121 | g_VProg = CreateShader(GL_VERTEX_SHADER, kGlesVProgTextGLES3); 122 | g_FShader = CreateShader(GL_FRAGMENT_SHADER, kGlesFShaderTextGLES3); 123 | } 124 | 125 | g_Program = glCreateProgram(); 126 | glBindAttribLocation(g_Program, 1, "pos"); 127 | glBindAttribLocation(g_Program, 2, "color"); 128 | glAttachShader(g_Program, g_VProg); 129 | glAttachShader(g_Program, g_FShader); 130 | glLinkProgram(g_Program); 131 | 132 | g_WorldMatrixUniformIndex = glGetUniformLocation(g_Program, "worldMatrix"); 133 | g_ProjMatrixUniformIndex = glGetUniformLocation(g_Program, "projMatrix"); 134 | } 135 | 136 | 137 | 138 | // -------------------------------------------------------------------------- 139 | // UnityRenderEvent 140 | // This will be called for GL.IssuePluginEvent script calls; eventID will 141 | // be the integer passed to IssuePluginEvent. In this example, we just ignore 142 | // that value. 143 | 144 | 145 | struct MyVertex { 146 | float x, y, z; 147 | unsigned int color; 148 | }; 149 | static void SetDefaultGraphicsState(); 150 | static void DoRendering(const float* worldMatrix, const float* identityMatrix, float* projectionMatrix, const MyVertex* verts); 151 | 152 | 153 | extern "C" void EXPORT_API UnityRenderEvent (int eventID) 154 | { 155 | // Unknown graphics device type? Do nothing. 156 | if(g_DeviceType == -1) 157 | return; 158 | 159 | 160 | // A colored triangle. Note that colors will come out differently 161 | // in D3D9/11 and OpenGL, for example, since they expect color bytes 162 | // in different ordering. 163 | MyVertex verts[3] = { 164 | { -0.5f, -0.25f, 0, 0xFFff0000 }, 165 | { 0.5f, -0.25f, 0, 0xFF00ff00 }, 166 | { 0, 0.5f , 0, 0xFF0000ff }, 167 | }; 168 | 169 | 170 | // Some transformation matrices: rotate around Z axis for world 171 | // matrix, identity view matrix, and identity projection matrix. 172 | 173 | float phi = g_Time; 174 | float cosPhi = cosf(phi); 175 | float sinPhi = sinf(phi); 176 | 177 | float worldMatrix[16] = { 178 | cosPhi,-sinPhi,0,0, 179 | sinPhi,cosPhi,0,0, 180 | 0,0,1,0, 181 | 0,0,0.7f,1, 182 | }; 183 | float identityMatrix[16] = { 184 | 1,0,0,0, 185 | 0,1,0,0, 186 | 0,0,1,0, 187 | 0,0,0,1, 188 | }; 189 | float projectionMatrix[16] = { 190 | 1,0,0,0, 191 | 0,1,0,0, 192 | 0,0,1,0, 193 | 0,0,0,1, 194 | }; 195 | 196 | // Actual functions defined below 197 | SetDefaultGraphicsState(); 198 | DoRendering(worldMatrix, identityMatrix, projectionMatrix, verts); 199 | } 200 | 201 | 202 | 203 | 204 | // -------------------------------------------------------------------------- 205 | // SetDefaultGraphicsState 206 | // 207 | // Helper function to setup some "sane" graphics state. Rendering state 208 | // upon call into our plugin can be almost completely arbitrary depending 209 | // on what was rendered in Unity before. 210 | // Before calling into the plugin, Unity will set shaders to null, 211 | // and will unbind most of "current" objects (e.g. VBOs in OpenGL case). 212 | // 213 | // Here, we set culling off, lighting off, alpha blend & test off, Z 214 | // comparison to less equal, and Z writes off. 215 | 216 | static void SetDefaultGraphicsState () 217 | { 218 | // Unknown graphics device type? Do nothing. 219 | if(g_DeviceType == -1) 220 | return; 221 | 222 | glDisable(GL_CULL_FACE); 223 | glDisable(GL_BLEND); 224 | glDepthFunc(GL_LEQUAL); 225 | glEnable(GL_DEPTH_TEST); 226 | glDepthMask(GL_FALSE); 227 | } 228 | 229 | 230 | // TODO: this is common code (platform-independent) 231 | 232 | static void FillTextureFromCode (int width, int height, int stride, unsigned char* dst) 233 | { 234 | const float t = g_Time * 4.0f; 235 | 236 | for (int y = 0; y < height; ++y) 237 | { 238 | unsigned char* ptr = dst; 239 | for (int x = 0; x < width; ++x) 240 | { 241 | // Simple oldskool "plasma effect", a bunch of combined sine waves 242 | int vv = int( 243 | (127.0f + (127.0f * sinf(x/7.0f+t))) + 244 | (127.0f + (127.0f * sinf(y/5.0f-t))) + 245 | (127.0f + (127.0f * sinf((x+y)/6.0f-t))) + 246 | (127.0f + (127.0f * sinf(sqrtf(float(x*x + y*y))/4.0f-t))) 247 | ) / 4; 248 | 249 | // Write the texture pixel 250 | ptr[0] = vv; 251 | ptr[1] = vv; 252 | ptr[2] = vv; 253 | ptr[3] = vv; 254 | 255 | // To next pixel (our pixels are 4 bpp) 256 | ptr += 4; 257 | } 258 | 259 | // To next image row 260 | dst += stride; 261 | } 262 | } 263 | 264 | 265 | static void DoRendering (const float* worldMatrix, const float* identityMatrix, float* projectionMatrix, const MyVertex* verts) 266 | { 267 | // Unknown graphics device type? Do nothing. 268 | if(g_DeviceType == -1) 269 | return; 270 | 271 | // Does actual rendering of a simple triangle 272 | 273 | // Tweak the projection matrix a bit to make it match what identity projection would do in D3D case. 274 | projectionMatrix[10] = 2.0f; 275 | projectionMatrix[14] = -1.0f; 276 | 277 | glUseProgram(g_Program); 278 | glUniformMatrix4fv(g_WorldMatrixUniformIndex, 1, GL_FALSE, worldMatrix); 279 | glUniformMatrix4fv(g_ProjMatrixUniformIndex, 1, GL_FALSE, projectionMatrix); 280 | 281 | glBindBuffer(GL_ELEMENT_ARRAY_BUFFER, 0); 282 | glBindBuffer(GL_ARRAY_BUFFER, 0); 283 | 284 | const int stride = 3*sizeof(float) + sizeof(unsigned int); 285 | glEnableVertexAttribArray(0); 286 | glVertexAttribPointer(0, 3, GL_FLOAT, GL_FALSE, stride, (const float*)verts); 287 | 288 | glEnableVertexAttribArray(1); 289 | glVertexAttribPointer(1, 2, GL_UNSIGNED_BYTE, GL_TRUE, stride, (const float*)verts + 3); 290 | 291 | glDrawArrays(GL_TRIANGLES, 0, 3); 292 | 293 | // update native texture from code 294 | if (g_TexturePointer) 295 | { 296 | GLuint gltex = (GLuint)(size_t)(g_TexturePointer); 297 | glBindTexture(GL_TEXTURE_2D, gltex); 298 | 299 | unsigned char* data = new unsigned char[g_TexWidth*g_TexHeight*4]; 300 | FillTextureFromCode(g_TexWidth, g_TexHeight, g_TexHeight*4, data); 301 | glTexSubImage2D(GL_TEXTURE_2D, 0, 0, 0, g_TexWidth, g_TexHeight, GL_RGBA, GL_UNSIGNED_BYTE, data); 302 | delete[] data; 303 | } 304 | } 305 | -------------------------------------------------------------------------------- /src/RenderingPlugin/UnityPluginInterface.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | // Which platform we are on? 4 | #if _MSC_VER 5 | #define UNITY_WIN 1 6 | #elif defined(__APPLE__) 7 | #if defined(__arm__) 8 | #define UNITY_IPHONE 1 9 | #else 10 | #define UNITY_OSX 1 11 | #endif 12 | #elif defined(__linux__) 13 | #define UNITY_LINUX 1 14 | #elif defined(UNITY_METRO) || defined(UNITY_ANDROID) 15 | // these are defined externally 16 | #else 17 | #error "Unknown platform!" 18 | #endif 19 | 20 | 21 | // Attribute to make function be exported from a plugin 22 | #if UNITY_METRO 23 | #define EXPORT_API __declspec(dllexport) __stdcall 24 | #elif UNITY_WIN 25 | #define EXPORT_API __declspec(dllexport) 26 | #else 27 | #define EXPORT_API 28 | #endif 29 | 30 | 31 | // Which graphics device APIs we possibly support? 32 | #if UNITY_METRO 33 | #define SUPPORT_D3D11 1 34 | #elif UNITY_WIN 35 | #define SUPPORT_D3D9 1 36 | #define SUPPORT_D3D11 1 // comment this out if you don't have D3D11 header/library files 37 | #define SUPPORT_OPENGL 1 38 | #endif 39 | 40 | #if UNITY_OSX || UNITY_LINUX 41 | #define SUPPORT_OPENGL 1 42 | #endif 43 | 44 | #if UNITY_IPHONE || UNITY_ANDROID 45 | #define SUPPORT_OPENGLES 1 46 | #endif 47 | 48 | 49 | // Graphics device identifiers in Unity 50 | enum GfxDeviceRenderer 51 | { 52 | kGfxRendererOpenGL = 0, // OpenGL 53 | kGfxRendererD3D9, // Direct3D 9 54 | kGfxRendererD3D11, // Direct3D 11 55 | kGfxRendererGCM, // Sony PlayStation 3 GCM 56 | kGfxRendererNull, // "null" device (used in batch mode) 57 | kGfxRendererHollywood, // Nintendo Wii 58 | kGfxRendererXenon, // Xbox 360 59 | kGfxRendererOpenGLES_Obsolete, 60 | kGfxRendererOpenGLES20Mobile, // OpenGL ES 2.0 61 | kGfxRendererMolehill_Obsolete, 62 | kGfxRendererOpenGLES20Desktop_Obsolete, 63 | kGfxRendererOpenGLES30, // OpenGL ES 3.0 64 | kGfxRendererCount 65 | }; 66 | 67 | 68 | // Event types for UnitySetGraphicsDevice 69 | enum GfxDeviceEventType { 70 | kGfxDeviceEventInitialize = 0, 71 | kGfxDeviceEventShutdown, 72 | kGfxDeviceEventBeforeReset, 73 | kGfxDeviceEventAfterReset, 74 | }; 75 | 76 | 77 | // If exported by a plugin, this function will be called when graphics device is created, destroyed, 78 | // before it's being reset (i.e. resolution changed), after it's being reset, etc. 79 | extern "C" void EXPORT_API UnitySetGraphicsDevice(void* device, int deviceType, int eventType); 80 | 81 | // If exported by a plugin, this function will be called for GL.IssuePluginEvent script calls. 82 | // The function will be called on a rendering thread; note that when multithreaded rendering is used, 83 | // the rendering thread WILL BE DIFFERENT from the thread that all scripts & other game logic happens! 84 | // You have to ensure any synchronization with other plugin script calls is properly done by you. 85 | extern "C" void EXPORT_API UnityRenderEvent(int eventID); 86 | 87 | -------------------------------------------------------------------------------- /src/RenderingPlugin/VisualStudio2008/RenderingPlugin.sln: -------------------------------------------------------------------------------- 1 |  2 | Microsoft Visual Studio Solution File, Format Version 10.00 3 | # Visual Studio 2008 4 | Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "RenderingPlugin", "RenderingPlugin.vcproj", "{F7CFEF5A-54BD-42E8-A59E-54ABAEB4EA9C}" 5 | EndProject 6 | Global 7 | GlobalSection(SolutionConfigurationPlatforms) = preSolution 8 | Debug|Win32 = Debug|Win32 9 | Release|Win32 = Release|Win32 10 | EndGlobalSection 11 | GlobalSection(ProjectConfigurationPlatforms) = postSolution 12 | {F7CFEF5A-54BD-42E8-A59E-54ABAEB4EA9C}.Debug|Win32.ActiveCfg = Debug|Win32 13 | {F7CFEF5A-54BD-42E8-A59E-54ABAEB4EA9C}.Debug|Win32.Build.0 = Debug|Win32 14 | {F7CFEF5A-54BD-42E8-A59E-54ABAEB4EA9C}.Release|Win32.ActiveCfg = Release|Win32 15 | {F7CFEF5A-54BD-42E8-A59E-54ABAEB4EA9C}.Release|Win32.Build.0 = Release|Win32 16 | EndGlobalSection 17 | GlobalSection(SolutionProperties) = preSolution 18 | HideSolutionNode = FALSE 19 | EndGlobalSection 20 | EndGlobal 21 | -------------------------------------------------------------------------------- /src/RenderingPlugin/VisualStudio2008/RenderingPlugin.vcproj: -------------------------------------------------------------------------------- 1 | 2 | 11 | 12 | 15 | 16 | 17 | 18 | 19 | 26 | 29 | 32 | 35 | 38 | 41 | 52 | 55 | 58 | 61 | 69 | 72 | 75 | 78 | 81 | 84 | 87 | 90 | 91 | 99 | 102 | 105 | 108 | 111 | 114 | 125 | 128 | 131 | 134 | 144 | 147 | 150 | 153 | 156 | 159 | 162 | 165 | 166 | 167 | 168 | 169 | 170 | 173 | 174 | 177 | 178 | 179 | 180 | 181 | 182 | -------------------------------------------------------------------------------- /src/RenderingPlugin/VisualStudio2013/RenderingPlugin.sln: -------------------------------------------------------------------------------- 1 |  2 | Microsoft Visual Studio Solution File, Format Version 12.00 3 | # Visual Studio 2013 4 | VisualStudioVersion = 12.0.31101.0 5 | MinimumVisualStudioVersion = 10.0.40219.1 6 | Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "RenderingPlugin", "RenderingPlugin.vcxproj", "{F7CFEF5A-54BD-42E8-A59E-54ABAEB4EA9C}" 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 | {F7CFEF5A-54BD-42E8-A59E-54ABAEB4EA9C}.Debug|Win32.ActiveCfg = Debug|Win32 17 | {F7CFEF5A-54BD-42E8-A59E-54ABAEB4EA9C}.Debug|Win32.Build.0 = Debug|Win32 18 | {F7CFEF5A-54BD-42E8-A59E-54ABAEB4EA9C}.Debug|x64.ActiveCfg = Debug|x64 19 | {F7CFEF5A-54BD-42E8-A59E-54ABAEB4EA9C}.Debug|x64.Build.0 = Debug|x64 20 | {F7CFEF5A-54BD-42E8-A59E-54ABAEB4EA9C}.Release|Win32.ActiveCfg = Release|Win32 21 | {F7CFEF5A-54BD-42E8-A59E-54ABAEB4EA9C}.Release|Win32.Build.0 = Release|Win32 22 | {F7CFEF5A-54BD-42E8-A59E-54ABAEB4EA9C}.Release|x64.ActiveCfg = Release|x64 23 | {F7CFEF5A-54BD-42E8-A59E-54ABAEB4EA9C}.Release|x64.Build.0 = Release|x64 24 | EndGlobalSection 25 | GlobalSection(SolutionProperties) = preSolution 26 | HideSolutionNode = FALSE 27 | EndGlobalSection 28 | EndGlobal 29 | -------------------------------------------------------------------------------- /src/RenderingPlugin/VisualStudio2013/RenderingPlugin.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 | {F7CFEF5A-54BD-42E8-A59E-54ABAEB4EA9C} 23 | RenderingPlugin 24 | Win32Proj 25 | 26 | 27 | 28 | DynamicLibrary 29 | v120 30 | Unicode 31 | true 32 | 33 | 34 | DynamicLibrary 35 | v120 36 | Unicode 37 | true 38 | 39 | 40 | DynamicLibrary 41 | v120 42 | Unicode 43 | 44 | 45 | DynamicLibrary 46 | v120 47 | Unicode 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | <_ProjectFileVersion>12.0.30501.0 67 | 68 | 69 | $(SolutionDir)build/$(Configuration)\ 70 | build/$(Configuration)\ 71 | true 72 | 73 | 74 | true 75 | $(SolutionDir)build/$(Configuration)\ 76 | build/$(Configuration)\ 77 | 78 | 79 | $(SolutionDir)build/$(Configuration)\ 80 | build/$(Configuration)\ 81 | false 82 | 83 | 84 | false 85 | $(SolutionDir)build/$(Configuration)\ 86 | build/$(Configuration)\ 87 | 88 | 89 | 90 | Disabled 91 | WIN32;_DEBUG;_WINDOWS;_USRDLL;RENDERINGPLUGIN_EXPORTS;%(PreprocessorDefinitions) 92 | true 93 | EnableFastChecks 94 | MultiThreadedDebug 95 | 96 | Level3 97 | ProgramDatabase 98 | 99 | 100 | opengl32.lib;%(AdditionalDependencies) 101 | true 102 | Windows 103 | MachineX86 104 | 105 | 106 | 107 | 108 | Disabled 109 | WIN32;_DEBUG;_WINDOWS;_USRDLL;RENDERINGPLUGIN_EXPORTS;%(PreprocessorDefinitions) 110 | EnableFastChecks 111 | MultiThreadedDebug 112 | 113 | 114 | Level3 115 | ProgramDatabase 116 | 117 | 118 | opengl32.lib;%(AdditionalDependencies) 119 | true 120 | Windows 121 | 122 | 123 | 124 | 125 | MaxSpeed 126 | true 127 | WIN32;NDEBUG;_WINDOWS;_USRDLL;RENDERINGPLUGIN_EXPORTS;%(PreprocessorDefinitions) 128 | MultiThreaded 129 | true 130 | 131 | Level3 132 | ProgramDatabase 133 | 134 | 135 | opengl32.lib;%(AdditionalDependencies) 136 | true 137 | Windows 138 | true 139 | true 140 | MachineX86 141 | 142 | 143 | 144 | 145 | MaxSpeed 146 | true 147 | WIN32;NDEBUG;_WINDOWS;_USRDLL;RENDERINGPLUGIN_EXPORTS;%(PreprocessorDefinitions) 148 | MultiThreaded 149 | true 150 | 151 | 152 | Level3 153 | ProgramDatabase 154 | 155 | 156 | opengl32.lib;%(AdditionalDependencies) 157 | true 158 | Windows 159 | true 160 | true 161 | 162 | 163 | 164 | 165 | 166 | 167 | 168 | 169 | 170 | 171 | 172 | -------------------------------------------------------------------------------- /src/RenderingPlugin/WSAVisualStudio2012/ReadMe.txt: -------------------------------------------------------------------------------- 1 | This is a RenderingPlugin for Windows Store Apps. 2 | There's already prebuilt plugin version in Unity project. (Assets\Plugins\Metro\x86, Assets\Plugins\Metro\ARM) 3 | Also - precompiled shaders are located here - UnityProject\Assets\StreamingAssets. 4 | Also checkout - UnityProject\Assets\Editor\MyBuildPostprocessor.cs, it contains some bits, how Windows Store Apps source files are modified after building from Editor. 5 | 6 | If you want to recompile RenderingPlugin or shaders it's simply enough to hit Build Solution, and both RenderingPlugin.dll and precompiled shaders will be copied to appropriate folders in Unity project. 7 | For more information, go to Project->Properties->BuildEvents->Post-Build event. 8 | 9 | 10 | It's also possible to setup RenderingPlugin project for debugging, do the following. 11 | * Open UnityProject 12 | * Build Windows Store Apps, it doesn't matter which project type you choose, but in this case choose XAML C# 13 | * If you're using 4.3 or higher, choose SDK 8.0. 14 | * Open generated solution 15 | * Right click on solution in Solution Explorer 16 | * Add->Existing Project, add RenderingPlugin\WSAVisualStudio2012\RenderingPlugin.vcxproj 17 | * Right click on "Plugin Render API Example", Project Dependencies, select RenderingPlugin 18 | * That's it, for ex., place a breakpoint in CreateD3D11Resources 19 | 20 | * You can now change shaders and sources in RenderingPlugin project, and test it on the fly. 21 | * Note: you can also debug RenderingPlugin source files 22 | 23 | Known issues 24 | * It should be also possible to debug shaders with integrated Graphics Debugger, but it seems Visual Studio 2012 requires Vertex Shader.pdb or Pixel Shader.pdb, but don't generate them. 25 | 26 | 27 | 28 | -------------------------------------------------------------------------------- /src/RenderingPlugin/WSAVisualStudio2012/RenderingPlugin.sln: -------------------------------------------------------------------------------- 1 |  2 | Microsoft Visual Studio Solution File, Format Version 12.00 3 | # Visual Studio 2012 4 | Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "RenderingPlugin", "RenderingPlugin.vcxproj", "{15519B07-603E-497B-904C-2D42C403519E}" 5 | EndProject 6 | Global 7 | GlobalSection(SolutionConfigurationPlatforms) = preSolution 8 | Debug|ARM = Debug|ARM 9 | Debug|Win32 = Debug|Win32 10 | Debug|x64 = Debug|x64 11 | Release|ARM = Release|ARM 12 | Release|Win32 = Release|Win32 13 | Release|x64 = Release|x64 14 | EndGlobalSection 15 | GlobalSection(ProjectConfigurationPlatforms) = postSolution 16 | {15519B07-603E-497B-904C-2D42C403519E}.Debug|ARM.ActiveCfg = Debug|ARM 17 | {15519B07-603E-497B-904C-2D42C403519E}.Debug|ARM.Build.0 = Debug|ARM 18 | {15519B07-603E-497B-904C-2D42C403519E}.Debug|Win32.ActiveCfg = Debug|Win32 19 | {15519B07-603E-497B-904C-2D42C403519E}.Debug|Win32.Build.0 = Debug|Win32 20 | {15519B07-603E-497B-904C-2D42C403519E}.Debug|x64.ActiveCfg = Debug|x64 21 | {15519B07-603E-497B-904C-2D42C403519E}.Debug|x64.Build.0 = Debug|x64 22 | {15519B07-603E-497B-904C-2D42C403519E}.Release|ARM.ActiveCfg = Release|ARM 23 | {15519B07-603E-497B-904C-2D42C403519E}.Release|ARM.Build.0 = Release|ARM 24 | {15519B07-603E-497B-904C-2D42C403519E}.Release|Win32.ActiveCfg = Release|Win32 25 | {15519B07-603E-497B-904C-2D42C403519E}.Release|Win32.Build.0 = Release|Win32 26 | {15519B07-603E-497B-904C-2D42C403519E}.Release|x64.ActiveCfg = Release|x64 27 | {15519B07-603E-497B-904C-2D42C403519E}.Release|x64.Build.0 = Release|x64 28 | EndGlobalSection 29 | GlobalSection(SolutionProperties) = preSolution 30 | HideSolutionNode = FALSE 31 | EndGlobalSection 32 | EndGlobal 33 | -------------------------------------------------------------------------------- /src/RenderingPlugin/WSAVisualStudio2012/RenderingPlugin.vcxproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | Debug 6 | ARM 7 | 8 | 9 | Debug 10 | Win32 11 | 12 | 13 | Debug 14 | x64 15 | 16 | 17 | Release 18 | ARM 19 | 20 | 21 | Release 22 | Win32 23 | 24 | 25 | Release 26 | x64 27 | 28 | 29 | 30 | {15519b07-603e-497b-904c-2d42c403519e} 31 | Win32Proj 32 | RenderingPlugin 33 | RenderingPlugin 34 | en-US 35 | 11.0 36 | true 37 | 38 | 39 | 40 | DynamicLibrary 41 | true 42 | v110 43 | 44 | 45 | DynamicLibrary 46 | true 47 | v110 48 | 49 | 50 | DynamicLibrary 51 | true 52 | v110 53 | 54 | 55 | DynamicLibrary 56 | false 57 | true 58 | v110 59 | 60 | 61 | DynamicLibrary 62 | false 63 | true 64 | v110 65 | 66 | 67 | DynamicLibrary 68 | false 69 | true 70 | v110 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | 91 | 92 | 93 | 94 | false 95 | false 96 | 97 | 98 | false 99 | false 100 | 101 | 102 | false 103 | false 104 | 105 | 106 | false 107 | false 108 | 109 | 110 | false 111 | false 112 | 113 | 114 | false 115 | false 116 | 117 | 118 | 119 | NotUsing 120 | false 121 | _WINDLL;SUPPORT_D3D11;UNITY_METRO;%(PreprocessorDefinitions) 122 | 123 | 124 | Console 125 | false 126 | false 127 | 128 | 129 | if "$(SolutionName)" == "RenderingPlugin" ( 130 | echo Copying plugin files to Unity project 131 | mkdir "$(SolutionDir)..\..\UnityProject\Assets\Plugins" 132 | mkdir "$(SolutionDir)..\..\UnityProject\Assets\Plugins\Metro" 133 | mkdir "$(SolutionDir)..\..\UnityProject\Assets\Plugins\Metro\$(PlatformShortName)" 134 | copy /Y "$(TargetPath)" "$(SolutionDir)..\..\UnityProject\Assets\Plugins\Metro\$(PlatformShortName)\$(TargetFileName)" 135 | 136 | mkdir "$(SolutionDir)..\..\UnityProject\Assets\StreamingAssets" 137 | copy /Y "$(TargetDir)SimpleVertexShader.cso" "$(SolutionDir)..\..\UnityProject\Assets\StreamingAssets\SimpleVertexShader.cso" 138 | copy /Y "$(TargetDir)SimplePixelShader.cso" "$(SolutionDir)..\..\UnityProject\Assets\StreamingAssets\SimplePixelShader.cso" 139 | ) ELSE ( 140 | echo Copying plugin files to $(SolutionName) solution 141 | 142 | mkdir "$(SolutionDir)$(SolutionName)\Plugins" 143 | mkdir "$(SolutionDir)$(SolutionName)\Plugins\Metro" 144 | mkdir "$(SolutionDir)$(SolutionName)\Plugins\Metro\$(PlatformShortName)" 145 | 146 | copy /Y "$(TargetPath)" "$(SolutionDir)$(SolutionName)\Plugins\Metro\$(PlatformShortName)\$(TargetFileName)" 147 | copy /Y "$(TargetDir)SimpleVertexShader.cso" "$(SolutionDir)$(SolutionName)\Data\StreamingAssets\SimpleVertexShader.cso" 148 | copy /Y "$(TargetDir)SimplePixelShader.cso" "$(SolutionDir)$(SolutionName)\Data\StreamingAssets\SimplePixelShader.cso" 149 | ) 150 | 151 | 152 | 153 | 154 | 155 | NotUsing 156 | false 157 | _WINDLL;SUPPORT_D3D11;UNITY_METRO;%(PreprocessorDefinitions) 158 | 159 | 160 | Console 161 | false 162 | false 163 | 164 | 165 | if "$(SolutionName)" == "RenderingPlugin" ( 166 | echo Copying plugin files to Unity project 167 | mkdir "$(SolutionDir)..\..\UnityProject\Assets\Plugins" 168 | mkdir "$(SolutionDir)..\..\UnityProject\Assets\Plugins\Metro" 169 | mkdir "$(SolutionDir)..\..\UnityProject\Assets\Plugins\Metro\$(PlatformShortName)" 170 | copy /Y "$(TargetPath)" "$(SolutionDir)..\..\UnityProject\Assets\Plugins\Metro\$(PlatformShortName)\$(TargetFileName)" 171 | 172 | mkdir "$(SolutionDir)..\..\UnityProject\Assets\StreamingAssets" 173 | copy /Y "$(TargetDir)SimpleVertexShader.cso" "$(SolutionDir)..\..\UnityProject\Assets\StreamingAssets\SimpleVertexShader.cso" 174 | copy /Y "$(TargetDir)SimplePixelShader.cso" "$(SolutionDir)..\..\UnityProject\Assets\StreamingAssets\SimplePixelShader.cso" 175 | ) ELSE ( 176 | echo Copying plugin files to $(SolutionName) solution 177 | 178 | mkdir "$(SolutionDir)$(SolutionName)\Plugins" 179 | mkdir "$(SolutionDir)$(SolutionName)\Plugins\Metro" 180 | mkdir "$(SolutionDir)$(SolutionName)\Plugins\Metro\$(PlatformShortName)" 181 | 182 | copy /Y "$(TargetPath)" "$(SolutionDir)$(SolutionName)\Plugins\Metro\$(PlatformShortName)\$(TargetFileName)" 183 | copy /Y "$(TargetDir)SimpleVertexShader.cso" "$(SolutionDir)$(SolutionName)\Data\StreamingAssets\SimpleVertexShader.cso" 184 | copy /Y "$(TargetDir)SimplePixelShader.cso" "$(SolutionDir)$(SolutionName)\Data\StreamingAssets\SimplePixelShader.cso" 185 | ) 186 | 187 | 188 | 189 | 190 | 191 | NotUsing 192 | false 193 | _WINDLL;SUPPORT_D3D11;UNITY_METRO;%(PreprocessorDefinitions) 194 | 195 | 196 | Console 197 | false 198 | false 199 | 200 | 201 | if "$(SolutionName)" == "RenderingPlugin" ( 202 | echo Copying plugin files to Unity project 203 | mkdir "$(SolutionDir)..\..\UnityProject\Assets\Plugins" 204 | mkdir "$(SolutionDir)..\..\UnityProject\Assets\Plugins\Metro" 205 | mkdir "$(SolutionDir)..\..\UnityProject\Assets\Plugins\Metro\$(PlatformShortName)" 206 | copy /Y "$(TargetPath)" "$(SolutionDir)..\..\UnityProject\Assets\Plugins\Metro\$(PlatformShortName)\$(TargetFileName)" 207 | 208 | mkdir "$(SolutionDir)..\..\UnityProject\Assets\StreamingAssets" 209 | copy /Y "$(TargetDir)SimpleVertexShader.cso" "$(SolutionDir)..\..\UnityProject\Assets\StreamingAssets\SimpleVertexShader.cso" 210 | copy /Y "$(TargetDir)SimplePixelShader.cso" "$(SolutionDir)..\..\UnityProject\Assets\StreamingAssets\SimplePixelShader.cso" 211 | ) ELSE ( 212 | echo Copying plugin files to $(SolutionName) solution 213 | 214 | mkdir "$(SolutionDir)$(SolutionName)\Plugins" 215 | mkdir "$(SolutionDir)$(SolutionName)\Plugins\Metro" 216 | mkdir "$(SolutionDir)$(SolutionName)\Plugins\Metro\$(PlatformShortName)" 217 | 218 | copy /Y "$(TargetPath)" "$(SolutionDir)$(SolutionName)\Plugins\Metro\$(PlatformShortName)\$(TargetFileName)" 219 | copy /Y "$(TargetDir)SimpleVertexShader.cso" "$(SolutionDir)$(SolutionName)\Data\StreamingAssets\SimpleVertexShader.cso" 220 | copy /Y "$(TargetDir)SimplePixelShader.cso" "$(SolutionDir)$(SolutionName)\Data\StreamingAssets\SimplePixelShader.cso" 221 | ) 222 | 223 | 224 | 225 | 226 | 227 | NotUsing 228 | false 229 | _WINDLL;SUPPORT_D3D11;UNITY_METRO;%(PreprocessorDefinitions) 230 | 231 | 232 | Console 233 | false 234 | false 235 | 236 | 237 | if "$(SolutionName)" == "RenderingPlugin" ( 238 | echo Copying plugin files to Unity project 239 | mkdir "$(SolutionDir)..\..\UnityProject\Assets\Plugins" 240 | mkdir "$(SolutionDir)..\..\UnityProject\Assets\Plugins\Metro" 241 | mkdir "$(SolutionDir)..\..\UnityProject\Assets\Plugins\Metro\$(PlatformShortName)" 242 | copy /Y "$(TargetPath)" "$(SolutionDir)..\..\UnityProject\Assets\Plugins\Metro\$(PlatformShortName)\$(TargetFileName)" 243 | 244 | mkdir "$(SolutionDir)..\..\UnityProject\Assets\StreamingAssets" 245 | copy /Y "$(TargetDir)SimpleVertexShader.cso" "$(SolutionDir)..\..\UnityProject\Assets\StreamingAssets\SimpleVertexShader.cso" 246 | copy /Y "$(TargetDir)SimplePixelShader.cso" "$(SolutionDir)..\..\UnityProject\Assets\StreamingAssets\SimplePixelShader.cso" 247 | ) ELSE ( 248 | echo Copying plugin files to $(SolutionName) solution 249 | 250 | mkdir "$(SolutionDir)$(SolutionName)\Plugins" 251 | mkdir "$(SolutionDir)$(SolutionName)\Plugins\Metro" 252 | mkdir "$(SolutionDir)$(SolutionName)\Plugins\Metro\$(PlatformShortName)" 253 | 254 | copy /Y "$(TargetPath)" "$(SolutionDir)$(SolutionName)\Plugins\Metro\$(PlatformShortName)\$(TargetFileName)" 255 | copy /Y "$(TargetDir)SimpleVertexShader.cso" "$(SolutionDir)$(SolutionName)\Data\StreamingAssets\SimpleVertexShader.cso" 256 | copy /Y "$(TargetDir)SimplePixelShader.cso" "$(SolutionDir)$(SolutionName)\Data\StreamingAssets\SimplePixelShader.cso" 257 | ) 258 | 259 | 260 | 261 | 262 | 263 | NotUsing 264 | false 265 | _WINDLL;SUPPORT_D3D11;UNITY_METRO;%(PreprocessorDefinitions) 266 | 267 | 268 | Console 269 | false 270 | false 271 | 272 | 273 | if "$(SolutionName)" == "RenderingPlugin" ( 274 | echo Copying plugin files to Unity project 275 | mkdir "$(SolutionDir)..\..\UnityProject\Assets\Plugins" 276 | mkdir "$(SolutionDir)..\..\UnityProject\Assets\Plugins\Metro" 277 | mkdir "$(SolutionDir)..\..\UnityProject\Assets\Plugins\Metro\$(PlatformShortName)" 278 | copy /Y "$(TargetPath)" "$(SolutionDir)..\..\UnityProject\Assets\Plugins\Metro\$(PlatformShortName)\$(TargetFileName)" 279 | 280 | mkdir "$(SolutionDir)..\..\UnityProject\Assets\StreamingAssets" 281 | copy /Y "$(TargetDir)SimpleVertexShader.cso" "$(SolutionDir)..\..\UnityProject\Assets\StreamingAssets\SimpleVertexShader.cso" 282 | copy /Y "$(TargetDir)SimplePixelShader.cso" "$(SolutionDir)..\..\UnityProject\Assets\StreamingAssets\SimplePixelShader.cso" 283 | ) ELSE ( 284 | echo Copying plugin files to $(SolutionName) solution 285 | 286 | mkdir "$(SolutionDir)$(SolutionName)\Plugins" 287 | mkdir "$(SolutionDir)$(SolutionName)\Plugins\Metro" 288 | mkdir "$(SolutionDir)$(SolutionName)\Plugins\Metro\$(PlatformShortName)" 289 | 290 | copy /Y "$(TargetPath)" "$(SolutionDir)$(SolutionName)\Plugins\Metro\$(PlatformShortName)\$(TargetFileName)" 291 | copy /Y "$(TargetDir)SimpleVertexShader.cso" "$(SolutionDir)$(SolutionName)\Data\StreamingAssets\SimpleVertexShader.cso" 292 | copy /Y "$(TargetDir)SimplePixelShader.cso" "$(SolutionDir)$(SolutionName)\Data\StreamingAssets\SimplePixelShader.cso" 293 | ) 294 | 295 | 296 | 297 | 298 | 299 | NotUsing 300 | false 301 | _WINDLL;SUPPORT_D3D11;UNITY_METRO;%(PreprocessorDefinitions) 302 | 303 | 304 | Console 305 | false 306 | false 307 | 308 | 309 | if "$(SolutionName)" == "RenderingPlugin" ( 310 | echo Copying plugin files to Unity project 311 | mkdir "$(SolutionDir)..\..\UnityProject\Assets\Plugins" 312 | mkdir "$(SolutionDir)..\..\UnityProject\Assets\Plugins\Metro" 313 | mkdir "$(SolutionDir)..\..\UnityProject\Assets\Plugins\Metro\$(PlatformShortName)" 314 | copy /Y "$(TargetPath)" "$(SolutionDir)..\..\UnityProject\Assets\Plugins\Metro\$(PlatformShortName)\$(TargetFileName)" 315 | 316 | mkdir "$(SolutionDir)..\..\UnityProject\Assets\StreamingAssets" 317 | copy /Y "$(TargetDir)SimpleVertexShader.cso" "$(SolutionDir)..\..\UnityProject\Assets\StreamingAssets\SimpleVertexShader.cso" 318 | copy /Y "$(TargetDir)SimplePixelShader.cso" "$(SolutionDir)..\..\UnityProject\Assets\StreamingAssets\SimplePixelShader.cso" 319 | ) ELSE ( 320 | echo Copying plugin files to $(SolutionName) solution 321 | 322 | mkdir "$(SolutionDir)$(SolutionName)\Plugins" 323 | mkdir "$(SolutionDir)$(SolutionName)\Plugins\Metro" 324 | mkdir "$(SolutionDir)$(SolutionName)\Plugins\Metro\$(PlatformShortName)" 325 | 326 | copy /Y "$(TargetPath)" "$(SolutionDir)$(SolutionName)\Plugins\Metro\$(PlatformShortName)\$(TargetFileName)" 327 | copy /Y "$(TargetDir)SimpleVertexShader.cso" "$(SolutionDir)$(SolutionName)\Data\StreamingAssets\SimpleVertexShader.cso" 328 | copy /Y "$(TargetDir)SimplePixelShader.cso" "$(SolutionDir)$(SolutionName)\Data\StreamingAssets\SimplePixelShader.cso" 329 | ) 330 | 331 | 332 | 333 | 334 | 335 | 336 | 337 | 338 | 339 | 340 | 341 | 342 | Pixel 343 | 4.0_level_9_1 344 | PS 345 | PS 346 | PS 347 | PS 348 | PS 349 | PS 350 | Pixel 351 | Pixel 352 | Pixel 353 | 4.0_level_9_1 354 | Pixel 355 | 4.0_level_9_1 356 | Pixel 357 | 4.0_level_9_1 358 | 359 | 360 | Vertex 361 | 4.0_level_9_1 362 | VS 363 | VS 364 | VS 365 | VS 366 | VS 367 | VS 368 | Vertex 369 | Vertex 370 | Vertex 371 | 4.0_level_9_1 372 | Vertex 373 | 4.0_level_9_1 374 | Vertex 375 | 4.0_level_9_1 376 | 377 | 378 | 379 | 380 | 381 | 382 | 383 | 384 | -------------------------------------------------------------------------------- /src/RenderingPlugin/WSAVisualStudio2012/RenderingPlugin.vcxproj.filters: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} 6 | rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | -------------------------------------------------------------------------------- /src/RenderingPlugin/WSAVisualStudio2012/SimplePixelShader.hlsl: -------------------------------------------------------------------------------- 1 | float4 PS (float4 color : COLOR) : SV_TARGET 2 | { 3 | return color; 4 | } -------------------------------------------------------------------------------- /src/RenderingPlugin/WSAVisualStudio2012/SimpleVertexShader.hlsl: -------------------------------------------------------------------------------- 1 | 2 | cbuffer MyCB : register(b0) 3 | { 4 | float4x4 worldMatrix; 5 | } 6 | void VS (float3 pos : POSITION, float4 color : COLOR, out float4 ocolor : COLOR, out float4 opos : SV_Position) 7 | { 8 | opos = mul (worldMatrix, float4(pos,1)); 9 | ocolor = color; 10 | } -------------------------------------------------------------------------------- /src/RenderingPlugin/WSAVisualStudio2012/dllmain.cpp: -------------------------------------------------------------------------------- 1 | // dllmain.cpp : Defines the entry point for the DLL application. 2 | #include 3 | 4 | BOOL APIENTRY DllMain(HMODULE /* hModule */, DWORD ul_reason_for_call, LPVOID /* lpReserved */) 5 | { 6 | switch (ul_reason_for_call) 7 | { 8 | case DLL_PROCESS_ATTACH: 9 | case DLL_THREAD_ATTACH: 10 | case DLL_THREAD_DETACH: 11 | case DLL_PROCESS_DETACH: 12 | break; 13 | } 14 | return TRUE; 15 | } 16 | 17 | -------------------------------------------------------------------------------- /src/RenderingPlugin/Xcode3/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | English 7 | CFBundleExecutable 8 | ${EXECUTABLE_NAME} 9 | CFBundleIconFile 10 | 11 | CFBundleIdentifier 12 | com.yourcompany.${PRODUCT_NAME:rfc1034Identifier} 13 | CFBundleInfoDictionaryVersion 14 | 6.0 15 | CFBundleName 16 | ${PRODUCT_NAME} 17 | CFBundlePackageType 18 | BNDL 19 | CFBundleShortVersionString 20 | 1.0 21 | CFBundleSignature 22 | ???? 23 | CFBundleVersion 24 | 1 25 | CFPlugInDynamicRegisterFunction 26 | 27 | CFPlugInDynamicRegistration 28 | NO 29 | CFPlugInFactories 30 | 31 | 00000000-0000-0000-0000-000000000000 32 | MyFactoryFunction 33 | 34 | CFPlugInTypes 35 | 36 | 00000000-0000-0000-0000-000000000000 37 | 38 | 00000000-0000-0000-0000-000000000000 39 | 40 | 41 | CFPlugInUnloadFunction 42 | 43 | 44 | 45 | -------------------------------------------------------------------------------- /src/RenderingPlugin/Xcode3/RenderingPlugin.xcodeproj/project.pbxproj: -------------------------------------------------------------------------------- 1 | // !$*UTF8*$! 2 | { 3 | archiveVersion = 1; 4 | classes = { 5 | }; 6 | objectVersion = 45; 7 | objects = { 8 | 9 | /* Begin PBXBuildFile section */ 10 | 2BC2A8C8144C3B6500D5EF79 /* RenderingPlugin.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 2BC2A8C7144C3B6500D5EF79 /* RenderingPlugin.cpp */; }; 11 | 2BC2A8D5144C433D00D5EF79 /* OpenGL.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 2BC2A8D4144C433D00D5EF79 /* OpenGL.framework */; }; 12 | 8D576314048677EA00EA77CD /* CoreFoundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 0AA1909FFE8422F4C02AAC07 /* CoreFoundation.framework */; }; 13 | /* End PBXBuildFile section */ 14 | 15 | /* Begin PBXFileReference section */ 16 | 0AA1909FFE8422F4C02AAC07 /* CoreFoundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreFoundation.framework; path = /System/Library/Frameworks/CoreFoundation.framework; sourceTree = ""; }; 17 | 2BB5EE81144C912A00C65AD3 /* UnityPluginInterface.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = UnityPluginInterface.h; path = ../UnityPluginInterface.h; sourceTree = SOURCE_ROOT; }; 18 | 2BC2A8C7144C3B6500D5EF79 /* RenderingPlugin.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = RenderingPlugin.cpp; path = ../RenderingPlugin.cpp; sourceTree = SOURCE_ROOT; }; 19 | 2BC2A8D4144C433D00D5EF79 /* OpenGL.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = OpenGL.framework; path = System/Library/Frameworks/OpenGL.framework; sourceTree = SDKROOT; }; 20 | 8D576316048677EA00EA77CD /* RenderingPlugin.bundle */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = RenderingPlugin.bundle; sourceTree = BUILT_PRODUCTS_DIR; }; 21 | 8D576317048677EA00EA77CD /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 22 | /* End PBXFileReference section */ 23 | 24 | /* Begin PBXFrameworksBuildPhase section */ 25 | 8D576313048677EA00EA77CD /* Frameworks */ = { 26 | isa = PBXFrameworksBuildPhase; 27 | buildActionMask = 2147483647; 28 | files = ( 29 | 8D576314048677EA00EA77CD /* CoreFoundation.framework in Frameworks */, 30 | 2BC2A8D5144C433D00D5EF79 /* OpenGL.framework in Frameworks */, 31 | ); 32 | runOnlyForDeploymentPostprocessing = 0; 33 | }; 34 | /* End PBXFrameworksBuildPhase section */ 35 | 36 | /* Begin PBXGroup section */ 37 | 089C166AFE841209C02AAC07 /* RenderingPlugin */ = { 38 | isa = PBXGroup; 39 | children = ( 40 | 08FB77AFFE84173DC02AAC07 /* Source */, 41 | 089C167CFE841241C02AAC07 /* Resources */, 42 | 089C1671FE841209C02AAC07 /* External Frameworks and Libraries */, 43 | 19C28FB6FE9D52B211CA2CBB /* Products */, 44 | ); 45 | name = RenderingPlugin; 46 | sourceTree = ""; 47 | }; 48 | 089C1671FE841209C02AAC07 /* External Frameworks and Libraries */ = { 49 | isa = PBXGroup; 50 | children = ( 51 | 0AA1909FFE8422F4C02AAC07 /* CoreFoundation.framework */, 52 | 2BC2A8D4144C433D00D5EF79 /* OpenGL.framework */, 53 | ); 54 | name = "External Frameworks and Libraries"; 55 | sourceTree = ""; 56 | }; 57 | 089C167CFE841241C02AAC07 /* Resources */ = { 58 | isa = PBXGroup; 59 | children = ( 60 | 8D576317048677EA00EA77CD /* Info.plist */, 61 | ); 62 | name = Resources; 63 | sourceTree = ""; 64 | }; 65 | 08FB77AFFE84173DC02AAC07 /* Source */ = { 66 | isa = PBXGroup; 67 | children = ( 68 | 2BB5EE81144C912A00C65AD3 /* UnityPluginInterface.h */, 69 | 2BC2A8C7144C3B6500D5EF79 /* RenderingPlugin.cpp */, 70 | ); 71 | name = Source; 72 | sourceTree = ""; 73 | }; 74 | 19C28FB6FE9D52B211CA2CBB /* Products */ = { 75 | isa = PBXGroup; 76 | children = ( 77 | 8D576316048677EA00EA77CD /* RenderingPlugin.bundle */, 78 | ); 79 | name = Products; 80 | sourceTree = ""; 81 | }; 82 | /* End PBXGroup section */ 83 | 84 | /* Begin PBXNativeTarget section */ 85 | 8D57630D048677EA00EA77CD /* RenderingPlugin */ = { 86 | isa = PBXNativeTarget; 87 | buildConfigurationList = 1DEB911A08733D790010E9CD /* Build configuration list for PBXNativeTarget "RenderingPlugin" */; 88 | buildPhases = ( 89 | 8D57630F048677EA00EA77CD /* Resources */, 90 | 8D576311048677EA00EA77CD /* Sources */, 91 | 8D576313048677EA00EA77CD /* Frameworks */, 92 | ); 93 | buildRules = ( 94 | ); 95 | dependencies = ( 96 | ); 97 | name = RenderingPlugin; 98 | productInstallPath = "$(HOME)/Library/Bundles"; 99 | productName = RenderingPlugin; 100 | productReference = 8D576316048677EA00EA77CD /* RenderingPlugin.bundle */; 101 | productType = "com.apple.product-type.bundle"; 102 | }; 103 | /* End PBXNativeTarget section */ 104 | 105 | /* Begin PBXProject section */ 106 | 089C1669FE841209C02AAC07 /* Project object */ = { 107 | isa = PBXProject; 108 | buildConfigurationList = 1DEB911E08733D790010E9CD /* Build configuration list for PBXProject "RenderingPlugin" */; 109 | compatibilityVersion = "Xcode 3.1"; 110 | developmentRegion = English; 111 | hasScannedForEncodings = 1; 112 | knownRegions = ( 113 | English, 114 | Japanese, 115 | French, 116 | German, 117 | ); 118 | mainGroup = 089C166AFE841209C02AAC07 /* RenderingPlugin */; 119 | projectDirPath = ""; 120 | projectRoot = ""; 121 | targets = ( 122 | 8D57630D048677EA00EA77CD /* RenderingPlugin */, 123 | ); 124 | }; 125 | /* End PBXProject section */ 126 | 127 | /* Begin PBXResourcesBuildPhase section */ 128 | 8D57630F048677EA00EA77CD /* Resources */ = { 129 | isa = PBXResourcesBuildPhase; 130 | buildActionMask = 2147483647; 131 | files = ( 132 | ); 133 | runOnlyForDeploymentPostprocessing = 0; 134 | }; 135 | /* End PBXResourcesBuildPhase section */ 136 | 137 | /* Begin PBXSourcesBuildPhase section */ 138 | 8D576311048677EA00EA77CD /* Sources */ = { 139 | isa = PBXSourcesBuildPhase; 140 | buildActionMask = 2147483647; 141 | files = ( 142 | 2BC2A8C8144C3B6500D5EF79 /* RenderingPlugin.cpp in Sources */, 143 | ); 144 | runOnlyForDeploymentPostprocessing = 0; 145 | }; 146 | /* End PBXSourcesBuildPhase section */ 147 | 148 | /* Begin XCBuildConfiguration section */ 149 | 1DEB911B08733D790010E9CD /* Debug */ = { 150 | isa = XCBuildConfiguration; 151 | buildSettings = { 152 | ALWAYS_SEARCH_USER_PATHS = NO; 153 | COPY_PHASE_STRIP = NO; 154 | GCC_DYNAMIC_NO_PIC = NO; 155 | GCC_ENABLE_FIX_AND_CONTINUE = YES; 156 | GCC_MODEL_TUNING = G5; 157 | GCC_OPTIMIZATION_LEVEL = 0; 158 | INFOPLIST_FILE = Info.plist; 159 | INSTALL_PATH = "$(HOME)/Library/Bundles"; 160 | PRODUCT_NAME = RenderingPlugin; 161 | WRAPPER_EXTENSION = bundle; 162 | }; 163 | name = Debug; 164 | }; 165 | 1DEB911C08733D790010E9CD /* Release */ = { 166 | isa = XCBuildConfiguration; 167 | buildSettings = { 168 | ALWAYS_SEARCH_USER_PATHS = NO; 169 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; 170 | GCC_MODEL_TUNING = G5; 171 | INFOPLIST_FILE = Info.plist; 172 | INSTALL_PATH = "$(HOME)/Library/Bundles"; 173 | PRODUCT_NAME = RenderingPlugin; 174 | WRAPPER_EXTENSION = bundle; 175 | }; 176 | name = Release; 177 | }; 178 | 1DEB911F08733D790010E9CD /* Debug */ = { 179 | isa = XCBuildConfiguration; 180 | buildSettings = { 181 | ARCHS = "$(ARCHS_STANDARD_32_64_BIT)"; 182 | GCC_C_LANGUAGE_STANDARD = gnu99; 183 | GCC_OPTIMIZATION_LEVEL = 0; 184 | GCC_WARN_ABOUT_RETURN_TYPE = YES; 185 | GCC_WARN_UNUSED_VARIABLE = YES; 186 | MACOSX_DEPLOYMENT_TARGET = 10.5; 187 | ONLY_ACTIVE_ARCH = YES; 188 | PREBINDING = NO; 189 | SDKROOT = macosx; 190 | }; 191 | name = Debug; 192 | }; 193 | 1DEB912008733D790010E9CD /* Release */ = { 194 | isa = XCBuildConfiguration; 195 | buildSettings = { 196 | ARCHS = "$(ARCHS_STANDARD_32_64_BIT)"; 197 | GCC_C_LANGUAGE_STANDARD = gnu99; 198 | GCC_WARN_ABOUT_RETURN_TYPE = YES; 199 | GCC_WARN_UNUSED_VARIABLE = YES; 200 | MACOSX_DEPLOYMENT_TARGET = 10.5; 201 | PREBINDING = NO; 202 | SDKROOT = macosx; 203 | }; 204 | name = Release; 205 | }; 206 | /* End XCBuildConfiguration section */ 207 | 208 | /* Begin XCConfigurationList section */ 209 | 1DEB911A08733D790010E9CD /* Build configuration list for PBXNativeTarget "RenderingPlugin" */ = { 210 | isa = XCConfigurationList; 211 | buildConfigurations = ( 212 | 1DEB911B08733D790010E9CD /* Debug */, 213 | 1DEB911C08733D790010E9CD /* Release */, 214 | ); 215 | defaultConfigurationIsVisible = 0; 216 | defaultConfigurationName = Release; 217 | }; 218 | 1DEB911E08733D790010E9CD /* Build configuration list for PBXProject "RenderingPlugin" */ = { 219 | isa = XCConfigurationList; 220 | buildConfigurations = ( 221 | 1DEB911F08733D790010E9CD /* Debug */, 222 | 1DEB912008733D790010E9CD /* Release */, 223 | ); 224 | defaultConfigurationIsVisible = 0; 225 | defaultConfigurationName = Release; 226 | }; 227 | /* End XCConfigurationList section */ 228 | }; 229 | rootObject = 089C1669FE841209C02AAC07 /* Project object */; 230 | } 231 | -------------------------------------------------------------------------------- /src/Unity4Project/Assets/Editor/MyBuildPostprocessor.cs: -------------------------------------------------------------------------------- 1 | using UnityEngine; 2 | using UnityEditor; 3 | using UnityEditor.Callbacks; 4 | using System.IO; 5 | 6 | public class MyBuildPostprocessor 7 | { 8 | [PostProcessBuild] 9 | public static void OnPostprocessBuild(BuildTarget target, string pathToBuiltProject) 10 | { 11 | if(target == BuildTarget.MetroPlayer) 12 | OnPostprocessBuildWSA(pathToBuiltProject); 13 | else if(target == BuildTarget.iPhone) 14 | OnPostprocessBuildIOS(pathToBuiltProject); 15 | } 16 | 17 | private static void OnPostprocessBuildIOS(string pathToBuiltProject) 18 | { 19 | File.Copy("../RenderingPlugin/UnityPluginInterface.h", Path.Combine(pathToBuiltProject, "Libraries/UnityPluginInterface.h"), true); 20 | File.Copy("../RenderingPlugin/RenderingPluginGLES.cpp", Path.Combine(pathToBuiltProject, "Libraries/RenderingPluginGLES.cpp"), true); 21 | 22 | // TODO: for now project api is not exposed, so you need to add files manually 23 | } 24 | 25 | private static void OnPostprocessBuildWSA(string pathToBuiltProject) 26 | { 27 | string exportedPath = Path.Combine(pathToBuiltProject, PlayerSettings.productName); 28 | 29 | string[] filesToSearch = new[] { "App.cpp", "App.xaml.cpp", "App.cs", "App.xaml.cs" }; 30 | 31 | bool patched = false; 32 | for (int i = 0; i < filesToSearch.Length; i++) 33 | { 34 | string path = Path.Combine(exportedPath, filesToSearch[i]); 35 | if (path.Contains(".cpp") && PatchFile(path, "m_AppCallbacks->SetBridge(_bridge);", "m_AppCallbacks->SetBridge(_bridge);\r\n\tm_AppCallbacks->LoadGfxNativePlugin(\"RenderingPlugin.dll\");")) 36 | { 37 | patched = true; 38 | break; 39 | } 40 | if (path.Contains(".cs") && PatchFile(path, "appCallbacks.SetBridge(_bridge);", "appCallbacks.SetBridge(_bridge);\r\n\t\t\t\tappCallbacks.LoadGfxNativePlugin(\"RenderingPlugin.dll\");")) 41 | { 42 | patched = true; 43 | break; 44 | } 45 | } 46 | 47 | if (!patched) Debug.LogError("Failed to patch file"); 48 | } 49 | 50 | 51 | private static bool PatchFile(string fileName, string targetString, string replacement) 52 | { 53 | if (File.Exists(fileName) == false) return false; 54 | 55 | string text = File.ReadAllText(fileName); 56 | 57 | if (text.IndexOf(targetString) == -1) return false; 58 | 59 | // Already patched ? 60 | if (text.IndexOf(replacement) != -1) return true; 61 | 62 | text = text.Replace(targetString, replacement); 63 | 64 | File.WriteAllText(fileName, text); 65 | 66 | return true; 67 | } 68 | } 69 | -------------------------------------------------------------------------------- /src/Unity4Project/Assets/Plugins/Android/libRenderingPlugin.so: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hacksalot/unity-render-native/4285af04d6dd009d62a7db58e1b6fb07efc5238c/src/Unity4Project/Assets/Plugins/Android/libRenderingPlugin.so -------------------------------------------------------------------------------- /src/Unity4Project/Assets/Plugins/Metro/ARM/RenderingPlugin.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hacksalot/unity-render-native/4285af04d6dd009d62a7db58e1b6fb07efc5238c/src/Unity4Project/Assets/Plugins/Metro/ARM/RenderingPlugin.dll -------------------------------------------------------------------------------- /src/Unity4Project/Assets/Plugins/Metro/x86/RenderingPlugin.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hacksalot/unity-render-native/4285af04d6dd009d62a7db58e1b6fb07efc5238c/src/Unity4Project/Assets/Plugins/Metro/x86/RenderingPlugin.dll -------------------------------------------------------------------------------- /src/Unity4Project/Assets/Plugins/RenderingPlugin.bundle/Contents/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | BuildMachineOSBuild 6 | 11E53 7 | CFBundleDevelopmentRegion 8 | English 9 | CFBundleExecutable 10 | RenderingPlugin 11 | CFBundleIdentifier 12 | com.yourcompany.RenderingPlugin 13 | CFBundleInfoDictionaryVersion 14 | 6.0 15 | CFBundleName 16 | RenderingPlugin 17 | CFBundlePackageType 18 | BNDL 19 | CFBundleShortVersionString 20 | 1.0 21 | CFBundleSignature 22 | ???? 23 | CFBundleVersion 24 | 1 25 | CFPlugInDynamicRegisterFunction 26 | 27 | CFPlugInDynamicRegistration 28 | NO 29 | CFPlugInFactories 30 | 31 | 00000000-0000-0000-0000-000000000000 32 | MyFactoryFunction 33 | 34 | CFPlugInTypes 35 | 36 | 00000000-0000-0000-0000-000000000000 37 | 38 | 00000000-0000-0000-0000-000000000000 39 | 40 | 41 | CFPlugInUnloadFunction 42 | 43 | DTCompiler 44 | 45 | DTPlatformBuild 46 | 10M2518 47 | DTPlatformVersion 48 | PG 49 | DTSDKBuild 50 | 10M2518 51 | DTSDKName 52 | macosx10.6 53 | DTXcode 54 | 0400 55 | DTXcodeBuild 56 | 10M2518 57 | 58 | 59 | -------------------------------------------------------------------------------- /src/Unity4Project/Assets/Plugins/RenderingPlugin.bundle/Contents/MacOS/RenderingPlugin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hacksalot/unity-render-native/4285af04d6dd009d62a7db58e1b6fb07efc5238c/src/Unity4Project/Assets/Plugins/RenderingPlugin.bundle/Contents/MacOS/RenderingPlugin -------------------------------------------------------------------------------- /src/Unity4Project/Assets/Plugins/RenderingPlugin.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hacksalot/unity-render-native/4285af04d6dd009d62a7db58e1b6fb07efc5238c/src/Unity4Project/Assets/Plugins/RenderingPlugin.dll -------------------------------------------------------------------------------- /src/Unity4Project/Assets/Plugins/iOS/MyAppController.mm: -------------------------------------------------------------------------------- 1 | #import 2 | #import "UnityAppController.h" 3 | 4 | extern "C" void UnitySetGraphicsDevice(void* device, int deviceType, int eventType); 5 | extern "C" void UnityRenderEvent(int marker); 6 | 7 | @interface MyAppController : UnityAppController 8 | { 9 | } 10 | - (void)shouldAttachRenderDelegate; 11 | @end 12 | 13 | @implementation MyAppController 14 | 15 | - (void)shouldAttachRenderDelegate; 16 | { 17 | UnityRegisterRenderingPlugin(&UnitySetGraphicsDevice, &UnityRenderEvent); 18 | } 19 | @end 20 | 21 | 22 | IMPL_APP_CONTROLLER_SUBCLASS(MyAppController) 23 | 24 | -------------------------------------------------------------------------------- /src/Unity4Project/Assets/Plugins/x86/libRenderingPlugin.so: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hacksalot/unity-render-native/4285af04d6dd009d62a7db58e1b6fb07efc5238c/src/Unity4Project/Assets/Plugins/x86/libRenderingPlugin.so -------------------------------------------------------------------------------- /src/Unity4Project/Assets/Plugins/x86_64/libRenderingPlugin.so: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hacksalot/unity-render-native/4285af04d6dd009d62a7db58e1b6fb07efc5238c/src/Unity4Project/Assets/Plugins/x86_64/libRenderingPlugin.so -------------------------------------------------------------------------------- /src/Unity4Project/Assets/StreamingAssets/SimplePixelShader.cso: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hacksalot/unity-render-native/4285af04d6dd009d62a7db58e1b6fb07efc5238c/src/Unity4Project/Assets/StreamingAssets/SimplePixelShader.cso -------------------------------------------------------------------------------- /src/Unity4Project/Assets/StreamingAssets/SimpleVertexShader.cso: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hacksalot/unity-render-native/4285af04d6dd009d62a7db58e1b6fb07efc5238c/src/Unity4Project/Assets/StreamingAssets/SimpleVertexShader.cso -------------------------------------------------------------------------------- /src/Unity4Project/Assets/UseRenderingPlugin.cs: -------------------------------------------------------------------------------- 1 | // on OpenGL ES there is no way to query texture extents from native texture id 2 | #if (UNITY_IPHONE || UNITY_ANDROID) && !UNITY_EDITOR 3 | #define UNITY_GLES_RENDERER 4 | #endif 5 | 6 | 7 | using UnityEngine; 8 | using System.Collections; 9 | using System.Runtime.InteropServices; 10 | 11 | 12 | public class UseRenderingPlugin : MonoBehaviour 13 | { 14 | // Native plugin rendering events are only called if a plugin is used 15 | // by some script. This means we have to DllImport at least 16 | // one function in some active script. 17 | // For this example, we'll call into plugin's SetTimeFromUnity 18 | // function and pass the current time so the plugin can animate. 19 | 20 | #if UNITY_IPHONE && !UNITY_EDITOR 21 | [DllImport ("__Internal")] 22 | #else 23 | [DllImport ("RenderingPlugin")] 24 | #endif 25 | private static extern void SetTimeFromUnity(float t); 26 | 27 | 28 | // We'll also pass native pointer to a texture in Unity. 29 | // The plugin will fill texture data from native code. 30 | #if UNITY_IPHONE && !UNITY_EDITOR 31 | [DllImport ("__Internal")] 32 | #else 33 | [DllImport ("RenderingPlugin")] 34 | #endif 35 | #if UNITY_GLES_RENDERER 36 | private static extern void SetTextureFromUnity(System.IntPtr texture, int w, int h); 37 | #else 38 | private static extern void SetTextureFromUnity(System.IntPtr texture); 39 | #endif 40 | 41 | 42 | IEnumerator Start () { 43 | CreateTextureAndPassToPlugin(); 44 | yield return StartCoroutine("CallPluginAtEndOfFrames"); 45 | } 46 | 47 | private void CreateTextureAndPassToPlugin() 48 | { 49 | // Create a texture 50 | Texture2D tex = new Texture2D(256,256,TextureFormat.ARGB32,false); 51 | // Set point filtering just so we can see the pixels clearly 52 | tex.filterMode = FilterMode.Point; 53 | // Call Apply() so it's actually uploaded to the GPU 54 | tex.Apply(); 55 | 56 | // Set texture onto our matrial 57 | GetComponent().material.mainTexture = tex; 58 | 59 | // Pass texture pointer to the plugin 60 | #if UNITY_GLES_RENDERER 61 | SetTextureFromUnity (tex.GetNativeTexturePtr(), tex.width, tex.height); 62 | #else 63 | SetTextureFromUnity (tex.GetNativeTexturePtr()); 64 | #endif 65 | } 66 | 67 | private IEnumerator CallPluginAtEndOfFrames() 68 | { 69 | while (true) { 70 | // Wait until all frame rendering is done 71 | yield return new WaitForEndOfFrame(); 72 | 73 | // Set time for the plugin 74 | SetTimeFromUnity (Time.timeSinceLevelLoad); 75 | 76 | // Issue a plugin event with arbitrary integer identifier. 77 | // The plugin can distinguish between different 78 | // things it needs to do based on this ID. 79 | // For our simple plugin, it does not matter which ID we pass here. 80 | GL.IssuePluginEvent (1); 81 | } 82 | } 83 | } 84 | -------------------------------------------------------------------------------- /src/Unity4Project/Assets/scene.unity: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!29 &1 4 | SceneSettings: 5 | m_ObjectHideFlags: 0 6 | m_PVSData: 7 | m_PVSObjectsArray: [] 8 | m_PVSPortalsArray: [] 9 | m_OcclusionBakeSettings: 10 | viewCellSize: 1 11 | bakeMode: 2 12 | memoryUsage: 10485760 13 | --- !u!104 &2 14 | RenderSettings: 15 | m_Fog: 0 16 | m_FogColor: {r: .5, g: .5, b: .5, a: 1} 17 | m_FogMode: 3 18 | m_FogDensity: .00999999978 19 | m_LinearFogStart: 0 20 | m_LinearFogEnd: 300 21 | m_AmbientLight: {r: .0989079997, g: .100484997, b: .119402997, a: 1} 22 | m_SkyboxMaterial: {fileID: 0} 23 | m_HaloStrength: .5 24 | m_FlareStrength: 1 25 | m_HaloTexture: {fileID: 0} 26 | m_SpotCookie: {fileID: 0} 27 | m_ObjectHideFlags: 0 28 | --- !u!127 &3 29 | GameManager: 30 | m_ObjectHideFlags: 0 31 | --- !u!157 &4 32 | LightmapSettings: 33 | m_ObjectHideFlags: 0 34 | m_LightProbes: {fileID: 0} 35 | m_Lightmaps: [] 36 | m_LightmapsMode: 1 37 | m_BakedColorSpace: 0 38 | m_UseDualLightmapsInForward: 0 39 | m_LightmapEditorSettings: 40 | m_Resolution: 50 41 | m_LastUsedResolution: 0 42 | m_TextureWidth: 1024 43 | m_TextureHeight: 1024 44 | m_BounceBoost: 1 45 | m_BounceIntensity: 1 46 | m_SkyLightColor: {r: .860000014, g: .930000007, b: 1, a: 1} 47 | m_SkyLightIntensity: 0 48 | m_Quality: 0 49 | m_Bounces: 1 50 | m_FinalGatherRays: 1000 51 | m_FinalGatherContrastThreshold: .0500000007 52 | m_FinalGatherGradientThreshold: 0 53 | m_FinalGatherInterpolationPoints: 15 54 | m_AOAmount: 0 55 | m_AOMaxDistance: .100000001 56 | m_AOContrast: 1 57 | m_LODSurfaceMappingDistance: 1 58 | m_Padding: 0 59 | m_TextureCompression: 0 60 | m_LockAtlas: 0 61 | --- !u!196 &5 62 | NavMeshSettings: 63 | m_ObjectHideFlags: 0 64 | m_BuildSettings: 65 | agentRadius: .400000006 66 | agentHeight: 1.79999995 67 | agentSlope: 45 68 | agentClimb: .899999976 69 | ledgeDropHeight: 0 70 | maxJumpAcrossDistance: 0 71 | accuratePlacement: 0 72 | minRegionArea: 2 73 | widthInaccuracy: 16.666666 74 | heightInaccuracy: 10 75 | m_NavMesh: {fileID: 0} 76 | --- !u!1 &7 77 | GameObject: 78 | m_ObjectHideFlags: 0 79 | m_PrefabParentObject: {fileID: 0} 80 | m_PrefabInternal: {fileID: 0} 81 | serializedVersion: 4 82 | m_Component: 83 | - 4: {fileID: 9} 84 | - 20: {fileID: 10} 85 | - 92: {fileID: 12} 86 | - 124: {fileID: 13} 87 | - 81: {fileID: 11} 88 | m_Layer: 0 89 | m_Name: Main Camera 90 | m_TagString: MainCamera 91 | m_Icon: {fileID: 0} 92 | m_NavMeshLayer: 0 93 | m_StaticEditorFlags: 0 94 | m_IsActive: 1 95 | --- !u!4 &9 96 | Transform: 97 | m_ObjectHideFlags: 0 98 | m_PrefabParentObject: {fileID: 0} 99 | m_PrefabInternal: {fileID: 0} 100 | m_GameObject: {fileID: 7} 101 | m_LocalRotation: {x: -.136914968, y: -.837411821, z: .24425894, w: -.469396889} 102 | m_LocalPosition: {x: -1.91313601, y: 2.25397706, z: .506491005} 103 | m_LocalScale: {x: 1, y: 1, z: 1} 104 | m_Children: [] 105 | m_Father: {fileID: 0} 106 | --- !u!20 &10 107 | Camera: 108 | m_ObjectHideFlags: 0 109 | m_PrefabParentObject: {fileID: 0} 110 | m_PrefabInternal: {fileID: 0} 111 | m_GameObject: {fileID: 7} 112 | m_Enabled: 1 113 | serializedVersion: 2 114 | m_ClearFlags: 1 115 | m_BackGroundColor: {r: .192157, g: .301961005, b: .474510014, a: .0196080003} 116 | m_NormalizedViewPortRect: 117 | serializedVersion: 2 118 | x: 0 119 | y: 0 120 | width: 1 121 | height: 1 122 | near clip plane: 1 123 | far clip plane: 30 124 | field of view: 60 125 | orthographic: 0 126 | orthographic size: 100 127 | m_Depth: -1 128 | m_CullingMask: 129 | serializedVersion: 2 130 | m_Bits: 4294967295 131 | m_RenderingPath: -1 132 | m_TargetTexture: {fileID: 0} 133 | m_HDR: 0 134 | --- !u!81 &11 135 | AudioListener: 136 | m_ObjectHideFlags: 0 137 | m_PrefabParentObject: {fileID: 0} 138 | m_PrefabInternal: {fileID: 0} 139 | m_GameObject: {fileID: 7} 140 | m_Enabled: 1 141 | --- !u!92 &12 142 | Behaviour: 143 | m_ObjectHideFlags: 0 144 | m_PrefabParentObject: {fileID: 0} 145 | m_PrefabInternal: {fileID: 0} 146 | m_GameObject: {fileID: 7} 147 | m_Enabled: 1 148 | --- !u!124 &13 149 | Behaviour: 150 | m_ObjectHideFlags: 0 151 | m_PrefabParentObject: {fileID: 0} 152 | m_PrefabInternal: {fileID: 0} 153 | m_GameObject: {fileID: 7} 154 | m_Enabled: 1 155 | --- !u!1 &15 156 | GameObject: 157 | m_ObjectHideFlags: 0 158 | m_PrefabParentObject: {fileID: 0} 159 | m_PrefabInternal: {fileID: 0} 160 | serializedVersion: 4 161 | m_Component: 162 | - 4: {fileID: 19} 163 | - 108: {fileID: 28} 164 | m_Layer: 0 165 | m_Name: Spotlight 166 | m_TagString: Untagged 167 | m_Icon: {fileID: 0} 168 | m_NavMeshLayer: 0 169 | m_StaticEditorFlags: 0 170 | m_IsActive: 1 171 | --- !u!1 &16 172 | GameObject: 173 | m_ObjectHideFlags: 0 174 | m_PrefabParentObject: {fileID: 0} 175 | m_PrefabInternal: {fileID: 0} 176 | serializedVersion: 4 177 | m_Component: 178 | - 4: {fileID: 20} 179 | - 108: {fileID: 29} 180 | m_Layer: 0 181 | m_Name: Directional light 182 | m_TagString: Untagged 183 | m_Icon: {fileID: 0} 184 | m_NavMeshLayer: 0 185 | m_StaticEditorFlags: 0 186 | m_IsActive: 1 187 | --- !u!1 &17 188 | GameObject: 189 | m_ObjectHideFlags: 0 190 | m_PrefabParentObject: {fileID: 0} 191 | m_PrefabInternal: {fileID: 0} 192 | serializedVersion: 4 193 | m_Component: 194 | - 4: {fileID: 21} 195 | - 33: {fileID: 25} 196 | - 135: {fileID: 30} 197 | - 23: {fileID: 23} 198 | m_Layer: 0 199 | m_Name: Sphere 200 | m_TagString: Untagged 201 | m_Icon: {fileID: 0} 202 | m_NavMeshLayer: 0 203 | m_StaticEditorFlags: 0 204 | m_IsActive: 1 205 | --- !u!1 &18 206 | GameObject: 207 | m_ObjectHideFlags: 0 208 | m_PrefabParentObject: {fileID: 0} 209 | m_PrefabInternal: {fileID: 0} 210 | serializedVersion: 4 211 | m_Component: 212 | - 4: {fileID: 22} 213 | - 33: {fileID: 26} 214 | - 64: {fileID: 27} 215 | - 23: {fileID: 24} 216 | - 114: {fileID: 31} 217 | m_Layer: 0 218 | m_Name: PlaneThatCallsIntoPlugin 219 | m_TagString: Untagged 220 | m_Icon: {fileID: 0} 221 | m_NavMeshLayer: 0 222 | m_StaticEditorFlags: 0 223 | m_IsActive: 1 224 | --- !u!4 &19 225 | Transform: 226 | m_ObjectHideFlags: 0 227 | m_PrefabParentObject: {fileID: 0} 228 | m_PrefabInternal: {fileID: 0} 229 | m_GameObject: {fileID: 15} 230 | m_LocalRotation: {x: -.0868029669, y: -.913151681, z: .276786923, w: -.286370903} 231 | m_LocalPosition: {x: -2.2101779, y: 2.85066295, z: 1.87864196} 232 | m_LocalScale: {x: 1, y: 1, z: 1} 233 | m_Children: [] 234 | m_Father: {fileID: 0} 235 | --- !u!4 &20 236 | Transform: 237 | m_ObjectHideFlags: 0 238 | m_PrefabParentObject: {fileID: 0} 239 | m_PrefabInternal: {fileID: 0} 240 | m_GameObject: {fileID: 16} 241 | m_LocalRotation: {x: -.316681981, y: -.332274973, z: .119525984, w: -.880351901} 242 | m_LocalPosition: {x: -2.35900211, y: 3.20472097, z: -3.58090401} 243 | m_LocalScale: {x: 1, y: 1, z: 1} 244 | m_Children: [] 245 | m_Father: {fileID: 0} 246 | --- !u!4 &21 247 | Transform: 248 | m_ObjectHideFlags: 0 249 | m_PrefabParentObject: {fileID: 0} 250 | m_PrefabInternal: {fileID: 0} 251 | m_GameObject: {fileID: 17} 252 | m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} 253 | m_LocalPosition: {x: .109563001, y: 1.02701199, z: -1.07652104} 254 | m_LocalScale: {x: 1, y: 1, z: 1} 255 | m_Children: [] 256 | m_Father: {fileID: 0} 257 | --- !u!4 &22 258 | Transform: 259 | m_ObjectHideFlags: 0 260 | m_PrefabParentObject: {fileID: 0} 261 | m_PrefabInternal: {fileID: 0} 262 | m_GameObject: {fileID: 18} 263 | m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} 264 | m_LocalPosition: {x: 1.94314873, y: .447557986, z: -3.41346455} 265 | m_LocalScale: {x: 1, y: 1, z: 1} 266 | m_Children: [] 267 | m_Father: {fileID: 0} 268 | --- !u!23 &23 269 | Renderer: 270 | m_ObjectHideFlags: 0 271 | m_PrefabParentObject: {fileID: 0} 272 | m_PrefabInternal: {fileID: 0} 273 | m_GameObject: {fileID: 17} 274 | m_Enabled: 1 275 | m_CastShadows: 1 276 | m_ReceiveShadows: 1 277 | m_LightmapIndex: 255 278 | m_LightmapTilingOffset: {x: 1, y: 1, z: 0, w: 0} 279 | m_Materials: 280 | - {fileID: 10302, guid: 0000000000000000e000000000000000, type: 0} 281 | m_SubsetIndices: 282 | m_StaticBatchRoot: {fileID: 0} 283 | m_UseLightProbes: 0 284 | m_LightProbeAnchor: {fileID: 0} 285 | m_ScaleInLightmap: 1 286 | --- !u!23 &24 287 | Renderer: 288 | m_ObjectHideFlags: 0 289 | m_PrefabParentObject: {fileID: 0} 290 | m_PrefabInternal: {fileID: 0} 291 | m_GameObject: {fileID: 18} 292 | m_Enabled: 1 293 | m_CastShadows: 1 294 | m_ReceiveShadows: 1 295 | m_LightmapIndex: 255 296 | m_LightmapTilingOffset: {x: 1, y: 1, z: 0, w: 0} 297 | m_Materials: 298 | - {fileID: 10302, guid: 0000000000000000e000000000000000, type: 0} 299 | m_SubsetIndices: 300 | m_StaticBatchRoot: {fileID: 0} 301 | m_UseLightProbes: 0 302 | m_LightProbeAnchor: {fileID: 0} 303 | m_ScaleInLightmap: 1 304 | --- !u!33 &25 305 | MeshFilter: 306 | m_ObjectHideFlags: 0 307 | m_PrefabParentObject: {fileID: 0} 308 | m_PrefabInternal: {fileID: 0} 309 | m_GameObject: {fileID: 17} 310 | m_Mesh: {fileID: 10207, guid: 0000000000000000e000000000000000, type: 0} 311 | --- !u!33 &26 312 | MeshFilter: 313 | m_ObjectHideFlags: 0 314 | m_PrefabParentObject: {fileID: 0} 315 | m_PrefabInternal: {fileID: 0} 316 | m_GameObject: {fileID: 18} 317 | m_Mesh: {fileID: 10209, guid: 0000000000000000e000000000000000, type: 0} 318 | --- !u!64 &27 319 | MeshCollider: 320 | m_ObjectHideFlags: 0 321 | m_PrefabParentObject: {fileID: 0} 322 | m_PrefabInternal: {fileID: 0} 323 | m_GameObject: {fileID: 18} 324 | m_Material: {fileID: 0} 325 | m_IsTrigger: 0 326 | m_Enabled: 1 327 | serializedVersion: 2 328 | m_SmoothSphereCollisions: 0 329 | m_Convex: 0 330 | m_Mesh: {fileID: 10209, guid: 0000000000000000e000000000000000, type: 0} 331 | --- !u!108 &28 332 | Light: 333 | m_ObjectHideFlags: 0 334 | m_PrefabParentObject: {fileID: 0} 335 | m_PrefabInternal: {fileID: 0} 336 | m_GameObject: {fileID: 15} 337 | m_Enabled: 1 338 | serializedVersion: 3 339 | m_Type: 0 340 | m_Color: {r: 1, g: .492536992, b: .492536992, a: 1} 341 | m_Intensity: 1 342 | m_Range: 10 343 | m_SpotAngle: 30 344 | m_CookieSize: 10 345 | m_Shadows: 346 | m_Type: 0 347 | m_Resolution: -1 348 | m_Strength: 1 349 | m_Bias: .0500000007 350 | m_Softness: 4 351 | m_SoftnessFade: 1 352 | m_Cookie: {fileID: 0} 353 | m_DrawHalo: 0 354 | m_ActuallyLightmapped: 0 355 | m_Flare: {fileID: 0} 356 | m_RenderMode: 0 357 | m_CullingMask: 358 | serializedVersion: 2 359 | m_Bits: 4294967295 360 | m_Lightmapping: 1 361 | m_ShadowSamples: 1 362 | m_ShadowRadius: 0 363 | m_ShadowAngle: 0 364 | m_IndirectIntensity: 1 365 | m_AreaSize: {x: 1, y: 1} 366 | --- !u!108 &29 367 | Light: 368 | m_ObjectHideFlags: 0 369 | m_PrefabParentObject: {fileID: 0} 370 | m_PrefabInternal: {fileID: 0} 371 | m_GameObject: {fileID: 16} 372 | m_Enabled: 1 373 | serializedVersion: 3 374 | m_Type: 1 375 | m_Color: {r: 1, g: .997494996, b: .955223978, a: 1} 376 | m_Intensity: .5 377 | m_Range: 10 378 | m_SpotAngle: 30 379 | m_CookieSize: 10 380 | m_Shadows: 381 | m_Type: 2 382 | m_Resolution: -1 383 | m_Strength: 1 384 | m_Bias: .0500000007 385 | m_Softness: 4 386 | m_SoftnessFade: 1 387 | m_Cookie: {fileID: 0} 388 | m_DrawHalo: 0 389 | m_ActuallyLightmapped: 0 390 | m_Flare: {fileID: 0} 391 | m_RenderMode: 0 392 | m_CullingMask: 393 | serializedVersion: 2 394 | m_Bits: 4294967295 395 | m_Lightmapping: 1 396 | m_ShadowSamples: 1 397 | m_ShadowRadius: 0 398 | m_ShadowAngle: 0 399 | m_IndirectIntensity: 1 400 | m_AreaSize: {x: 1, y: 1} 401 | --- !u!135 &30 402 | SphereCollider: 403 | m_ObjectHideFlags: 0 404 | m_PrefabParentObject: {fileID: 0} 405 | m_PrefabInternal: {fileID: 0} 406 | m_GameObject: {fileID: 17} 407 | m_Material: {fileID: 0} 408 | m_IsTrigger: 0 409 | m_Enabled: 1 410 | serializedVersion: 2 411 | m_Radius: .5 412 | m_Center: {x: 0, y: 0, z: -0} 413 | --- !u!114 &31 414 | MonoBehaviour: 415 | m_ObjectHideFlags: 0 416 | m_PrefabParentObject: {fileID: 0} 417 | m_PrefabInternal: {fileID: 0} 418 | m_GameObject: {fileID: 18} 419 | m_Enabled: 1 420 | m_EditorHideFlags: 0 421 | m_Script: {fileID: 11500000, guid: f1ad34d2576df73428a8586fc566c6cb, type: 3} 422 | m_Name: 423 | --- !u!1 &32 424 | GameObject: 425 | m_ObjectHideFlags: 0 426 | m_PrefabParentObject: {fileID: 0} 427 | m_PrefabInternal: {fileID: 0} 428 | serializedVersion: 4 429 | m_Component: 430 | - 4: {fileID: 33} 431 | - 132: {fileID: 34} 432 | m_Layer: 0 433 | m_Name: GUI Text 434 | m_TagString: Untagged 435 | m_Icon: {fileID: 0} 436 | m_NavMeshLayer: 0 437 | m_StaticEditorFlags: 0 438 | m_IsActive: 1 439 | --- !u!4 &33 440 | Transform: 441 | m_ObjectHideFlags: 0 442 | m_PrefabParentObject: {fileID: 0} 443 | m_PrefabInternal: {fileID: 0} 444 | m_GameObject: {fileID: 32} 445 | m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} 446 | m_LocalPosition: {x: 0, y: 1, z: 0} 447 | m_LocalScale: {x: 1, y: 1, z: 1} 448 | m_Children: [] 449 | m_Father: {fileID: 0} 450 | --- !u!132 &34 451 | GUIText: 452 | m_ObjectHideFlags: 0 453 | m_PrefabParentObject: {fileID: 0} 454 | m_PrefabInternal: {fileID: 0} 455 | m_GameObject: {fileID: 32} 456 | m_Enabled: 1 457 | serializedVersion: 3 458 | m_Text: "A simple scene. The plugin will render a rotating triangle in the middle 459 | of it.\r\nIt will also fill the plane texture each frame.\r\nAll done from native 460 | code.\r\nPress Play!" 461 | m_Anchor: 0 462 | m_Alignment: 0 463 | m_PixelOffset: {x: 0, y: 0} 464 | m_LineSpacing: 1 465 | m_TabSize: 4 466 | m_Font: {fileID: 10102, guid: 0000000000000000e000000000000000, type: 0} 467 | m_Material: {fileID: 0} 468 | m_FontSize: 0 469 | m_FontStyle: 0 470 | m_PixelCorrect: 1 471 | m_RichText: 1 472 | -------------------------------------------------------------------------------- /src/Unity4Project/ProjectSettings/AudioManager.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!11 &1 4 | AudioManager: 5 | m_ObjectHideFlags: 0 6 | m_Volume: 1 7 | Rolloff Scale: 1 8 | m_SpeedOfSound: 347 9 | Doppler Factor: 1 10 | Default Speaker Mode: 2 11 | m_DSPBufferSize: 0 12 | -------------------------------------------------------------------------------- /src/Unity4Project/ProjectSettings/DynamicsManager.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!55 &1 4 | PhysicsManager: 5 | m_ObjectHideFlags: 0 6 | m_Gravity: {x: 0, y: -9.81000042, z: 0} 7 | m_DefaultMaterial: {fileID: 0} 8 | m_BounceThreshold: 2 9 | m_SleepVelocity: .150000006 10 | m_SleepAngularVelocity: .140000001 11 | m_MaxAngularVelocity: 7 12 | m_MinPenetrationForPenalty: .00999999978 13 | m_SolverIterationCount: 6 14 | m_RaycastsHitTriggers: 1 15 | m_LayerCollisionMatrix: ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff 16 | -------------------------------------------------------------------------------- /src/Unity4Project/ProjectSettings/EditorSettings.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!159 &1 4 | EditorSettings: 5 | m_ObjectHideFlags: 0 6 | serializedVersion: 1 7 | m_ExternalVersionControlSupport: 1 8 | m_SerializationMode: 2 9 | m_WebSecurityEmulationEnabled: 0 10 | m_WebSecurityEmulationHostUrl: http://www.mydomain.com/mygame.unity3d 11 | -------------------------------------------------------------------------------- /src/Unity4Project/ProjectSettings/InputManager.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!13 &1 4 | InputManager: 5 | m_ObjectHideFlags: 0 6 | m_Axes: 7 | - serializedVersion: 3 8 | m_Name: Horizontal 9 | descriptiveName: 10 | descriptiveNegativeName: 11 | negativeButton: left 12 | positiveButton: right 13 | altNegativeButton: a 14 | altPositiveButton: d 15 | gravity: 3 16 | dead: .00100000005 17 | sensitivity: 3 18 | snap: 1 19 | invert: 0 20 | type: 0 21 | axis: 0 22 | joyNum: 0 23 | - serializedVersion: 3 24 | m_Name: Vertical 25 | descriptiveName: 26 | descriptiveNegativeName: 27 | negativeButton: down 28 | positiveButton: up 29 | altNegativeButton: s 30 | altPositiveButton: w 31 | gravity: 3 32 | dead: .00100000005 33 | sensitivity: 3 34 | snap: 1 35 | invert: 0 36 | type: 0 37 | axis: 0 38 | joyNum: 0 39 | - serializedVersion: 3 40 | m_Name: Fire1 41 | descriptiveName: 42 | descriptiveNegativeName: 43 | negativeButton: 44 | positiveButton: left ctrl 45 | altNegativeButton: 46 | altPositiveButton: mouse 0 47 | gravity: 1000 48 | dead: .00100000005 49 | sensitivity: 1000 50 | snap: 0 51 | invert: 0 52 | type: 0 53 | axis: 0 54 | joyNum: 0 55 | - serializedVersion: 3 56 | m_Name: Fire2 57 | descriptiveName: 58 | descriptiveNegativeName: 59 | negativeButton: 60 | positiveButton: left alt 61 | altNegativeButton: 62 | altPositiveButton: mouse 1 63 | gravity: 1000 64 | dead: .00100000005 65 | sensitivity: 1000 66 | snap: 0 67 | invert: 0 68 | type: 0 69 | axis: 0 70 | joyNum: 0 71 | - serializedVersion: 3 72 | m_Name: Fire3 73 | descriptiveName: 74 | descriptiveNegativeName: 75 | negativeButton: 76 | positiveButton: left cmd 77 | altNegativeButton: 78 | altPositiveButton: mouse 2 79 | gravity: 1000 80 | dead: .00100000005 81 | sensitivity: 1000 82 | snap: 0 83 | invert: 0 84 | type: 0 85 | axis: 0 86 | joyNum: 0 87 | - serializedVersion: 3 88 | m_Name: Jump 89 | descriptiveName: 90 | descriptiveNegativeName: 91 | negativeButton: 92 | positiveButton: space 93 | altNegativeButton: 94 | altPositiveButton: 95 | gravity: 1000 96 | dead: .00100000005 97 | sensitivity: 1000 98 | snap: 0 99 | invert: 0 100 | type: 0 101 | axis: 0 102 | joyNum: 0 103 | - serializedVersion: 3 104 | m_Name: Mouse X 105 | descriptiveName: 106 | descriptiveNegativeName: 107 | negativeButton: 108 | positiveButton: 109 | altNegativeButton: 110 | altPositiveButton: 111 | gravity: 0 112 | dead: 0 113 | sensitivity: .100000001 114 | snap: 0 115 | invert: 0 116 | type: 1 117 | axis: 0 118 | joyNum: 0 119 | - serializedVersion: 3 120 | m_Name: Mouse Y 121 | descriptiveName: 122 | descriptiveNegativeName: 123 | negativeButton: 124 | positiveButton: 125 | altNegativeButton: 126 | altPositiveButton: 127 | gravity: 0 128 | dead: 0 129 | sensitivity: .100000001 130 | snap: 0 131 | invert: 0 132 | type: 1 133 | axis: 1 134 | joyNum: 0 135 | - serializedVersion: 3 136 | m_Name: Mouse ScrollWheel 137 | descriptiveName: 138 | descriptiveNegativeName: 139 | negativeButton: 140 | positiveButton: 141 | altNegativeButton: 142 | altPositiveButton: 143 | gravity: 0 144 | dead: 0 145 | sensitivity: .100000001 146 | snap: 0 147 | invert: 0 148 | type: 1 149 | axis: 2 150 | joyNum: 0 151 | - serializedVersion: 3 152 | m_Name: Window Shake X 153 | descriptiveName: 154 | descriptiveNegativeName: 155 | negativeButton: 156 | positiveButton: 157 | altNegativeButton: 158 | altPositiveButton: 159 | gravity: 0 160 | dead: 0 161 | sensitivity: .100000001 162 | snap: 0 163 | invert: 0 164 | type: 3 165 | axis: 0 166 | joyNum: 0 167 | - serializedVersion: 3 168 | m_Name: Window Shake Y 169 | descriptiveName: 170 | descriptiveNegativeName: 171 | negativeButton: 172 | positiveButton: 173 | altNegativeButton: 174 | altPositiveButton: 175 | gravity: 0 176 | dead: 0 177 | sensitivity: .100000001 178 | snap: 0 179 | invert: 0 180 | type: 3 181 | axis: 1 182 | joyNum: 0 183 | - serializedVersion: 3 184 | m_Name: Horizontal 185 | descriptiveName: 186 | descriptiveNegativeName: 187 | negativeButton: 188 | positiveButton: 189 | altNegativeButton: 190 | altPositiveButton: 191 | gravity: 0 192 | dead: .189999998 193 | sensitivity: 1 194 | snap: 0 195 | invert: 0 196 | type: 2 197 | axis: 0 198 | joyNum: 0 199 | - serializedVersion: 3 200 | m_Name: Vertical 201 | descriptiveName: 202 | descriptiveNegativeName: 203 | negativeButton: 204 | positiveButton: 205 | altNegativeButton: 206 | altPositiveButton: 207 | gravity: 0 208 | dead: .189999998 209 | sensitivity: 1 210 | snap: 0 211 | invert: 1 212 | type: 2 213 | axis: 1 214 | joyNum: 0 215 | - serializedVersion: 3 216 | m_Name: Fire1 217 | descriptiveName: 218 | descriptiveNegativeName: 219 | negativeButton: 220 | positiveButton: joystick button 0 221 | altNegativeButton: 222 | altPositiveButton: 223 | gravity: 1000 224 | dead: .00100000005 225 | sensitivity: 1000 226 | snap: 0 227 | invert: 0 228 | type: 0 229 | axis: 0 230 | joyNum: 0 231 | - serializedVersion: 3 232 | m_Name: Fire2 233 | descriptiveName: 234 | descriptiveNegativeName: 235 | negativeButton: 236 | positiveButton: joystick button 1 237 | altNegativeButton: 238 | altPositiveButton: 239 | gravity: 1000 240 | dead: .00100000005 241 | sensitivity: 1000 242 | snap: 0 243 | invert: 0 244 | type: 0 245 | axis: 0 246 | joyNum: 0 247 | - serializedVersion: 3 248 | m_Name: Fire3 249 | descriptiveName: 250 | descriptiveNegativeName: 251 | negativeButton: 252 | positiveButton: joystick button 2 253 | altNegativeButton: 254 | altPositiveButton: 255 | gravity: 1000 256 | dead: .00100000005 257 | sensitivity: 1000 258 | snap: 0 259 | invert: 0 260 | type: 0 261 | axis: 0 262 | joyNum: 0 263 | - serializedVersion: 3 264 | m_Name: Jump 265 | descriptiveName: 266 | descriptiveNegativeName: 267 | negativeButton: 268 | positiveButton: joystick button 3 269 | altNegativeButton: 270 | altPositiveButton: 271 | gravity: 1000 272 | dead: .00100000005 273 | sensitivity: 1000 274 | snap: 0 275 | invert: 0 276 | type: 0 277 | axis: 0 278 | joyNum: 0 279 | -------------------------------------------------------------------------------- /src/Unity4Project/ProjectSettings/NavMeshAreas.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!126 &1 4 | NavMeshLayers: 5 | m_ObjectHideFlags: 0 6 | Built-in Layer 0: 7 | name: Default 8 | cost: 1 9 | editType: 2 10 | Built-in Layer 1: 11 | name: Not Walkable 12 | cost: 1 13 | editType: 0 14 | Built-in Layer 2: 15 | name: Jump 16 | cost: 2 17 | editType: 2 18 | User Layer 0: 19 | name: 20 | cost: 1 21 | editType: 3 22 | User Layer 1: 23 | name: 24 | cost: 1 25 | editType: 3 26 | User Layer 2: 27 | name: 28 | cost: 1 29 | editType: 3 30 | User Layer 3: 31 | name: 32 | cost: 1 33 | editType: 3 34 | User Layer 4: 35 | name: 36 | cost: 1 37 | editType: 3 38 | User Layer 5: 39 | name: 40 | cost: 1 41 | editType: 3 42 | User Layer 6: 43 | name: 44 | cost: 1 45 | editType: 3 46 | User Layer 7: 47 | name: 48 | cost: 1 49 | editType: 3 50 | User Layer 8: 51 | name: 52 | cost: 1 53 | editType: 3 54 | User Layer 9: 55 | name: 56 | cost: 1 57 | editType: 3 58 | User Layer 10: 59 | name: 60 | cost: 1 61 | editType: 3 62 | User Layer 11: 63 | name: 64 | cost: 1 65 | editType: 3 66 | User Layer 12: 67 | name: 68 | cost: 1 69 | editType: 3 70 | User Layer 13: 71 | name: 72 | cost: 1 73 | editType: 3 74 | User Layer 14: 75 | name: 76 | cost: 1 77 | editType: 3 78 | User Layer 15: 79 | name: 80 | cost: 1 81 | editType: 3 82 | User Layer 16: 83 | name: 84 | cost: 1 85 | editType: 3 86 | User Layer 17: 87 | name: 88 | cost: 1 89 | editType: 3 90 | User Layer 18: 91 | name: 92 | cost: 1 93 | editType: 3 94 | User Layer 19: 95 | name: 96 | cost: 1 97 | editType: 3 98 | User Layer 20: 99 | name: 100 | cost: 1 101 | editType: 3 102 | User Layer 21: 103 | name: 104 | cost: 1 105 | editType: 3 106 | User Layer 22: 107 | name: 108 | cost: 1 109 | editType: 3 110 | User Layer 23: 111 | name: 112 | cost: 1 113 | editType: 3 114 | User Layer 24: 115 | name: 116 | cost: 1 117 | editType: 3 118 | User Layer 25: 119 | name: 120 | cost: 1 121 | editType: 3 122 | User Layer 26: 123 | name: 124 | cost: 1 125 | editType: 3 126 | User Layer 27: 127 | name: 128 | cost: 1 129 | editType: 3 130 | User Layer 28: 131 | name: 132 | cost: 1 133 | editType: 3 134 | -------------------------------------------------------------------------------- /src/Unity4Project/ProjectSettings/NavMeshLayers.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!126 &1 4 | NavMeshLayers: 5 | m_ObjectHideFlags: 0 6 | Built-in Layer 0: 7 | name: Default 8 | cost: 1 9 | editType: 2 10 | Built-in Layer 1: 11 | name: Not Walkable 12 | cost: 1 13 | editType: 0 14 | Built-in Layer 2: 15 | name: Jump 16 | cost: 2 17 | editType: 2 18 | User Layer 0: 19 | name: 20 | cost: 1 21 | editType: 3 22 | User Layer 1: 23 | name: 24 | cost: 1 25 | editType: 3 26 | User Layer 2: 27 | name: 28 | cost: 1 29 | editType: 3 30 | User Layer 3: 31 | name: 32 | cost: 1 33 | editType: 3 34 | User Layer 4: 35 | name: 36 | cost: 1 37 | editType: 3 38 | User Layer 5: 39 | name: 40 | cost: 1 41 | editType: 3 42 | User Layer 6: 43 | name: 44 | cost: 1 45 | editType: 3 46 | User Layer 7: 47 | name: 48 | cost: 1 49 | editType: 3 50 | User Layer 8: 51 | name: 52 | cost: 1 53 | editType: 3 54 | User Layer 9: 55 | name: 56 | cost: 1 57 | editType: 3 58 | User Layer 10: 59 | name: 60 | cost: 1 61 | editType: 3 62 | User Layer 11: 63 | name: 64 | cost: 1 65 | editType: 3 66 | User Layer 12: 67 | name: 68 | cost: 1 69 | editType: 3 70 | User Layer 13: 71 | name: 72 | cost: 1 73 | editType: 3 74 | User Layer 14: 75 | name: 76 | cost: 1 77 | editType: 3 78 | User Layer 15: 79 | name: 80 | cost: 1 81 | editType: 3 82 | User Layer 16: 83 | name: 84 | cost: 1 85 | editType: 3 86 | User Layer 17: 87 | name: 88 | cost: 1 89 | editType: 3 90 | User Layer 18: 91 | name: 92 | cost: 1 93 | editType: 3 94 | User Layer 19: 95 | name: 96 | cost: 1 97 | editType: 3 98 | User Layer 20: 99 | name: 100 | cost: 1 101 | editType: 3 102 | User Layer 21: 103 | name: 104 | cost: 1 105 | editType: 3 106 | User Layer 22: 107 | name: 108 | cost: 1 109 | editType: 3 110 | User Layer 23: 111 | name: 112 | cost: 1 113 | editType: 3 114 | User Layer 24: 115 | name: 116 | cost: 1 117 | editType: 3 118 | User Layer 25: 119 | name: 120 | cost: 1 121 | editType: 3 122 | User Layer 26: 123 | name: 124 | cost: 1 125 | editType: 3 126 | User Layer 27: 127 | name: 128 | cost: 1 129 | editType: 3 130 | User Layer 28: 131 | name: 132 | cost: 1 133 | editType: 3 134 | -------------------------------------------------------------------------------- /src/Unity4Project/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 | -------------------------------------------------------------------------------- /src/Unity4Project/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: 2 7 | AndroidProfiler: 0 8 | defaultScreenOrientation: 0 9 | targetDevice: 2 10 | targetGlesGraphics: 1 11 | targetResolution: 0 12 | accelerometerFrequency: 60 13 | companyName: Unity Technologies 14 | productName: Plugin Render API Example 15 | defaultScreenWidth: 640 16 | defaultScreenHeight: 480 17 | defaultScreenWidthWeb: 600 18 | defaultScreenHeightWeb: 450 19 | m_RenderingPath: 1 20 | m_ActiveColorSpace: 0 21 | m_MTRendering: 1 22 | m_UseDX11: 1 23 | iosShowActivityIndicatorOnLoading: -1 24 | androidShowActivityIndicatorOnLoading: -1 25 | displayResolutionDialog: 0 26 | allowedAutorotateToPortrait: 1 27 | allowedAutorotateToPortraitUpsideDown: 1 28 | allowedAutorotateToLandscapeRight: 1 29 | allowedAutorotateToLandscapeLeft: 1 30 | useOSAutorotation: 1 31 | use32BitDisplayBuffer: 0 32 | use24BitDepthBuffer: 0 33 | defaultIsFullScreen: 0 34 | runInBackground: 1 35 | captureSingleScreen: 0 36 | Override IPod Music: 0 37 | usePlayerLog: 1 38 | stripPhysics: 0 39 | useMacAppStoreValidation: 0 40 | xboxSkinOnGPU: 1 41 | xboxEnableAvatar: 0 42 | xboxEnableKinect: 0 43 | xboxEnableKinectAutoTracking: 0 44 | xboxEnableFitness: 0 45 | macFullscreenMode: 2 46 | xboxSpeechDB: 0 47 | wiiHio2Usage: -1 48 | wiiLoadingScreenRectPlacement: 0 49 | wiiLoadingScreenBackground: {r: 1, g: 1, b: 1, a: 1} 50 | wiiLoadingScreenPeriod: 1000 51 | wiiLoadingScreenFileName: 52 | wiiLoadingScreenRect: 53 | serializedVersion: 2 54 | x: 0 55 | y: 0 56 | width: 0 57 | height: 0 58 | m_SupportedAspectRatios: 59 | 4:3: 1 60 | 5:4: 1 61 | 16:10: 1 62 | 16:9: 1 63 | Others: 1 64 | iPhoneBundleIdentifier: com.Company.ProductName 65 | iPhoneBundleVersion: 1.0 66 | AndroidBundleVersionCode: 1 67 | AndroidMinSdkVersion: 6 68 | AndroidPreferredInstallLocation: 1 69 | aotOptions: 70 | apiCompatibilityLevel: 2 71 | iPhoneStrippingLevel: 0 72 | iPhoneScriptCallOptimization: 0 73 | ForceInternetPermission: 0 74 | ForceSDCardPermission: 0 75 | CreateWallpaper: 0 76 | APKExpansionFiles: 0 77 | StripUnusedMeshComponents: 0 78 | iPhoneSdkVersion: 988 79 | iPhoneTargetOSVersion: 10 80 | uIPrerenderedIcon: 0 81 | uIRequiresPersistentWiFi: 0 82 | uIStatusBarHidden: 1 83 | uIExitOnSuspend: 0 84 | uIStatusBarStyle: 0 85 | iPhoneSplashScreen: {fileID: 0} 86 | iPhoneHighResSplashScreen: {fileID: 0} 87 | iPadPortraitSplashScreen: {fileID: 0} 88 | iPadHighResPortraitSplashScreen: {fileID: 0} 89 | iPadLandscapeSplashScreen: {fileID: 0} 90 | iPadHighResLandscapeSplashScreen: {fileID: 0} 91 | AndroidTargetDevice: 0 92 | AndroidSplashScreenScale: 0 93 | AndroidKeystoreName: 94 | AndroidKeyaliasName: 95 | resolutionDialogBanner: {fileID: 0} 96 | m_BuildTargetIcons: 97 | - m_BuildTarget: 98 | m_Icons: 99 | - m_Icon: {fileID: 0} 100 | m_Size: 128 101 | m_BuildTargetBatching: [] 102 | webPlayerTemplate: APPLICATION:Default 103 | m_TemplateCustomTags: {} 104 | wiiRegion: 1 105 | wiiGameCode: RABA 106 | wiiGameVersion: 107 | wiiCompanyCode: ZZ 108 | wiiSupportsNunchuk: 0 109 | wiiSupportsClassicController: 0 110 | wiiSupportsBalanceBoard: 0 111 | wiiSupportsMotionPlus: 0 112 | wiiControllerCount: 1 113 | wiiFloatingPointExceptions: 0 114 | wiiScreenCrashDumps: 1 115 | wiiMemoryLabelCount: 153 116 | wiiMemorySetup: 5effbee7ffffffd7dd0f00000000000000000000 117 | XboxTitleId: 118 | XboxImageXexPath: 119 | XboxSpaPath: 120 | XboxGenerateSpa: 0 121 | XboxDeployKinectResources: 0 122 | XboxSplashScreen: {fileID: 0} 123 | xboxEnableSpeech: 0 124 | ps3TitleConfigPath: 125 | ps3DLCConfigPath: 126 | ps3ThumbnailPath: 127 | ps3BackgroundPath: 128 | ps3SoundPath: 129 | ps3TrophyCommId: 130 | ps3TrophyPackagePath: 131 | ps3BootCheckMaxSaveGameSizeKB: 128 132 | ps3TrophyCommSig: 133 | ps3SaveGameSlots: 1 134 | ps3TrialMode: 0 135 | flashStrippingLevel: 2 136 | scriptingDefineSymbols: {} 137 | firstStreamedLevelWithResources: 0 138 | unityRebuildLibraryVersion: 9 139 | unityForwardCompatibleVersion: 37 140 | unityStandardAssetsVersion: 0 141 | -------------------------------------------------------------------------------- /src/Unity4Project/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: 3 8 | m_QualitySettings: 9 | - serializedVersion: 2 10 | name: Fastest 11 | pixelLightCount: 0 12 | shadows: 0 13 | shadowResolution: 0 14 | shadowProjection: 1 15 | shadowCascades: 1 16 | shadowDistance: 15 17 | blendWeights: 1 18 | textureQuality: 1 19 | anisotropicTextures: 0 20 | antiAliasing: 0 21 | softParticles: 0 22 | softVegetation: 0 23 | vSyncCount: 0 24 | lodBias: .300000012 25 | maximumLODLevel: 0 26 | excludedTargetPlatforms: [] 27 | - serializedVersion: 2 28 | name: Fast 29 | pixelLightCount: 0 30 | shadows: 0 31 | shadowResolution: 0 32 | shadowProjection: 1 33 | shadowCascades: 1 34 | shadowDistance: 20 35 | blendWeights: 2 36 | textureQuality: 0 37 | anisotropicTextures: 0 38 | antiAliasing: 0 39 | softParticles: 0 40 | softVegetation: 0 41 | vSyncCount: 0 42 | lodBias: .400000006 43 | maximumLODLevel: 0 44 | excludedTargetPlatforms: [] 45 | - serializedVersion: 2 46 | name: Simple 47 | pixelLightCount: 1 48 | shadows: 1 49 | shadowResolution: 0 50 | shadowProjection: 1 51 | shadowCascades: 1 52 | shadowDistance: 15 53 | blendWeights: 2 54 | textureQuality: 0 55 | anisotropicTextures: 1 56 | antiAliasing: 0 57 | softParticles: 0 58 | softVegetation: 0 59 | vSyncCount: 0 60 | lodBias: .699999988 61 | maximumLODLevel: 0 62 | excludedTargetPlatforms: [] 63 | - serializedVersion: 2 64 | name: Good 65 | pixelLightCount: 2 66 | shadows: 2 67 | shadowResolution: 1 68 | shadowProjection: 1 69 | shadowCascades: 2 70 | shadowDistance: 20 71 | blendWeights: 2 72 | textureQuality: 0 73 | anisotropicTextures: 1 74 | antiAliasing: 0 75 | softParticles: 0 76 | softVegetation: 1 77 | vSyncCount: 1 78 | lodBias: 1 79 | maximumLODLevel: 0 80 | excludedTargetPlatforms: [] 81 | - serializedVersion: 2 82 | name: Beautiful 83 | pixelLightCount: 3 84 | shadows: 2 85 | shadowResolution: 2 86 | shadowProjection: 1 87 | shadowCascades: 2 88 | shadowDistance: 30 89 | blendWeights: 4 90 | textureQuality: 0 91 | anisotropicTextures: 2 92 | antiAliasing: 2 93 | softParticles: 1 94 | softVegetation: 1 95 | vSyncCount: 1 96 | lodBias: 1.5 97 | maximumLODLevel: 0 98 | excludedTargetPlatforms: [] 99 | - serializedVersion: 2 100 | name: Fantastic 101 | pixelLightCount: 4 102 | shadows: 2 103 | shadowResolution: 2 104 | shadowProjection: 1 105 | shadowCascades: 4 106 | shadowDistance: 100 107 | blendWeights: 4 108 | textureQuality: 0 109 | anisotropicTextures: 2 110 | antiAliasing: 2 111 | softParticles: 1 112 | softVegetation: 1 113 | vSyncCount: 1 114 | lodBias: 2 115 | maximumLODLevel: 0 116 | excludedTargetPlatforms: [] 117 | m_PerPlatformDefaultQuality: 118 | Android: 2 119 | FlashPlayer: 3 120 | GLES Emulation: 3 121 | PS3: 3 122 | Standalone: 3 123 | Web: 3 124 | Wii: 3 125 | XBOX360: 3 126 | iPhone: 2 127 | -------------------------------------------------------------------------------- /src/Unity4Project/ProjectSettings/TagManager.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!78 &1 4 | TagManager: 5 | tags: 6 | - 7 | Builtin Layer 0: Default 8 | Builtin Layer 1: TransparentFX 9 | Builtin Layer 2: Ignore Raycast 10 | Builtin Layer 3: 11 | Builtin Layer 4: Water 12 | Builtin Layer 5: 13 | Builtin Layer 6: 14 | Builtin Layer 7: 15 | User Layer 8: 16 | User Layer 9: 17 | User Layer 10: 18 | User Layer 11: 19 | User Layer 12: 20 | User Layer 13: 21 | User Layer 14: 22 | User Layer 15: 23 | User Layer 16: 24 | User Layer 17: 25 | User Layer 18: 26 | User Layer 19: 27 | User Layer 20: 28 | User Layer 21: 29 | User Layer 22: 30 | User Layer 23: 31 | User Layer 24: 32 | User Layer 25: 33 | User Layer 26: 34 | User Layer 27: 35 | User Layer 28: 36 | User Layer 29: 37 | User Layer 30: 38 | User Layer 31: 39 | -------------------------------------------------------------------------------- /src/Unity4Project/ProjectSettings/TimeManager.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!5 &1 4 | TimeManager: 5 | m_ObjectHideFlags: 0 6 | Fixed Timestep: .0199999996 7 | Maximum Allowed Timestep: .333333343 8 | m_TimeScale: 1 9 | -------------------------------------------------------------------------------- /src/Unity5Project/Assets/Editor/MyBuildPostprocessor.cs: -------------------------------------------------------------------------------- 1 | using UnityEngine; 2 | using UnityEditor; 3 | using UnityEditor.Callbacks; 4 | using System.IO; 5 | 6 | public class MyBuildPostprocessor 7 | { 8 | [PostProcessBuild] 9 | public static void OnPostprocessBuild(BuildTarget target, string pathToBuiltProject) 10 | { 11 | if(target == BuildTarget.MetroPlayer) 12 | OnPostprocessBuildWSA(pathToBuiltProject); 13 | else if(target == BuildTarget.iOS) 14 | OnPostprocessBuildIOS(pathToBuiltProject); 15 | } 16 | 17 | private static void OnPostprocessBuildIOS(string pathToBuiltProject) 18 | { 19 | File.Copy("../RenderingPlugin/UnityPluginInterface.h", Path.Combine(pathToBuiltProject, "Libraries/UnityPluginInterface.h"), true); 20 | File.Copy("../RenderingPlugin/RenderingPluginGLES.cpp", Path.Combine(pathToBuiltProject, "Libraries/RenderingPluginGLES.cpp"), true); 21 | 22 | // TODO: for now project api is not exposed, so you need to add files manually 23 | } 24 | 25 | private static void OnPostprocessBuildWSA(string pathToBuiltProject) 26 | { 27 | string exportedPath = Path.Combine(pathToBuiltProject, PlayerSettings.productName); 28 | 29 | string[] filesToSearch = new[] { "App.cpp", "App.xaml.cpp", "App.cs", "App.xaml.cs" }; 30 | 31 | bool patched = false; 32 | for (int i = 0; i < filesToSearch.Length; i++) 33 | { 34 | string path = Path.Combine(exportedPath, filesToSearch[i]); 35 | if (path.Contains(".cpp") && PatchFile(path, "m_AppCallbacks->SetBridge(_bridge);", "m_AppCallbacks->SetBridge(_bridge);\r\n\tm_AppCallbacks->LoadGfxNativePlugin(\"RenderingPlugin.dll\");")) 36 | { 37 | patched = true; 38 | break; 39 | } 40 | if (path.Contains(".cs") && PatchFile(path, "appCallbacks.SetBridge(_bridge);", "appCallbacks.SetBridge(_bridge);\r\n\t\t\t\tappCallbacks.LoadGfxNativePlugin(\"RenderingPlugin.dll\");")) 41 | { 42 | patched = true; 43 | break; 44 | } 45 | } 46 | 47 | if (!patched) Debug.LogError("Failed to patch file"); 48 | } 49 | 50 | 51 | private static bool PatchFile(string fileName, string targetString, string replacement) 52 | { 53 | if (File.Exists(fileName) == false) return false; 54 | 55 | string text = File.ReadAllText(fileName); 56 | 57 | if (text.IndexOf(targetString) == -1) return false; 58 | 59 | // Already patched ? 60 | if (text.IndexOf(replacement) != -1) return true; 61 | 62 | text = text.Replace(targetString, replacement); 63 | 64 | File.WriteAllText(fileName, text); 65 | 66 | return true; 67 | } 68 | } 69 | -------------------------------------------------------------------------------- /src/Unity5Project/Assets/Plugins/Android/libRenderingPlugin.so: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hacksalot/unity-render-native/4285af04d6dd009d62a7db58e1b6fb07efc5238c/src/Unity5Project/Assets/Plugins/Android/libRenderingPlugin.so -------------------------------------------------------------------------------- /src/Unity5Project/Assets/Plugins/Metro/ARM/RenderingPlugin.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hacksalot/unity-render-native/4285af04d6dd009d62a7db58e1b6fb07efc5238c/src/Unity5Project/Assets/Plugins/Metro/ARM/RenderingPlugin.dll -------------------------------------------------------------------------------- /src/Unity5Project/Assets/Plugins/Metro/x86/RenderingPlugin.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hacksalot/unity-render-native/4285af04d6dd009d62a7db58e1b6fb07efc5238c/src/Unity5Project/Assets/Plugins/Metro/x86/RenderingPlugin.dll -------------------------------------------------------------------------------- /src/Unity5Project/Assets/Plugins/RenderingPlugin.bundle/Contents/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | BuildMachineOSBuild 6 | 11E53 7 | CFBundleDevelopmentRegion 8 | English 9 | CFBundleExecutable 10 | RenderingPlugin 11 | CFBundleIdentifier 12 | com.yourcompany.RenderingPlugin 13 | CFBundleInfoDictionaryVersion 14 | 6.0 15 | CFBundleName 16 | RenderingPlugin 17 | CFBundlePackageType 18 | BNDL 19 | CFBundleShortVersionString 20 | 1.0 21 | CFBundleSignature 22 | ???? 23 | CFBundleVersion 24 | 1 25 | CFPlugInDynamicRegisterFunction 26 | 27 | CFPlugInDynamicRegistration 28 | NO 29 | CFPlugInFactories 30 | 31 | 00000000-0000-0000-0000-000000000000 32 | MyFactoryFunction 33 | 34 | CFPlugInTypes 35 | 36 | 00000000-0000-0000-0000-000000000000 37 | 38 | 00000000-0000-0000-0000-000000000000 39 | 40 | 41 | CFPlugInUnloadFunction 42 | 43 | DTCompiler 44 | 45 | DTPlatformBuild 46 | 10M2518 47 | DTPlatformVersion 48 | PG 49 | DTSDKBuild 50 | 10M2518 51 | DTSDKName 52 | macosx10.6 53 | DTXcode 54 | 0400 55 | DTXcodeBuild 56 | 10M2518 57 | 58 | 59 | -------------------------------------------------------------------------------- /src/Unity5Project/Assets/Plugins/RenderingPlugin.bundle/Contents/MacOS/RenderingPlugin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hacksalot/unity-render-native/4285af04d6dd009d62a7db58e1b6fb07efc5238c/src/Unity5Project/Assets/Plugins/RenderingPlugin.bundle/Contents/MacOS/RenderingPlugin -------------------------------------------------------------------------------- /src/Unity5Project/Assets/Plugins/RenderingPlugin.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hacksalot/unity-render-native/4285af04d6dd009d62a7db58e1b6fb07efc5238c/src/Unity5Project/Assets/Plugins/RenderingPlugin.dll -------------------------------------------------------------------------------- /src/Unity5Project/Assets/Plugins/iOS/MyAppController.mm: -------------------------------------------------------------------------------- 1 | #import 2 | #import "UnityAppController.h" 3 | 4 | extern "C" void UnitySetGraphicsDevice(void* device, int deviceType, int eventType); 5 | extern "C" void UnityRenderEvent(int marker); 6 | 7 | @interface MyAppController : UnityAppController 8 | { 9 | } 10 | - (void)shouldAttachRenderDelegate; 11 | @end 12 | 13 | @implementation MyAppController 14 | 15 | - (void)shouldAttachRenderDelegate; 16 | { 17 | UnityRegisterRenderingPlugin(&UnitySetGraphicsDevice, &UnityRenderEvent); 18 | } 19 | @end 20 | 21 | 22 | IMPL_APP_CONTROLLER_SUBCLASS(MyAppController) 23 | 24 | -------------------------------------------------------------------------------- /src/Unity5Project/Assets/Plugins/x86/libRenderingPlugin.so: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hacksalot/unity-render-native/4285af04d6dd009d62a7db58e1b6fb07efc5238c/src/Unity5Project/Assets/Plugins/x86/libRenderingPlugin.so -------------------------------------------------------------------------------- /src/Unity5Project/Assets/Plugins/x86_64/libRenderingPlugin.so: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hacksalot/unity-render-native/4285af04d6dd009d62a7db58e1b6fb07efc5238c/src/Unity5Project/Assets/Plugins/x86_64/libRenderingPlugin.so -------------------------------------------------------------------------------- /src/Unity5Project/Assets/StreamingAssets/SimplePixelShader.cso: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hacksalot/unity-render-native/4285af04d6dd009d62a7db58e1b6fb07efc5238c/src/Unity5Project/Assets/StreamingAssets/SimplePixelShader.cso -------------------------------------------------------------------------------- /src/Unity5Project/Assets/StreamingAssets/SimpleVertexShader.cso: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hacksalot/unity-render-native/4285af04d6dd009d62a7db58e1b6fb07efc5238c/src/Unity5Project/Assets/StreamingAssets/SimpleVertexShader.cso -------------------------------------------------------------------------------- /src/Unity5Project/Assets/UseRenderingPlugin.cs: -------------------------------------------------------------------------------- 1 | // on OpenGL ES there is no way to query texture extents from native texture id 2 | #if (UNITY_IPHONE || UNITY_ANDROID) && !UNITY_EDITOR 3 | #define UNITY_GLES_RENDERER 4 | #endif 5 | 6 | 7 | using UnityEngine; 8 | using System.Collections; 9 | using System.Runtime.InteropServices; 10 | 11 | 12 | public class UseRenderingPlugin : MonoBehaviour 13 | { 14 | // Native plugin rendering events are only called if a plugin is used 15 | // by some script. This means we have to DllImport at least 16 | // one function in some active script. 17 | // For this example, we'll call into plugin's SetTimeFromUnity 18 | // function and pass the current time so the plugin can animate. 19 | 20 | #if UNITY_IPHONE && !UNITY_EDITOR 21 | [DllImport ("__Internal")] 22 | #else 23 | [DllImport ("RenderingPlugin")] 24 | #endif 25 | private static extern void SetTimeFromUnity(float t); 26 | 27 | 28 | // We'll also pass native pointer to a texture in Unity. 29 | // The plugin will fill texture data from native code. 30 | #if UNITY_IPHONE && !UNITY_EDITOR 31 | [DllImport ("__Internal")] 32 | #else 33 | [DllImport ("RenderingPlugin")] 34 | #endif 35 | #if UNITY_GLES_RENDERER 36 | private static extern void SetTextureFromUnity(System.IntPtr texture, int w, int h); 37 | #else 38 | private static extern void SetTextureFromUnity(System.IntPtr texture); 39 | #endif 40 | 41 | 42 | IEnumerator Start () { 43 | CreateTextureAndPassToPlugin(); 44 | yield return StartCoroutine("CallPluginAtEndOfFrames"); 45 | } 46 | 47 | private void CreateTextureAndPassToPlugin() 48 | { 49 | // Create a texture 50 | Texture2D tex = new Texture2D(256,256,TextureFormat.ARGB32,false); 51 | // Set point filtering just so we can see the pixels clearly 52 | tex.filterMode = FilterMode.Point; 53 | // Call Apply() so it's actually uploaded to the GPU 54 | tex.Apply(); 55 | 56 | // Set texture onto our matrial 57 | GetComponent().material.mainTexture = tex; 58 | 59 | // Pass texture pointer to the plugin 60 | #if UNITY_GLES_RENDERER 61 | SetTextureFromUnity (tex.GetNativeTexturePtr(), tex.width, tex.height); 62 | #else 63 | SetTextureFromUnity (tex.GetNativeTexturePtr()); 64 | #endif 65 | } 66 | 67 | private IEnumerator CallPluginAtEndOfFrames() 68 | { 69 | while (true) { 70 | // Wait until all frame rendering is done 71 | yield return new WaitForEndOfFrame(); 72 | 73 | // Set time for the plugin 74 | SetTimeFromUnity (Time.timeSinceLevelLoad); 75 | 76 | // Issue a plugin event with arbitrary integer identifier. 77 | // The plugin can distinguish between different 78 | // things it needs to do based on this ID. 79 | // For our simple plugin, it does not matter which ID we pass here. 80 | GL.IssuePluginEvent (1); 81 | } 82 | } 83 | } 84 | -------------------------------------------------------------------------------- /src/Unity5Project/Assets/scene.unity: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!29 &1 4 | SceneSettings: 5 | m_ObjectHideFlags: 0 6 | m_PVSData: 7 | m_PVSObjectsArray: [] 8 | m_PVSPortalsArray: [] 9 | m_OcclusionBakeSettings: 10 | viewCellSize: 1 11 | bakeMode: 2 12 | memoryUsage: 10485760 13 | --- !u!104 &2 14 | RenderSettings: 15 | m_Fog: 0 16 | m_FogColor: {r: .5, g: .5, b: .5, a: 1} 17 | m_FogMode: 3 18 | m_FogDensity: .00999999978 19 | m_LinearFogStart: 0 20 | m_LinearFogEnd: 300 21 | m_AmbientLight: {r: .0989079997, g: .100484997, b: .119402997, a: 1} 22 | m_SkyboxMaterial: {fileID: 0} 23 | m_HaloStrength: .5 24 | m_FlareStrength: 1 25 | m_HaloTexture: {fileID: 0} 26 | m_SpotCookie: {fileID: 0} 27 | m_ObjectHideFlags: 0 28 | --- !u!127 &3 29 | GameManager: 30 | m_ObjectHideFlags: 0 31 | --- !u!157 &4 32 | LightmapSettings: 33 | m_ObjectHideFlags: 0 34 | m_LightProbes: {fileID: 0} 35 | m_Lightmaps: [] 36 | m_LightmapsMode: 1 37 | m_BakedColorSpace: 0 38 | m_UseDualLightmapsInForward: 0 39 | m_LightmapEditorSettings: 40 | m_Resolution: 50 41 | m_LastUsedResolution: 0 42 | m_TextureWidth: 1024 43 | m_TextureHeight: 1024 44 | m_BounceBoost: 1 45 | m_BounceIntensity: 1 46 | m_SkyLightColor: {r: .860000014, g: .930000007, b: 1, a: 1} 47 | m_SkyLightIntensity: 0 48 | m_Quality: 0 49 | m_Bounces: 1 50 | m_FinalGatherRays: 1000 51 | m_FinalGatherContrastThreshold: .0500000007 52 | m_FinalGatherGradientThreshold: 0 53 | m_FinalGatherInterpolationPoints: 15 54 | m_AOAmount: 0 55 | m_AOMaxDistance: .100000001 56 | m_AOContrast: 1 57 | m_LODSurfaceMappingDistance: 1 58 | m_Padding: 0 59 | m_TextureCompression: 0 60 | m_LockAtlas: 0 61 | --- !u!196 &5 62 | NavMeshSettings: 63 | m_ObjectHideFlags: 0 64 | m_BuildSettings: 65 | agentRadius: .400000006 66 | agentHeight: 1.79999995 67 | agentSlope: 45 68 | agentClimb: .899999976 69 | ledgeDropHeight: 0 70 | maxJumpAcrossDistance: 0 71 | accuratePlacement: 0 72 | minRegionArea: 2 73 | widthInaccuracy: 16.666666 74 | heightInaccuracy: 10 75 | m_NavMesh: {fileID: 0} 76 | --- !u!1 &7 77 | GameObject: 78 | m_ObjectHideFlags: 0 79 | m_PrefabParentObject: {fileID: 0} 80 | m_PrefabInternal: {fileID: 0} 81 | serializedVersion: 4 82 | m_Component: 83 | - 4: {fileID: 9} 84 | - 20: {fileID: 10} 85 | - 92: {fileID: 12} 86 | - 124: {fileID: 13} 87 | - 81: {fileID: 11} 88 | m_Layer: 0 89 | m_Name: Main Camera 90 | m_TagString: MainCamera 91 | m_Icon: {fileID: 0} 92 | m_NavMeshLayer: 0 93 | m_StaticEditorFlags: 0 94 | m_IsActive: 1 95 | --- !u!4 &9 96 | Transform: 97 | m_ObjectHideFlags: 0 98 | m_PrefabParentObject: {fileID: 0} 99 | m_PrefabInternal: {fileID: 0} 100 | m_GameObject: {fileID: 7} 101 | m_LocalRotation: {x: -.136914968, y: -.837411821, z: .24425894, w: -.469396889} 102 | m_LocalPosition: {x: -1.91313601, y: 2.25397706, z: .506491005} 103 | m_LocalScale: {x: 1, y: 1, z: 1} 104 | m_Children: [] 105 | m_Father: {fileID: 0} 106 | --- !u!20 &10 107 | Camera: 108 | m_ObjectHideFlags: 0 109 | m_PrefabParentObject: {fileID: 0} 110 | m_PrefabInternal: {fileID: 0} 111 | m_GameObject: {fileID: 7} 112 | m_Enabled: 1 113 | serializedVersion: 2 114 | m_ClearFlags: 1 115 | m_BackGroundColor: {r: .192157, g: .301961005, b: .474510014, a: .0196080003} 116 | m_NormalizedViewPortRect: 117 | serializedVersion: 2 118 | x: 0 119 | y: 0 120 | width: 1 121 | height: 1 122 | near clip plane: 1 123 | far clip plane: 30 124 | field of view: 60 125 | orthographic: 0 126 | orthographic size: 100 127 | m_Depth: -1 128 | m_CullingMask: 129 | serializedVersion: 2 130 | m_Bits: 4294967295 131 | m_RenderingPath: -1 132 | m_TargetTexture: {fileID: 0} 133 | m_HDR: 0 134 | --- !u!81 &11 135 | AudioListener: 136 | m_ObjectHideFlags: 0 137 | m_PrefabParentObject: {fileID: 0} 138 | m_PrefabInternal: {fileID: 0} 139 | m_GameObject: {fileID: 7} 140 | m_Enabled: 1 141 | --- !u!92 &12 142 | Behaviour: 143 | m_ObjectHideFlags: 0 144 | m_PrefabParentObject: {fileID: 0} 145 | m_PrefabInternal: {fileID: 0} 146 | m_GameObject: {fileID: 7} 147 | m_Enabled: 1 148 | --- !u!124 &13 149 | Behaviour: 150 | m_ObjectHideFlags: 0 151 | m_PrefabParentObject: {fileID: 0} 152 | m_PrefabInternal: {fileID: 0} 153 | m_GameObject: {fileID: 7} 154 | m_Enabled: 1 155 | --- !u!1 &15 156 | GameObject: 157 | m_ObjectHideFlags: 0 158 | m_PrefabParentObject: {fileID: 0} 159 | m_PrefabInternal: {fileID: 0} 160 | serializedVersion: 4 161 | m_Component: 162 | - 4: {fileID: 19} 163 | - 108: {fileID: 28} 164 | m_Layer: 0 165 | m_Name: Spotlight 166 | m_TagString: Untagged 167 | m_Icon: {fileID: 0} 168 | m_NavMeshLayer: 0 169 | m_StaticEditorFlags: 0 170 | m_IsActive: 1 171 | --- !u!1 &16 172 | GameObject: 173 | m_ObjectHideFlags: 0 174 | m_PrefabParentObject: {fileID: 0} 175 | m_PrefabInternal: {fileID: 0} 176 | serializedVersion: 4 177 | m_Component: 178 | - 4: {fileID: 20} 179 | - 108: {fileID: 29} 180 | m_Layer: 0 181 | m_Name: Directional light 182 | m_TagString: Untagged 183 | m_Icon: {fileID: 0} 184 | m_NavMeshLayer: 0 185 | m_StaticEditorFlags: 0 186 | m_IsActive: 1 187 | --- !u!1 &17 188 | GameObject: 189 | m_ObjectHideFlags: 0 190 | m_PrefabParentObject: {fileID: 0} 191 | m_PrefabInternal: {fileID: 0} 192 | serializedVersion: 4 193 | m_Component: 194 | - 4: {fileID: 21} 195 | - 33: {fileID: 25} 196 | - 135: {fileID: 30} 197 | - 23: {fileID: 23} 198 | m_Layer: 0 199 | m_Name: Sphere 200 | m_TagString: Untagged 201 | m_Icon: {fileID: 0} 202 | m_NavMeshLayer: 0 203 | m_StaticEditorFlags: 0 204 | m_IsActive: 1 205 | --- !u!1 &18 206 | GameObject: 207 | m_ObjectHideFlags: 0 208 | m_PrefabParentObject: {fileID: 0} 209 | m_PrefabInternal: {fileID: 0} 210 | serializedVersion: 4 211 | m_Component: 212 | - 4: {fileID: 22} 213 | - 33: {fileID: 26} 214 | - 64: {fileID: 27} 215 | - 23: {fileID: 24} 216 | - 114: {fileID: 31} 217 | m_Layer: 0 218 | m_Name: PlaneThatCallsIntoPlugin 219 | m_TagString: Untagged 220 | m_Icon: {fileID: 0} 221 | m_NavMeshLayer: 0 222 | m_StaticEditorFlags: 0 223 | m_IsActive: 1 224 | --- !u!4 &19 225 | Transform: 226 | m_ObjectHideFlags: 0 227 | m_PrefabParentObject: {fileID: 0} 228 | m_PrefabInternal: {fileID: 0} 229 | m_GameObject: {fileID: 15} 230 | m_LocalRotation: {x: -.0868029669, y: -.913151681, z: .276786923, w: -.286370903} 231 | m_LocalPosition: {x: -2.2101779, y: 2.85066295, z: 1.87864196} 232 | m_LocalScale: {x: 1, y: 1, z: 1} 233 | m_Children: [] 234 | m_Father: {fileID: 0} 235 | --- !u!4 &20 236 | Transform: 237 | m_ObjectHideFlags: 0 238 | m_PrefabParentObject: {fileID: 0} 239 | m_PrefabInternal: {fileID: 0} 240 | m_GameObject: {fileID: 16} 241 | m_LocalRotation: {x: -.316681981, y: -.332274973, z: .119525984, w: -.880351901} 242 | m_LocalPosition: {x: -2.35900211, y: 3.20472097, z: -3.58090401} 243 | m_LocalScale: {x: 1, y: 1, z: 1} 244 | m_Children: [] 245 | m_Father: {fileID: 0} 246 | --- !u!4 &21 247 | Transform: 248 | m_ObjectHideFlags: 0 249 | m_PrefabParentObject: {fileID: 0} 250 | m_PrefabInternal: {fileID: 0} 251 | m_GameObject: {fileID: 17} 252 | m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} 253 | m_LocalPosition: {x: .109563001, y: 1.02701199, z: -1.07652104} 254 | m_LocalScale: {x: 1, y: 1, z: 1} 255 | m_Children: [] 256 | m_Father: {fileID: 0} 257 | --- !u!4 &22 258 | Transform: 259 | m_ObjectHideFlags: 0 260 | m_PrefabParentObject: {fileID: 0} 261 | m_PrefabInternal: {fileID: 0} 262 | m_GameObject: {fileID: 18} 263 | m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} 264 | m_LocalPosition: {x: 1.94314873, y: .447557986, z: -3.41346455} 265 | m_LocalScale: {x: 1, y: 1, z: 1} 266 | m_Children: [] 267 | m_Father: {fileID: 0} 268 | --- !u!23 &23 269 | Renderer: 270 | m_ObjectHideFlags: 0 271 | m_PrefabParentObject: {fileID: 0} 272 | m_PrefabInternal: {fileID: 0} 273 | m_GameObject: {fileID: 17} 274 | m_Enabled: 1 275 | m_CastShadows: 1 276 | m_ReceiveShadows: 1 277 | m_LightmapIndex: 255 278 | m_LightmapTilingOffset: {x: 1, y: 1, z: 0, w: 0} 279 | m_Materials: 280 | - {fileID: 10302, guid: 0000000000000000e000000000000000, type: 0} 281 | m_SubsetIndices: 282 | m_StaticBatchRoot: {fileID: 0} 283 | m_UseLightProbes: 0 284 | m_LightProbeAnchor: {fileID: 0} 285 | m_ScaleInLightmap: 1 286 | --- !u!23 &24 287 | Renderer: 288 | m_ObjectHideFlags: 0 289 | m_PrefabParentObject: {fileID: 0} 290 | m_PrefabInternal: {fileID: 0} 291 | m_GameObject: {fileID: 18} 292 | m_Enabled: 1 293 | m_CastShadows: 1 294 | m_ReceiveShadows: 1 295 | m_LightmapIndex: 255 296 | m_LightmapTilingOffset: {x: 1, y: 1, z: 0, w: 0} 297 | m_Materials: 298 | - {fileID: 10302, guid: 0000000000000000e000000000000000, type: 0} 299 | m_SubsetIndices: 300 | m_StaticBatchRoot: {fileID: 0} 301 | m_UseLightProbes: 0 302 | m_LightProbeAnchor: {fileID: 0} 303 | m_ScaleInLightmap: 1 304 | --- !u!33 &25 305 | MeshFilter: 306 | m_ObjectHideFlags: 0 307 | m_PrefabParentObject: {fileID: 0} 308 | m_PrefabInternal: {fileID: 0} 309 | m_GameObject: {fileID: 17} 310 | m_Mesh: {fileID: 10207, guid: 0000000000000000e000000000000000, type: 0} 311 | --- !u!33 &26 312 | MeshFilter: 313 | m_ObjectHideFlags: 0 314 | m_PrefabParentObject: {fileID: 0} 315 | m_PrefabInternal: {fileID: 0} 316 | m_GameObject: {fileID: 18} 317 | m_Mesh: {fileID: 10209, guid: 0000000000000000e000000000000000, type: 0} 318 | --- !u!64 &27 319 | MeshCollider: 320 | m_ObjectHideFlags: 0 321 | m_PrefabParentObject: {fileID: 0} 322 | m_PrefabInternal: {fileID: 0} 323 | m_GameObject: {fileID: 18} 324 | m_Material: {fileID: 0} 325 | m_IsTrigger: 0 326 | m_Enabled: 1 327 | serializedVersion: 2 328 | m_SmoothSphereCollisions: 0 329 | m_Convex: 0 330 | m_Mesh: {fileID: 10209, guid: 0000000000000000e000000000000000, type: 0} 331 | --- !u!108 &28 332 | Light: 333 | m_ObjectHideFlags: 0 334 | m_PrefabParentObject: {fileID: 0} 335 | m_PrefabInternal: {fileID: 0} 336 | m_GameObject: {fileID: 15} 337 | m_Enabled: 1 338 | serializedVersion: 3 339 | m_Type: 0 340 | m_Color: {r: 1, g: .492536992, b: .492536992, a: 1} 341 | m_Intensity: 1 342 | m_Range: 10 343 | m_SpotAngle: 30 344 | m_CookieSize: 10 345 | m_Shadows: 346 | m_Type: 0 347 | m_Resolution: -1 348 | m_Strength: 1 349 | m_Bias: .0500000007 350 | m_Softness: 4 351 | m_SoftnessFade: 1 352 | m_Cookie: {fileID: 0} 353 | m_DrawHalo: 0 354 | m_ActuallyLightmapped: 0 355 | m_Flare: {fileID: 0} 356 | m_RenderMode: 0 357 | m_CullingMask: 358 | serializedVersion: 2 359 | m_Bits: 4294967295 360 | m_Lightmapping: 1 361 | m_ShadowSamples: 1 362 | m_ShadowRadius: 0 363 | m_ShadowAngle: 0 364 | m_IndirectIntensity: 1 365 | m_AreaSize: {x: 1, y: 1} 366 | --- !u!108 &29 367 | Light: 368 | m_ObjectHideFlags: 0 369 | m_PrefabParentObject: {fileID: 0} 370 | m_PrefabInternal: {fileID: 0} 371 | m_GameObject: {fileID: 16} 372 | m_Enabled: 1 373 | serializedVersion: 3 374 | m_Type: 1 375 | m_Color: {r: 1, g: .997494996, b: .955223978, a: 1} 376 | m_Intensity: .5 377 | m_Range: 10 378 | m_SpotAngle: 30 379 | m_CookieSize: 10 380 | m_Shadows: 381 | m_Type: 2 382 | m_Resolution: -1 383 | m_Strength: 1 384 | m_Bias: .0500000007 385 | m_Softness: 4 386 | m_SoftnessFade: 1 387 | m_Cookie: {fileID: 0} 388 | m_DrawHalo: 0 389 | m_ActuallyLightmapped: 0 390 | m_Flare: {fileID: 0} 391 | m_RenderMode: 0 392 | m_CullingMask: 393 | serializedVersion: 2 394 | m_Bits: 4294967295 395 | m_Lightmapping: 1 396 | m_ShadowSamples: 1 397 | m_ShadowRadius: 0 398 | m_ShadowAngle: 0 399 | m_IndirectIntensity: 1 400 | m_AreaSize: {x: 1, y: 1} 401 | --- !u!135 &30 402 | SphereCollider: 403 | m_ObjectHideFlags: 0 404 | m_PrefabParentObject: {fileID: 0} 405 | m_PrefabInternal: {fileID: 0} 406 | m_GameObject: {fileID: 17} 407 | m_Material: {fileID: 0} 408 | m_IsTrigger: 0 409 | m_Enabled: 1 410 | serializedVersion: 2 411 | m_Radius: .5 412 | m_Center: {x: 0, y: 0, z: -0} 413 | --- !u!114 &31 414 | MonoBehaviour: 415 | m_ObjectHideFlags: 0 416 | m_PrefabParentObject: {fileID: 0} 417 | m_PrefabInternal: {fileID: 0} 418 | m_GameObject: {fileID: 18} 419 | m_Enabled: 1 420 | m_EditorHideFlags: 0 421 | m_Script: {fileID: 11500000, guid: f1ad34d2576df73428a8586fc566c6cb, type: 3} 422 | m_Name: 423 | --- !u!1 &32 424 | GameObject: 425 | m_ObjectHideFlags: 0 426 | m_PrefabParentObject: {fileID: 0} 427 | m_PrefabInternal: {fileID: 0} 428 | serializedVersion: 4 429 | m_Component: 430 | - 4: {fileID: 33} 431 | - 132: {fileID: 34} 432 | m_Layer: 0 433 | m_Name: GUI Text 434 | m_TagString: Untagged 435 | m_Icon: {fileID: 0} 436 | m_NavMeshLayer: 0 437 | m_StaticEditorFlags: 0 438 | m_IsActive: 1 439 | --- !u!4 &33 440 | Transform: 441 | m_ObjectHideFlags: 0 442 | m_PrefabParentObject: {fileID: 0} 443 | m_PrefabInternal: {fileID: 0} 444 | m_GameObject: {fileID: 32} 445 | m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} 446 | m_LocalPosition: {x: 0, y: 1, z: 0} 447 | m_LocalScale: {x: 1, y: 1, z: 1} 448 | m_Children: [] 449 | m_Father: {fileID: 0} 450 | --- !u!132 &34 451 | GUIText: 452 | m_ObjectHideFlags: 0 453 | m_PrefabParentObject: {fileID: 0} 454 | m_PrefabInternal: {fileID: 0} 455 | m_GameObject: {fileID: 32} 456 | m_Enabled: 1 457 | serializedVersion: 3 458 | m_Text: "A simple scene. The plugin will render a rotating triangle in the middle 459 | of it.\r\nIt will also fill the plane texture each frame.\r\nAll done from native 460 | code.\r\nPress Play!" 461 | m_Anchor: 0 462 | m_Alignment: 0 463 | m_PixelOffset: {x: 0, y: 0} 464 | m_LineSpacing: 1 465 | m_TabSize: 4 466 | m_Font: {fileID: 10102, guid: 0000000000000000e000000000000000, type: 0} 467 | m_Material: {fileID: 0} 468 | m_FontSize: 0 469 | m_FontStyle: 0 470 | m_PixelCorrect: 1 471 | m_RichText: 1 472 | -------------------------------------------------------------------------------- /src/Unity5Project/ProjectSettings/AudioManager.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!11 &1 4 | AudioManager: 5 | m_ObjectHideFlags: 0 6 | m_Volume: 1 7 | Rolloff Scale: 1 8 | m_SpeedOfSound: 347 9 | Doppler Factor: 1 10 | Default Speaker Mode: 2 11 | m_DSPBufferSize: 0 12 | -------------------------------------------------------------------------------- /src/Unity5Project/ProjectSettings/DynamicsManager.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!55 &1 4 | PhysicsManager: 5 | m_ObjectHideFlags: 0 6 | m_Gravity: {x: 0, y: -9.81000042, z: 0} 7 | m_DefaultMaterial: {fileID: 0} 8 | m_BounceThreshold: 2 9 | m_SleepVelocity: .150000006 10 | m_SleepAngularVelocity: .140000001 11 | m_MaxAngularVelocity: 7 12 | m_MinPenetrationForPenalty: .00999999978 13 | m_SolverIterationCount: 6 14 | m_RaycastsHitTriggers: 1 15 | m_LayerCollisionMatrix: ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff 16 | -------------------------------------------------------------------------------- /src/Unity5Project/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 | -------------------------------------------------------------------------------- /src/Unity5Project/ProjectSettings/EditorSettings.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!159 &1 4 | EditorSettings: 5 | m_ObjectHideFlags: 0 6 | serializedVersion: 1 7 | m_ExternalVersionControlSupport: 1 8 | m_SerializationMode: 2 9 | m_WebSecurityEmulationEnabled: 0 10 | m_WebSecurityEmulationHostUrl: http://www.mydomain.com/mygame.unity3d 11 | -------------------------------------------------------------------------------- /src/Unity5Project/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: 3 7 | m_Deferred: 8 | m_Mode: 1 9 | m_Shader: {fileID: 69, guid: 0000000000000000f000000000000000, type: 0} 10 | m_LegacyDeferred: 11 | m_Mode: 1 12 | m_Shader: {fileID: 63, guid: 0000000000000000f000000000000000, type: 0} 13 | m_AlwaysIncludedShaders: 14 | - {fileID: 7, guid: 0000000000000000f000000000000000, type: 0} 15 | - {fileID: 15104, guid: 0000000000000000f000000000000000, type: 0} 16 | - {fileID: 15105, guid: 0000000000000000f000000000000000, type: 0} 17 | - {fileID: 15106, guid: 0000000000000000f000000000000000, type: 0} 18 | - {fileID: 10770, guid: 0000000000000000f000000000000000, type: 0} 19 | - {fileID: 10782, guid: 0000000000000000f000000000000000, type: 0} 20 | m_PreloadedShaders: [] 21 | m_LightmapStripping: 0 22 | m_LightmapKeepPlain: 1 23 | m_LightmapKeepDirCombined: 1 24 | m_LightmapKeepDirSeparate: 1 25 | m_LightmapKeepDynamic: 1 26 | m_FogStripping: 0 27 | m_FogKeepLinear: 1 28 | m_FogKeepExp: 1 29 | m_FogKeepExp2: 1 30 | -------------------------------------------------------------------------------- /src/Unity5Project/ProjectSettings/InputManager.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!13 &1 4 | InputManager: 5 | m_ObjectHideFlags: 0 6 | m_Axes: 7 | - serializedVersion: 3 8 | m_Name: Horizontal 9 | descriptiveName: 10 | descriptiveNegativeName: 11 | negativeButton: left 12 | positiveButton: right 13 | altNegativeButton: a 14 | altPositiveButton: d 15 | gravity: 3 16 | dead: .00100000005 17 | sensitivity: 3 18 | snap: 1 19 | invert: 0 20 | type: 0 21 | axis: 0 22 | joyNum: 0 23 | - serializedVersion: 3 24 | m_Name: Vertical 25 | descriptiveName: 26 | descriptiveNegativeName: 27 | negativeButton: down 28 | positiveButton: up 29 | altNegativeButton: s 30 | altPositiveButton: w 31 | gravity: 3 32 | dead: .00100000005 33 | sensitivity: 3 34 | snap: 1 35 | invert: 0 36 | type: 0 37 | axis: 0 38 | joyNum: 0 39 | - serializedVersion: 3 40 | m_Name: Fire1 41 | descriptiveName: 42 | descriptiveNegativeName: 43 | negativeButton: 44 | positiveButton: left ctrl 45 | altNegativeButton: 46 | altPositiveButton: mouse 0 47 | gravity: 1000 48 | dead: .00100000005 49 | sensitivity: 1000 50 | snap: 0 51 | invert: 0 52 | type: 0 53 | axis: 0 54 | joyNum: 0 55 | - serializedVersion: 3 56 | m_Name: Fire2 57 | descriptiveName: 58 | descriptiveNegativeName: 59 | negativeButton: 60 | positiveButton: left alt 61 | altNegativeButton: 62 | altPositiveButton: mouse 1 63 | gravity: 1000 64 | dead: .00100000005 65 | sensitivity: 1000 66 | snap: 0 67 | invert: 0 68 | type: 0 69 | axis: 0 70 | joyNum: 0 71 | - serializedVersion: 3 72 | m_Name: Fire3 73 | descriptiveName: 74 | descriptiveNegativeName: 75 | negativeButton: 76 | positiveButton: left cmd 77 | altNegativeButton: 78 | altPositiveButton: mouse 2 79 | gravity: 1000 80 | dead: .00100000005 81 | sensitivity: 1000 82 | snap: 0 83 | invert: 0 84 | type: 0 85 | axis: 0 86 | joyNum: 0 87 | - serializedVersion: 3 88 | m_Name: Jump 89 | descriptiveName: 90 | descriptiveNegativeName: 91 | negativeButton: 92 | positiveButton: space 93 | altNegativeButton: 94 | altPositiveButton: 95 | gravity: 1000 96 | dead: .00100000005 97 | sensitivity: 1000 98 | snap: 0 99 | invert: 0 100 | type: 0 101 | axis: 0 102 | joyNum: 0 103 | - serializedVersion: 3 104 | m_Name: Mouse X 105 | descriptiveName: 106 | descriptiveNegativeName: 107 | negativeButton: 108 | positiveButton: 109 | altNegativeButton: 110 | altPositiveButton: 111 | gravity: 0 112 | dead: 0 113 | sensitivity: .100000001 114 | snap: 0 115 | invert: 0 116 | type: 1 117 | axis: 0 118 | joyNum: 0 119 | - serializedVersion: 3 120 | m_Name: Mouse Y 121 | descriptiveName: 122 | descriptiveNegativeName: 123 | negativeButton: 124 | positiveButton: 125 | altNegativeButton: 126 | altPositiveButton: 127 | gravity: 0 128 | dead: 0 129 | sensitivity: .100000001 130 | snap: 0 131 | invert: 0 132 | type: 1 133 | axis: 1 134 | joyNum: 0 135 | - serializedVersion: 3 136 | m_Name: Mouse ScrollWheel 137 | descriptiveName: 138 | descriptiveNegativeName: 139 | negativeButton: 140 | positiveButton: 141 | altNegativeButton: 142 | altPositiveButton: 143 | gravity: 0 144 | dead: 0 145 | sensitivity: .100000001 146 | snap: 0 147 | invert: 0 148 | type: 1 149 | axis: 2 150 | joyNum: 0 151 | - serializedVersion: 3 152 | m_Name: Window Shake X 153 | descriptiveName: 154 | descriptiveNegativeName: 155 | negativeButton: 156 | positiveButton: 157 | altNegativeButton: 158 | altPositiveButton: 159 | gravity: 0 160 | dead: 0 161 | sensitivity: .100000001 162 | snap: 0 163 | invert: 0 164 | type: 3 165 | axis: 0 166 | joyNum: 0 167 | - serializedVersion: 3 168 | m_Name: Window Shake Y 169 | descriptiveName: 170 | descriptiveNegativeName: 171 | negativeButton: 172 | positiveButton: 173 | altNegativeButton: 174 | altPositiveButton: 175 | gravity: 0 176 | dead: 0 177 | sensitivity: .100000001 178 | snap: 0 179 | invert: 0 180 | type: 3 181 | axis: 1 182 | joyNum: 0 183 | - serializedVersion: 3 184 | m_Name: Horizontal 185 | descriptiveName: 186 | descriptiveNegativeName: 187 | negativeButton: 188 | positiveButton: 189 | altNegativeButton: 190 | altPositiveButton: 191 | gravity: 0 192 | dead: .189999998 193 | sensitivity: 1 194 | snap: 0 195 | invert: 0 196 | type: 2 197 | axis: 0 198 | joyNum: 0 199 | - serializedVersion: 3 200 | m_Name: Vertical 201 | descriptiveName: 202 | descriptiveNegativeName: 203 | negativeButton: 204 | positiveButton: 205 | altNegativeButton: 206 | altPositiveButton: 207 | gravity: 0 208 | dead: .189999998 209 | sensitivity: 1 210 | snap: 0 211 | invert: 1 212 | type: 2 213 | axis: 1 214 | joyNum: 0 215 | - serializedVersion: 3 216 | m_Name: Fire1 217 | descriptiveName: 218 | descriptiveNegativeName: 219 | negativeButton: 220 | positiveButton: joystick button 0 221 | altNegativeButton: 222 | altPositiveButton: 223 | gravity: 1000 224 | dead: .00100000005 225 | sensitivity: 1000 226 | snap: 0 227 | invert: 0 228 | type: 0 229 | axis: 0 230 | joyNum: 0 231 | - serializedVersion: 3 232 | m_Name: Fire2 233 | descriptiveName: 234 | descriptiveNegativeName: 235 | negativeButton: 236 | positiveButton: joystick button 1 237 | altNegativeButton: 238 | altPositiveButton: 239 | gravity: 1000 240 | dead: .00100000005 241 | sensitivity: 1000 242 | snap: 0 243 | invert: 0 244 | type: 0 245 | axis: 0 246 | joyNum: 0 247 | - serializedVersion: 3 248 | m_Name: Fire3 249 | descriptiveName: 250 | descriptiveNegativeName: 251 | negativeButton: 252 | positiveButton: joystick button 2 253 | altNegativeButton: 254 | altPositiveButton: 255 | gravity: 1000 256 | dead: .00100000005 257 | sensitivity: 1000 258 | snap: 0 259 | invert: 0 260 | type: 0 261 | axis: 0 262 | joyNum: 0 263 | - serializedVersion: 3 264 | m_Name: Jump 265 | descriptiveName: 266 | descriptiveNegativeName: 267 | negativeButton: 268 | positiveButton: joystick button 3 269 | altNegativeButton: 270 | altPositiveButton: 271 | gravity: 1000 272 | dead: .00100000005 273 | sensitivity: 1000 274 | snap: 0 275 | invert: 0 276 | type: 0 277 | axis: 0 278 | joyNum: 0 279 | -------------------------------------------------------------------------------- /src/Unity5Project/ProjectSettings/NavMeshAreas.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!126 &1 4 | NavMeshLayers: 5 | m_ObjectHideFlags: 0 6 | Built-in Layer 0: 7 | name: Default 8 | cost: 1 9 | editType: 2 10 | Built-in Layer 1: 11 | name: Not Walkable 12 | cost: 1 13 | editType: 0 14 | Built-in Layer 2: 15 | name: Jump 16 | cost: 2 17 | editType: 2 18 | User Layer 0: 19 | name: 20 | cost: 1 21 | editType: 3 22 | User Layer 1: 23 | name: 24 | cost: 1 25 | editType: 3 26 | User Layer 2: 27 | name: 28 | cost: 1 29 | editType: 3 30 | User Layer 3: 31 | name: 32 | cost: 1 33 | editType: 3 34 | User Layer 4: 35 | name: 36 | cost: 1 37 | editType: 3 38 | User Layer 5: 39 | name: 40 | cost: 1 41 | editType: 3 42 | User Layer 6: 43 | name: 44 | cost: 1 45 | editType: 3 46 | User Layer 7: 47 | name: 48 | cost: 1 49 | editType: 3 50 | User Layer 8: 51 | name: 52 | cost: 1 53 | editType: 3 54 | User Layer 9: 55 | name: 56 | cost: 1 57 | editType: 3 58 | User Layer 10: 59 | name: 60 | cost: 1 61 | editType: 3 62 | User Layer 11: 63 | name: 64 | cost: 1 65 | editType: 3 66 | User Layer 12: 67 | name: 68 | cost: 1 69 | editType: 3 70 | User Layer 13: 71 | name: 72 | cost: 1 73 | editType: 3 74 | User Layer 14: 75 | name: 76 | cost: 1 77 | editType: 3 78 | User Layer 15: 79 | name: 80 | cost: 1 81 | editType: 3 82 | User Layer 16: 83 | name: 84 | cost: 1 85 | editType: 3 86 | User Layer 17: 87 | name: 88 | cost: 1 89 | editType: 3 90 | User Layer 18: 91 | name: 92 | cost: 1 93 | editType: 3 94 | User Layer 19: 95 | name: 96 | cost: 1 97 | editType: 3 98 | User Layer 20: 99 | name: 100 | cost: 1 101 | editType: 3 102 | User Layer 21: 103 | name: 104 | cost: 1 105 | editType: 3 106 | User Layer 22: 107 | name: 108 | cost: 1 109 | editType: 3 110 | User Layer 23: 111 | name: 112 | cost: 1 113 | editType: 3 114 | User Layer 24: 115 | name: 116 | cost: 1 117 | editType: 3 118 | User Layer 25: 119 | name: 120 | cost: 1 121 | editType: 3 122 | User Layer 26: 123 | name: 124 | cost: 1 125 | editType: 3 126 | User Layer 27: 127 | name: 128 | cost: 1 129 | editType: 3 130 | User Layer 28: 131 | name: 132 | cost: 1 133 | editType: 3 134 | -------------------------------------------------------------------------------- /src/Unity5Project/ProjectSettings/NavMeshLayers.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!126 &1 4 | NavMeshLayers: 5 | m_ObjectHideFlags: 0 6 | Built-in Layer 0: 7 | name: Default 8 | cost: 1 9 | editType: 2 10 | Built-in Layer 1: 11 | name: Not Walkable 12 | cost: 1 13 | editType: 0 14 | Built-in Layer 2: 15 | name: Jump 16 | cost: 2 17 | editType: 2 18 | User Layer 0: 19 | name: 20 | cost: 1 21 | editType: 3 22 | User Layer 1: 23 | name: 24 | cost: 1 25 | editType: 3 26 | User Layer 2: 27 | name: 28 | cost: 1 29 | editType: 3 30 | User Layer 3: 31 | name: 32 | cost: 1 33 | editType: 3 34 | User Layer 4: 35 | name: 36 | cost: 1 37 | editType: 3 38 | User Layer 5: 39 | name: 40 | cost: 1 41 | editType: 3 42 | User Layer 6: 43 | name: 44 | cost: 1 45 | editType: 3 46 | User Layer 7: 47 | name: 48 | cost: 1 49 | editType: 3 50 | User Layer 8: 51 | name: 52 | cost: 1 53 | editType: 3 54 | User Layer 9: 55 | name: 56 | cost: 1 57 | editType: 3 58 | User Layer 10: 59 | name: 60 | cost: 1 61 | editType: 3 62 | User Layer 11: 63 | name: 64 | cost: 1 65 | editType: 3 66 | User Layer 12: 67 | name: 68 | cost: 1 69 | editType: 3 70 | User Layer 13: 71 | name: 72 | cost: 1 73 | editType: 3 74 | User Layer 14: 75 | name: 76 | cost: 1 77 | editType: 3 78 | User Layer 15: 79 | name: 80 | cost: 1 81 | editType: 3 82 | User Layer 16: 83 | name: 84 | cost: 1 85 | editType: 3 86 | User Layer 17: 87 | name: 88 | cost: 1 89 | editType: 3 90 | User Layer 18: 91 | name: 92 | cost: 1 93 | editType: 3 94 | User Layer 19: 95 | name: 96 | cost: 1 97 | editType: 3 98 | User Layer 20: 99 | name: 100 | cost: 1 101 | editType: 3 102 | User Layer 21: 103 | name: 104 | cost: 1 105 | editType: 3 106 | User Layer 22: 107 | name: 108 | cost: 1 109 | editType: 3 110 | User Layer 23: 111 | name: 112 | cost: 1 113 | editType: 3 114 | User Layer 24: 115 | name: 116 | cost: 1 117 | editType: 3 118 | User Layer 25: 119 | name: 120 | cost: 1 121 | editType: 3 122 | User Layer 26: 123 | name: 124 | cost: 1 125 | editType: 3 126 | User Layer 27: 127 | name: 128 | cost: 1 129 | editType: 3 130 | User Layer 28: 131 | name: 132 | cost: 1 133 | editType: 3 134 | -------------------------------------------------------------------------------- /src/Unity5Project/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 | -------------------------------------------------------------------------------- /src/Unity5Project/ProjectSettings/Physics2DSettings.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!19 &1 4 | Physics2DSettings: 5 | m_ObjectHideFlags: 0 6 | m_Gravity: {x: 0, y: -9.81000042} 7 | m_DefaultMaterial: {fileID: 0} 8 | m_VelocityIterations: 8 9 | m_PositionIterations: 3 10 | m_VelocityThreshold: 1 11 | m_MaxLinearCorrection: .200000003 12 | m_MaxAngularCorrection: 8 13 | m_MaxTranslationSpeed: 100 14 | m_MaxRotationSpeed: 360 15 | m_MinPenetrationForPenalty: .00999999978 16 | m_BaumgarteScale: .200000003 17 | m_BaumgarteTimeOfImpactScale: .75 18 | m_TimeToSleep: .5 19 | m_LinearSleepTolerance: .00999999978 20 | m_AngularSleepTolerance: 2 21 | m_RaycastsHitTriggers: 1 22 | m_RaycastsStartInColliders: 1 23 | m_ChangeStopsCallbacks: 0 24 | m_LayerCollisionMatrix: ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff 25 | -------------------------------------------------------------------------------- /src/Unity5Project/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: 7 7 | AndroidProfiler: 0 8 | defaultScreenOrientation: 0 9 | targetDevice: 2 10 | targetResolution: 0 11 | accelerometerFrequency: 60 12 | companyName: Unity Technologies 13 | productName: Plugin Render API Example 14 | defaultCursor: {fileID: 0} 15 | cursorHotspot: {x: 1.30054835e+36, y: -4.35364182e-18} 16 | m_ShowUnitySplashScreen: 1 17 | defaultScreenWidth: 640 18 | defaultScreenHeight: 480 19 | defaultScreenWidthWeb: 600 20 | defaultScreenHeightWeb: 450 21 | m_RenderingPath: 1 22 | m_MobileRenderingPath: 1 23 | m_ActiveColorSpace: 0 24 | m_MTRendering: 1 25 | m_MobileMTRendering: 0 26 | m_Stereoscopic3D: 0 27 | iosShowActivityIndicatorOnLoading: -1 28 | androidShowActivityIndicatorOnLoading: -1 29 | iosAppInBackgroundBehavior: 0 30 | displayResolutionDialog: 0 31 | allowedAutorotateToPortrait: 1 32 | allowedAutorotateToPortraitUpsideDown: 1 33 | allowedAutorotateToLandscapeRight: 1 34 | allowedAutorotateToLandscapeLeft: 1 35 | useOSAutorotation: 1 36 | use32BitDisplayBuffer: 0 37 | disableDepthAndStencilBuffers: 0 38 | defaultIsFullScreen: 0 39 | defaultIsNativeResolution: 1 40 | runInBackground: 1 41 | captureSingleScreen: 0 42 | Override IPod Music: 0 43 | Prepare IOS For Recording: 0 44 | submitAnalytics: 1 45 | usePlayerLog: 1 46 | bakeCollisionMeshes: 0 47 | forceSingleInstance: 0 48 | resizableWindow: 0 49 | useMacAppStoreValidation: 0 50 | gpuSkinning: 0 51 | xboxPIXTextureCapture: 0 52 | xboxEnableAvatar: 0 53 | xboxEnableKinect: 0 54 | xboxEnableKinectAutoTracking: 0 55 | xboxEnableFitness: 0 56 | visibleInBackground: 0 57 | macFullscreenMode: 2 58 | d3d9FullscreenMode: 1 59 | d3d11FullscreenMode: 1 60 | xboxSpeechDB: 0 61 | xboxEnableHeadOrientation: 0 62 | xboxEnableGuest: 0 63 | xboxOneResolution: 0 64 | ps3SplashScreen: {fileID: 0} 65 | videoMemoryForVertexBuffers: 0 66 | psp2PowerMode: 0 67 | psp2AcquireBGM: 1 68 | m_SupportedAspectRatios: 69 | 4:3: 1 70 | 5:4: 1 71 | 16:10: 1 72 | 16:9: 1 73 | Others: 1 74 | bundleIdentifier: com.Company.ProductName 75 | bundleVersion: 1.0 76 | preloadedAssets: [] 77 | metroEnableIndependentInputSource: 0 78 | metroEnableLowLatencyPresentationAPI: 0 79 | xboxOneDisableKinectGpuReservation: 0 80 | virtualRealitySupported: 0 81 | productGUID: c030631a5b3216a4db628e7ab1af49c6 82 | AndroidBundleVersionCode: 1 83 | AndroidMinSdkVersion: 9 84 | AndroidPreferredInstallLocation: 1 85 | aotOptions: 86 | apiCompatibilityLevel: 2 87 | iPhoneStrippingLevel: 0 88 | iPhoneScriptCallOptimization: 0 89 | ForceInternetPermission: 0 90 | ForceSDCardPermission: 0 91 | CreateWallpaper: 0 92 | APKExpansionFiles: 0 93 | preloadShaders: 0 94 | StripUnusedMeshComponents: 0 95 | iPhoneSdkVersion: 988 96 | iPhoneTargetOSVersion: 22 97 | uIPrerenderedIcon: 0 98 | uIRequiresPersistentWiFi: 0 99 | uIStatusBarHidden: 1 100 | uIExitOnSuspend: 0 101 | uIStatusBarStyle: 0 102 | iPhoneSplashScreen: {fileID: 0} 103 | iPhoneHighResSplashScreen: {fileID: 0} 104 | iPhoneTallHighResSplashScreen: {fileID: 0} 105 | iPhone47inSplashScreen: {fileID: 0} 106 | iPhone55inPortraitSplashScreen: {fileID: 0} 107 | iPhone55inLandscapeSplashScreen: {fileID: 0} 108 | iPadPortraitSplashScreen: {fileID: 0} 109 | iPadHighResPortraitSplashScreen: {fileID: 0} 110 | iPadLandscapeSplashScreen: {fileID: 0} 111 | iPadHighResLandscapeSplashScreen: {fileID: 0} 112 | iOSLaunchScreenType: 0 113 | iOSLaunchScreenPortrait: {fileID: 0} 114 | iOSLaunchScreenLandscape: {fileID: 0} 115 | iOSLaunchScreenBackgroundColor: 116 | serializedVersion: 2 117 | rgba: 2560005116 118 | iOSLaunchScreenFillPct: 100 119 | iOSLaunchScreenSize: 100 120 | iOSLaunchScreenCustomXibPath: 121 | AndroidTargetDevice: 0 122 | AndroidSplashScreenScale: 0 123 | androidSplashScreen: {fileID: 0} 124 | AndroidKeystoreName: 125 | AndroidKeyaliasName: 126 | AndroidTVCompatibility: 1 127 | AndroidIsGame: 1 128 | androidEnableBanner: 1 129 | m_AndroidBanners: 130 | - width: 320 131 | height: 180 132 | banner: {fileID: 0} 133 | androidGamepadSupportLevel: 0 134 | resolutionDialogBanner: {fileID: 0} 135 | m_BuildTargetIcons: 136 | - m_BuildTarget: 137 | m_Icons: 138 | - m_Icon: {fileID: 0} 139 | m_Size: 128 140 | m_BuildTargetBatching: [] 141 | m_BuildTargetGraphicsAPIs: 142 | - m_BuildTarget: AndroidPlayer 143 | m_APIs: 08000000 144 | m_Automatic: 0 145 | webPlayerTemplate: APPLICATION:Default 146 | m_TemplateCustomTags: {} 147 | actionOnDotNetUnhandledException: 1 148 | enableInternalProfiler: 0 149 | logObjCUncaughtExceptions: 1 150 | enableCrashReportAPI: 0 151 | locationUsageDescription: 152 | XboxTitleId: 153 | XboxImageXexPath: 154 | XboxSpaPath: 155 | XboxGenerateSpa: 0 156 | XboxDeployKinectResources: 0 157 | XboxSplashScreen: {fileID: 0} 158 | xboxEnableSpeech: 0 159 | xboxAdditionalTitleMemorySize: 0 160 | xboxDeployKinectHeadOrientation: 0 161 | xboxDeployKinectHeadPosition: 0 162 | ps3TitleConfigPath: 163 | ps3DLCConfigPath: 164 | ps3ThumbnailPath: 165 | ps3BackgroundPath: 166 | ps3SoundPath: 167 | ps3NPAgeRating: 12 168 | ps3TrophyCommId: 169 | ps3NpCommunicationPassphrase: 170 | ps3TrophyPackagePath: 171 | ps3BootCheckMaxSaveGameSizeKB: 128 172 | ps3TrophyCommSig: 173 | ps3SaveGameSlots: 1 174 | ps3TrialMode: 0 175 | ps3VideoMemoryForAudio: 0 176 | ps3EnableVerboseMemoryStats: 0 177 | ps3UseSPUForUmbra: 0 178 | ps3EnableMoveSupport: 1 179 | ps3DisableDolbyEncoding: 0 180 | ps4NPAgeRating: 12 181 | ps4NPTitleSecret: 182 | ps4NPTrophyPackPath: 183 | ps4ParentalLevel: 1 184 | ps4ContentID: ED1633-NPXX51362_00-0000000000000000 185 | ps4Category: 0 186 | ps4MasterVersion: 01.00 187 | ps4AppVersion: 01.00 188 | ps4AppType: 0 189 | ps4ParamSfxPath: 190 | ps4VideoOutPixelFormat: 0 191 | ps4VideoOutResolution: 4 192 | ps4PronunciationXMLPath: 193 | ps4PronunciationSIGPath: 194 | ps4BackgroundImagePath: 195 | ps4StartupImagePath: 196 | ps4SaveDataImagePath: 197 | ps4BGMPath: 198 | ps4ShareFilePath: 199 | ps4NPtitleDatPath: 200 | ps4RemotePlayKeyAssignment: -1 201 | ps4EnterButtonAssignment: 1 202 | ps4ApplicationParam1: 0 203 | ps4ApplicationParam2: 0 204 | ps4ApplicationParam3: 0 205 | ps4ApplicationParam4: 0 206 | ps4GarlicHeapSize: 2048 207 | ps4Passcode: frAQBc8Wsa1xVPfvJcrgRYwTiizs2trQ 208 | ps4pnSessions: 1 209 | ps4pnPresence: 1 210 | ps4pnFriends: 1 211 | ps4pnGameCustomData: 1 212 | playerPrefsSupport: 0 213 | monoEnv: 214 | psp2Splashimage: {fileID: 0} 215 | psp2NPTrophyPackPath: 216 | psp2NPSupportGBMorGJP: 0 217 | psp2NPAgeRating: 12 218 | psp2NPTitleDatPath: 219 | psp2NPCommsID: 220 | psp2NPCommunicationsID: 221 | psp2NPCommsPassphrase: 222 | psp2NPCommsSig: 223 | psp2ParamSfxPath: 224 | psp2ManualPath: 225 | psp2LiveAreaGatePath: 226 | psp2LiveAreaBackroundPath: 227 | psp2LiveAreaPath: 228 | psp2LiveAreaTrialPath: 229 | psp2PatchChangeInfoPath: 230 | psp2PatchOriginalPackage: 231 | psp2PackagePassword: F69AzBlax3CF3EDNhm3soLBPh71Yexui 232 | psp2KeystoneFile: 233 | psp2MemoryExpansionMode: 0 234 | psp2DRMType: 0 235 | psp2StorageType: 0 236 | psp2MediaCapacity: 0 237 | psp2DLCConfigPath: 238 | psp2ThumbnailPath: 239 | psp2BackgroundPath: 240 | psp2SoundPath: 241 | psp2TrophyCommId: 242 | psp2TrophyPackagePath: 243 | psp2PackagedResourcesPath: 244 | psp2SaveDataQuota: 10240 245 | psp2ParentalLevel: 1 246 | psp2ShortTitle: Not Set 247 | psp2ContentID: IV0000-ABCD12345_00-0123456789ABCDEF 248 | psp2Category: 0 249 | psp2MasterVersion: 01.00 250 | psp2AppVersion: 01.00 251 | psp2TVBootMode: 0 252 | psp2EnterButtonAssignment: 2 253 | psp2TVDisableEmu: 0 254 | psp2AllowTwitterDialog: 1 255 | psp2Upgradable: 0 256 | psp2HealthWarning: 0 257 | psp2UseLibLocation: 0 258 | psp2InfoBarOnStartup: 0 259 | psp2InfoBarColor: 0 260 | psmSplashimage: {fileID: 0} 261 | spritePackerPolicy: 262 | scriptingDefineSymbols: {} 263 | metroPackageName: Unity5Project 264 | metroPackageLogo: 265 | metroPackageLogo140: 266 | metroPackageLogo180: 267 | metroPackageLogo240: 268 | metroPackageVersion: 269 | metroCertificatePath: 270 | metroCertificatePassword: 271 | metroCertificateSubject: 272 | metroCertificateIssuer: 273 | metroCertificateNotAfter: 0000000000000000 274 | metroApplicationDescription: Unity5Project 275 | metroStoreTileLogo80: 276 | metroStoreTileLogo: 277 | metroStoreTileLogo140: 278 | metroStoreTileLogo180: 279 | metroStoreTileWideLogo80: 280 | metroStoreTileWideLogo: 281 | metroStoreTileWideLogo140: 282 | metroStoreTileWideLogo180: 283 | metroStoreTileSmallLogo80: 284 | metroStoreTileSmallLogo: 285 | metroStoreTileSmallLogo140: 286 | metroStoreTileSmallLogo180: 287 | metroStoreSmallTile80: 288 | metroStoreSmallTile: 289 | metroStoreSmallTile140: 290 | metroStoreSmallTile180: 291 | metroStoreLargeTile80: 292 | metroStoreLargeTile: 293 | metroStoreLargeTile140: 294 | metroStoreLargeTile180: 295 | metroStoreSplashScreenImage: 296 | metroStoreSplashScreenImage140: 297 | metroStoreSplashScreenImage180: 298 | metroPhoneAppIcon: 299 | metroPhoneAppIcon140: 300 | metroPhoneAppIcon240: 301 | metroPhoneSmallTile: 302 | metroPhoneSmallTile140: 303 | metroPhoneSmallTile240: 304 | metroPhoneMediumTile: 305 | metroPhoneMediumTile140: 306 | metroPhoneMediumTile240: 307 | metroPhoneWideTile: 308 | metroPhoneWideTile140: 309 | metroPhoneWideTile240: 310 | metroPhoneSplashScreenImage: 311 | metroPhoneSplashScreenImage140: 312 | metroPhoneSplashScreenImage240: 313 | metroTileShortName: 314 | metroCommandLineArgsFile: 315 | metroTileShowName: 0 316 | metroMediumTileShowName: 0 317 | metroLargeTileShowName: 0 318 | metroWideTileShowName: 0 319 | metroDefaultTileSize: 1 320 | metroTileForegroundText: 1 321 | metroTileBackgroundColor: {r: 0, g: 0, b: 0, a: 1} 322 | metroSplashScreenBackgroundColor: {r: 0, g: 0, b: 0, a: 1} 323 | metroSplashScreenUseBackgroundColor: 0 324 | platformCapabilities: {} 325 | metroFTAName: 326 | metroFTAFileTypes: [] 327 | metroProtocolName: 328 | metroCompilationOverrides: 1 329 | blackberryDeviceAddress: 330 | blackberryDevicePassword: 331 | blackberryTokenPath: 332 | blackberryTokenExires: 333 | blackberryTokenAuthor: 334 | blackberryTokenAuthorId: 335 | blackberryCskPassword: 336 | blackberrySaveLogPath: 337 | blackberrySharedPermissions: 0 338 | blackberryCameraPermissions: 0 339 | blackberryGPSPermissions: 0 340 | blackberryDeviceIDPermissions: 0 341 | blackberryMicrophonePermissions: 0 342 | blackberryGamepadSupport: 0 343 | blackberryBuildId: 0 344 | blackberryLandscapeSplashScreen: {fileID: 0} 345 | blackberryPortraitSplashScreen: {fileID: 0} 346 | blackberrySquareSplashScreen: {fileID: 0} 347 | tizenProductDescription: 348 | tizenProductURL: 349 | tizenSigningProfileName: 350 | tizenGPSPermissions: 0 351 | tizenMicrophonePermissions: 0 352 | stvDeviceAddress: 353 | stvProductDescription: 354 | stvProductAuthor: 355 | stvProductAuthorEmail: 356 | stvProductLink: 357 | stvProductCategory: 0 358 | XboxOneProductId: 359 | XboxOneUpdateKey: 360 | XboxOneSandboxId: 361 | XboxOneContentId: 362 | XboxOneTitleId: 363 | XboxOneSCId: 364 | XboxOneGameOsOverridePath: 365 | XboxOnePackagingOverridePath: 366 | XboxOneAppManifestOverridePath: 367 | XboxOnePackageEncryption: 0 368 | XboxOnePackageUpdateGranularity: 2 369 | XboxOneDescription: 370 | XboxOneIsContentPackage: 0 371 | XboxOneEnableGPUVariability: 0 372 | XboxOneSockets: {} 373 | XboxOneSplashScreen: {fileID: 0} 374 | XboxOneAllowedProductIds: [] 375 | XboxOnePersistentLocalStorageSize: 0 376 | intPropertyNames: 377 | - Metro::ScriptingBackend 378 | - WP8::ScriptingBackend 379 | - WebGL::ScriptingBackend 380 | - WebGL::audioCompressionFormat 381 | - WebGL::exceptionSupport 382 | - WebGL::memorySize 383 | - iOS::Architecture 384 | - iOS::ScriptingBackend 385 | Metro::ScriptingBackend: 2 386 | WP8::ScriptingBackend: 2 387 | WebGL::ScriptingBackend: 1 388 | WebGL::audioCompressionFormat: 4 389 | WebGL::exceptionSupport: 1 390 | WebGL::memorySize: 256 391 | iOS::Architecture: 2 392 | iOS::ScriptingBackend: 1 393 | boolPropertyNames: 394 | - WebGL::analyzeBuildSize 395 | - WebGL::dataCaching 396 | - WebGL::useEmbeddedResources 397 | WebGL::analyzeBuildSize: 0 398 | WebGL::dataCaching: 0 399 | WebGL::useEmbeddedResources: 0 400 | stringPropertyNames: 401 | - WebGL::emscriptenArgs 402 | - WebGL::template 403 | WebGL::emscriptenArgs: 404 | WebGL::template: APPLICATION:Default 405 | firstStreamedSceneWithResources: 0 406 | cloudProjectId: 407 | projectId: 408 | projectName: 409 | organizationId: 410 | cloudEnabled: 0 411 | -------------------------------------------------------------------------------- /src/Unity5Project/ProjectSettings/ProjectVersion.txt: -------------------------------------------------------------------------------- 1 | m_EditorVersion: 5.1.1f1 2 | m_StandardAssetsVersion: 0 3 | -------------------------------------------------------------------------------- /src/Unity5Project/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: 3 8 | m_QualitySettings: 9 | - serializedVersion: 2 10 | name: Fastest 11 | pixelLightCount: 0 12 | shadows: 0 13 | shadowResolution: 0 14 | shadowProjection: 1 15 | shadowCascades: 1 16 | shadowDistance: 15 17 | blendWeights: 1 18 | textureQuality: 1 19 | anisotropicTextures: 0 20 | antiAliasing: 0 21 | softParticles: 0 22 | softVegetation: 0 23 | vSyncCount: 0 24 | lodBias: .300000012 25 | maximumLODLevel: 0 26 | excludedTargetPlatforms: [] 27 | - serializedVersion: 2 28 | name: Fast 29 | pixelLightCount: 0 30 | shadows: 0 31 | shadowResolution: 0 32 | shadowProjection: 1 33 | shadowCascades: 1 34 | shadowDistance: 20 35 | blendWeights: 2 36 | textureQuality: 0 37 | anisotropicTextures: 0 38 | antiAliasing: 0 39 | softParticles: 0 40 | softVegetation: 0 41 | vSyncCount: 0 42 | lodBias: .400000006 43 | maximumLODLevel: 0 44 | excludedTargetPlatforms: [] 45 | - serializedVersion: 2 46 | name: Simple 47 | pixelLightCount: 1 48 | shadows: 1 49 | shadowResolution: 0 50 | shadowProjection: 1 51 | shadowCascades: 1 52 | shadowDistance: 15 53 | blendWeights: 2 54 | textureQuality: 0 55 | anisotropicTextures: 1 56 | antiAliasing: 0 57 | softParticles: 0 58 | softVegetation: 0 59 | vSyncCount: 0 60 | lodBias: .699999988 61 | maximumLODLevel: 0 62 | excludedTargetPlatforms: [] 63 | - serializedVersion: 2 64 | name: Good 65 | pixelLightCount: 2 66 | shadows: 2 67 | shadowResolution: 1 68 | shadowProjection: 1 69 | shadowCascades: 2 70 | shadowDistance: 20 71 | blendWeights: 2 72 | textureQuality: 0 73 | anisotropicTextures: 1 74 | antiAliasing: 0 75 | softParticles: 0 76 | softVegetation: 1 77 | vSyncCount: 1 78 | lodBias: 1 79 | maximumLODLevel: 0 80 | excludedTargetPlatforms: [] 81 | - serializedVersion: 2 82 | name: Beautiful 83 | pixelLightCount: 3 84 | shadows: 2 85 | shadowResolution: 2 86 | shadowProjection: 1 87 | shadowCascades: 2 88 | shadowDistance: 30 89 | blendWeights: 4 90 | textureQuality: 0 91 | anisotropicTextures: 2 92 | antiAliasing: 2 93 | softParticles: 1 94 | softVegetation: 1 95 | vSyncCount: 1 96 | lodBias: 1.5 97 | maximumLODLevel: 0 98 | excludedTargetPlatforms: [] 99 | - serializedVersion: 2 100 | name: Fantastic 101 | pixelLightCount: 4 102 | shadows: 2 103 | shadowResolution: 2 104 | shadowProjection: 1 105 | shadowCascades: 4 106 | shadowDistance: 100 107 | blendWeights: 4 108 | textureQuality: 0 109 | anisotropicTextures: 2 110 | antiAliasing: 2 111 | softParticles: 1 112 | softVegetation: 1 113 | vSyncCount: 1 114 | lodBias: 2 115 | maximumLODLevel: 0 116 | excludedTargetPlatforms: [] 117 | m_PerPlatformDefaultQuality: 118 | Android: 2 119 | FlashPlayer: 3 120 | GLES Emulation: 3 121 | PS3: 3 122 | Standalone: 3 123 | Web: 3 124 | Wii: 3 125 | XBOX360: 3 126 | iPhone: 2 127 | -------------------------------------------------------------------------------- /src/Unity5Project/ProjectSettings/TagManager.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!78 &1 4 | TagManager: 5 | tags: 6 | - 7 | Builtin Layer 0: Default 8 | Builtin Layer 1: TransparentFX 9 | Builtin Layer 2: Ignore Raycast 10 | Builtin Layer 3: 11 | Builtin Layer 4: Water 12 | Builtin Layer 5: 13 | Builtin Layer 6: 14 | Builtin Layer 7: 15 | User Layer 8: 16 | User Layer 9: 17 | User Layer 10: 18 | User Layer 11: 19 | User Layer 12: 20 | User Layer 13: 21 | User Layer 14: 22 | User Layer 15: 23 | User Layer 16: 24 | User Layer 17: 25 | User Layer 18: 26 | User Layer 19: 27 | User Layer 20: 28 | User Layer 21: 29 | User Layer 22: 30 | User Layer 23: 31 | User Layer 24: 32 | User Layer 25: 33 | User Layer 26: 34 | User Layer 27: 35 | User Layer 28: 36 | User Layer 29: 37 | User Layer 30: 38 | User Layer 31: 39 | -------------------------------------------------------------------------------- /src/Unity5Project/ProjectSettings/TimeManager.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!5 &1 4 | TimeManager: 5 | m_ObjectHideFlags: 0 6 | Fixed Timestep: .0199999996 7 | Maximum Allowed Timestep: .333333343 8 | m_TimeScale: 1 9 | --------------------------------------------------------------------------------