diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..3e682d6 --- /dev/null +++ b/.gitignore @@ -0,0 +1,72 @@ +# This .gitignore file should be placed at the root of your Unity project directory +# +# Get latest from https://github.com/github/gitignore/blob/main/Unity.gitignore +# +**/[Ll]ibrary/ +**/[Tt]emp/ +**/[Oo]bj/ +**/[Bb]uild/ +**/[Bb]uilds/ +**/[Ll]ogs/ +**/[Uu]ser[Ss]ettings/ + +# MemoryCaptures can get excessive in size. +# They also could contain extremely sensitive data +**/[Mm]emoryCaptures/ + +# Recordings can get excessive in size +**/[Rr]ecordings/ + +# Uncomment this line if you wish to ignore the asset store tools plugin +# /[Aa]ssets/AssetStoreTools* + +# Autogenerated Jetbrains Rider plugin +**/[Aa]ssets/Plugins/Editor/JetBrains* + +# Visual Studio cache directory +.vs/ + +# Gradle cache directory +.gradle/ + +# Autogenerated VS/MD/Consulo solution and project files +ExportedObj/ +.consulo/ +*.csproj +*.unityproj +*.sln +*.suo +*.tmp +*.user +*.userprefs +*.pidb +*.booproj +*.svd +*.pdb +*.mdb +*.opendb +*.VC.db + +# Unity3D generated meta files +*.pidb.meta +*.pdb.meta +*.mdb.meta + +# Unity3D generated file on crash reports +sysinfo.txt + +# Builds +*.apk +*.aab +*.unitypackage +*.app + +# Crashlytics generated file +crashlytics-build.properties + +# Packed Addressables +**/[Aa]ssets/[Aa]ddressable[Aa]ssets[Dd]ata/*/*.bin* + +# Temporary auto-generated Android Assets +**/[Aa]ssets/[Ss]treamingAssets/aa.meta +**/[Aa]ssets/[Ss]treamingAssets/aa/* diff --git a/Graphics/AsyncScreenshot/Assets/Plugins/iOS/ScreenshotCreator.mm b/Graphics/AsyncScreenshot/Assets/Plugins/iOS/ScreenshotCreator.mm index da9889b..3eb044e 100644 --- a/Graphics/AsyncScreenshot/Assets/Plugins/iOS/ScreenshotCreator.mm +++ b/Graphics/AsyncScreenshot/Assets/Plugins/iOS/ScreenshotCreator.mm @@ -1,6 +1,6 @@ #import "ScreenshotCreator.h" -#include "GlesHelper.h" +#include "UnityMetalSupport.h" #include "DisplayManager.h" static ScreenshotCreator* _Creator = nil; @@ -56,7 +56,8 @@ - (void)onFrameResolved bufferW = CVPixelBufferGetWidth(pixelBuf); bufferH = CVPixelBufferGetHeight(pixelBuf); bufferRowLen = CVPixelBufferGetBytesPerRow(pixelBuf); - bufferFlipped = CVOpenGLESTextureIsFlipped((CVOpenGLESTextureRef)mainDisplaySurface->cvTextureCacheTexture); + // note that for metal rows ordering is opposite to gl + bufferFlipped = !CVMetalTextureIsFlipped((CVMetalTextureRef)mainDisplaySurface->cvTextureCacheTexture); imageW = mainDisplaySurface->targetW; imageH = mainDisplaySurface->targetH; @@ -98,7 +99,7 @@ - (void)saveImage char* srcRow = imageBuffer; char* dstRow = finalImageData; - if (bufferFlipped) srcRow = imageBuffer + (bufferH - 1) * srcRowSize; + if (bufferFlipped) srcRow = imageBuffer + (bufferH - 1) * srcRowSize; else srcRow = imageBuffer; for (int i = 0; i < imageH; ++i, srcRow += srcRowNext, dstRow += dstRowSize) @@ -119,7 +120,7 @@ - (void)saveImage CGImageRef cgImage = CGImageCreate(imageW, imageH, 8, 32, 4 * imageW, cgColorSpace, kCGBitmapByteOrderDefault, cgProvider, 0, NO, kCGRenderingIntentDefault - ); + ); CGDataProviderRelease(cgProvider); CGColorSpaceRelease(cgColorSpace); diff --git a/Graphics/AsyncScreenshot/Assets/TestScreenshot.cs b/Graphics/AsyncScreenshot/Assets/TestScreenshot.cs index c048310..72ebd38 100644 --- a/Graphics/AsyncScreenshot/Assets/TestScreenshot.cs +++ b/Graphics/AsyncScreenshot/Assets/TestScreenshot.cs @@ -29,7 +29,7 @@ void OnGUI() savingScreenshot = true; CaptureScreenshot(ScreenshotCompleteCallback, "test.png"); #else - Application.CaptureScreenshot("test.png"); + ScreenCapture.CaptureScreenshot("test.png"); #endif } } diff --git a/Graphics/AsyncScreenshot/README.md b/Graphics/AsyncScreenshot/README.md index 30133c6..680f90a 100644 --- a/Graphics/AsyncScreenshot/README.md +++ b/Graphics/AsyncScreenshot/README.md @@ -8,7 +8,7 @@ This is a sample of usage of native **RenderPluginDelegate**. It will make scree ##Prerequisites -Unity: 4.3 +Unity: 2020 iOS: any diff --git a/Graphics/ExternalTexture/Assets/Editor.meta b/Graphics/ExternalTexture/Assets/Editor.meta new file mode 100644 index 0000000..ad68059 --- /dev/null +++ b/Graphics/ExternalTexture/Assets/Editor.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: bfa945941802e41b4b167df6c034196d +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Graphics/ExternalTexture/Assets/Editor/PostprocessBuild.cs b/Graphics/ExternalTexture/Assets/Editor/PostprocessBuild.cs new file mode 100644 index 0000000..5a32501 --- /dev/null +++ b/Graphics/ExternalTexture/Assets/Editor/PostprocessBuild.cs @@ -0,0 +1,29 @@ +using System.IO; +using UnityEditor; +using UnityEditor.Build; +using UnityEditor.Callbacks; +using UnityEditor.iOS.Xcode; + +public class PostprocessBuild +{ + [PostProcessBuild] + public static void OnPostprocessBuild(BuildTarget buildTarget, string path) + { + if (buildTarget == BuildTarget.iOS) + { + string projPath = path + "/Unity-iPhone.xcodeproj/project.pbxproj"; + + PBXProject proj = new PBXProject(); + proj.ReadFromString(File.ReadAllText(projPath)); + + string target = proj.GetUnityMainTargetGuid(); + string resSection = proj.GetResourcesBuildPhaseByTarget(target); + + proj.AddFileToBuildSection(target, resSection, proj.AddFile("Libraries/Soft.png","Libraries/Soft.png", PBXSourceTree.Source)); + proj.AddFileToBuildSection(target, resSection, proj.AddFile("Libraries/Test_Icon.png","Libraries/Test_Icon.png", PBXSourceTree.Source)); + proj.AddFileToBuildSection(target, resSection, proj.AddFile("Libraries/Test_UnityLogoLarge.png","Libraries/Test_UnityLogoLarge.png", PBXSourceTree.Source)); + + File.WriteAllText(projPath, proj.WriteToString()); + } + } +} diff --git a/Graphics/ExternalTexture/Assets/Editor/PostprocessBuild.cs.meta b/Graphics/ExternalTexture/Assets/Editor/PostprocessBuild.cs.meta new file mode 100644 index 0000000..748b7f7 --- /dev/null +++ b/Graphics/ExternalTexture/Assets/Editor/PostprocessBuild.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: d1fe8f1d04a8f4a42a9f52a49ef2383d +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Graphics/ExternalTexture/Assets/Plugins/iOS/NativeTexture.mm b/Graphics/ExternalTexture/Assets/Plugins/iOS/NativeTexture.mm index 0530d49..71ade7b 100644 --- a/Graphics/ExternalTexture/Assets/Plugins/iOS/NativeTexture.mm +++ b/Graphics/ExternalTexture/Assets/Plugins/iOS/NativeTexture.mm @@ -1,7 +1,4 @@ -#import -#import #import - #include "UnityMetalSupport.h" #include @@ -36,40 +33,8 @@ return textureData; } -static uintptr_t CreateGlesTexture(void* data, unsigned w, unsigned h) -{ - GLuint texture = 0; - glGenTextures(1, &texture); - - GLint curGLTex = 0; - glGetIntegerv(GL_TEXTURE_BINDING_2D, &curGLTex); - - glBindTexture(GL_TEXTURE_2D, texture); - glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR); - glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR); - glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_REPEAT); - glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_REPEAT); - glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA, w, h, 0, GL_RGBA, GL_UNSIGNED_BYTE, data); - - glBindTexture(GL_TEXTURE_2D, curGLTex); - - return texture; -} - -static void DestroyGlesTexture(uintptr_t tex) -{ - GLint curGLTex = 0; - glGetIntegerv(GL_TEXTURE_BINDING_2D, &curGLTex); - - GLuint glTex = tex; - glDeleteTextures(1, &glTex); - - glBindTexture(GL_TEXTURE_2D, curGLTex); -} - static uintptr_t CreateMetalTexture(void* data, unsigned w, unsigned h) { -#if defined(__IPHONE_8_0) && !TARGET_IPHONE_SIMULATOR Class MTLTextureDescriptorClass = [UnityGetMetalBundle() classNamed: @"MTLTextureDescriptor"]; MTLTextureDescriptor* texDesc = @@ -81,9 +46,6 @@ static uintptr_t CreateMetalTexture(void* data, unsigned w, unsigned h) [tex replaceRegion: r mipmapLevel: 0 withBytes: data bytesPerRow: w * 4]; return (uintptr_t)(__bridge_retained void*)tex; -#else - return 0; -#endif } static void DestroyMetalTexture(uintptr_t tex) @@ -100,8 +62,6 @@ static void DestroyMetalTexture(uintptr_t tex) uintptr_t ret = 0; if (UnitySelectedRenderingAPI() == apiMetal) ret = CreateMetalTexture(textureData, image.size.width, image.size.height); - else - ret = CreateGlesTexture(textureData, image.size.width, image.size.height); ::free(textureData); return ret; @@ -111,6 +71,4 @@ static void DestroyMetalTexture(uintptr_t tex) { if (UnitySelectedRenderingAPI() == apiMetal) DestroyMetalTexture(tex); - else - DestroyGlesTexture(tex); } diff --git a/Graphics/ExternalTexture/Assets/Plugins/iOS/NativeTexture.mm.meta b/Graphics/ExternalTexture/Assets/Plugins/iOS/NativeTexture.mm.meta index 27e2e39..c17df86 100644 --- a/Graphics/ExternalTexture/Assets/Plugins/iOS/NativeTexture.mm.meta +++ b/Graphics/ExternalTexture/Assets/Plugins/iOS/NativeTexture.mm.meta @@ -1,4 +1,33 @@ fileFormatVersion: 2 guid: 25b8e0ad8f1b14944b9e35681a660745 -DefaultImporter: +PluginImporter: + externalObjects: {} + serializedVersion: 2 + iconMap: {} + executionOrder: {} + defineConstraints: [] + isPreloaded: 0 + isOverridable: 0 + isExplicitlyReferenced: 0 + validateReferences: 1 + platformData: + - first: + Any: + second: + enabled: 0 + settings: {} + - first: + Editor: Editor + second: + enabled: 0 + settings: + DefaultValueInitialized: true + - first: + iPhone: iOS + second: + enabled: 1 + settings: + AddToEmbeddedBinaries: false userData: + assetBundleName: + assetBundleVariant: diff --git a/Graphics/ExternalTexture/Assets/TestNativeTexture.cs b/Graphics/ExternalTexture/Assets/TestNativeTexture.cs index 12e2777..6674e47 100644 --- a/Graphics/ExternalTexture/Assets/TestNativeTexture.cs +++ b/Graphics/ExternalTexture/Assets/TestNativeTexture.cs @@ -38,16 +38,22 @@ void LoadTexture() curTexIndex = (curTexIndex + 1) % externalTexture.Length; curTex = CreateNativeTexture(externalTexture[curTexIndex]); - testTex.UpdateExternalTexture(curTex); + if(testTex == null) + { + testTex = Texture2D.CreateExternalTexture(128, 128, TextureFormat.ARGB32, false, false, curTex); + target.material.mainTexture = testTex; + } + else + { + testTex.UpdateExternalTexture(curTex); + } + if (texToDestroy != System.IntPtr.Zero) DestroyNativeTexture(texToDestroy); } void Start() { - testTex = Texture2D.CreateExternalTexture(128, 128, TextureFormat.ARGB32, false, false, System.IntPtr.Zero); - target.material.mainTexture = testTex; - curTexIndex = -1; curTex = System.IntPtr.Zero; LoadTexture(); diff --git a/Graphics/ExternalTexture/ProjectSettings/GraphicsSettings.asset b/Graphics/ExternalTexture/ProjectSettings/GraphicsSettings.asset index 27b98bf..ce70b72 100644 Binary files a/Graphics/ExternalTexture/ProjectSettings/GraphicsSettings.asset and b/Graphics/ExternalTexture/ProjectSettings/GraphicsSettings.asset differ diff --git a/Graphics/ExternalTexture/ProjectSettings/ProjectSettings.asset b/Graphics/ExternalTexture/ProjectSettings/ProjectSettings.asset index 274072e..5ac3348 100644 Binary files a/Graphics/ExternalTexture/ProjectSettings/ProjectSettings.asset and b/Graphics/ExternalTexture/ProjectSettings/ProjectSettings.asset differ diff --git a/Graphics/ExternalTexture/README.md b/Graphics/ExternalTexture/README.md index 1e122f0..c9fb27b 100644 --- a/Graphics/ExternalTexture/README.md +++ b/Graphics/ExternalTexture/README.md @@ -3,43 +3,40 @@ ## Description -This is a sample of usage of **Texture2D.CreateExternalTexture** and **Texture2D.UpdateExternalTexture**. It will load png into gles texture in native plugin and give it back to Unity to be used like normal Unity Texture. +This is a sample of usage of **Texture2D.CreateExternalTexture** and **Texture2D.UpdateExternalTexture**. It will load png into metal texture in native plugin and give it back to Unity to be used like normal Unity Texture. ##Prerequisites -Unity: 4.2 +Unity: 2022 -iOS: any +iOS: iOS 13+ ## How does it work -There are two pieces of interest: TestGLESTexture.cs and Plugins/iOS/GlesTexture.mm. +There are two pieces of interest: TestNativeTexture.cs and Plugins/iOS/NativeTexture.mm. -In Plugins/iOS folder you can see three files: GlesTexture.mm (native plugin) and two images that we will use: Test_UnityLogoLarge.png and Test_Icon.png. All of them will be copied to your project, so we can load png from App Bundle. +In Plugins/iOS folder you can see three files: NativeTexture.mm (native plugin) and images that we will use. All the will be copied to your project, so we can load png from App Bundle. -GlesTexture.mm contains just one function: +NativeTexture.mm contains just two functions: one for creating texture and the other one for destroying it. The only interesting place is texture creation extern "C" void* GLESTexture_CreateTexture(const char* image_filename, int* w, int* h) -It will load png image from App Bundle to UIImage and pass this data to OpenGL ES: +It will load png image from App Bundle to UIImage and pass this data to Metal: - glBindTexture(GL_TEXTURE_2D, texture); - glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR); - glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR); - glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_REPEAT); - glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_REPEAT); + MTLTextureDescriptor* texDesc = + [MTLTextureDescriptorClass texture2DDescriptorWithPixelFormat: MTLPixelFormatRGBA8Unorm width: w height: h mipmapped: NO]; - glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA, imageW, imageH, 0, GL_RGBA, GL_UNSIGNED_BYTE, textureData); + id tex = [UnityGetMetalDevice() newTextureWithDescriptor: texDesc]; -The returned texture id is later used in TestGLESTexture.cs to create Unity Texture2D from it: + MTLRegion r = MTLRegionMake3D(0, 0, 0, w, h, 1); + [tex replaceRegion: r mipmapLevel: 0 withBytes: data bytesPerRow: w * 4]; - testTex = Texture2D.CreateExternalTexture(externalTexture[0].w, externalTexture[0].h, TextureFormat.ARGB32, false, false, externalTexture[0].tex); - tex.filterMode = FilterMode.Bilinear; - tex.wrapMode = TextureWrapMode.Repeat; +The returned texture id is later used in TestNativeTexture.cs to create Unity Texture2D from it: -Please note, that we made sure that texture settings (wrap mode and filtering) do match. + testTex = Texture2D.CreateExternalTexture(128, 128, TextureFormat.ARGB32, false, false, curTex); + target.material.mainTexture = testTex; When you press "Show Next" button it will cycle through loaded textures and reuse Texture object to point to different gles texture. Please note, that both textures have exact same setup: same extensions, format etc. diff --git a/Graphics/MetalNativeRenderingPlugin/Assets/Plugins/iOS/MetalPlugin.m b/Graphics/MetalNativeRenderingPlugin/Assets/Plugins/iOS/MetalPlugin.m index c287701..f9dce30 100644 --- a/Graphics/MetalNativeRenderingPlugin/Assets/Plugins/iOS/MetalPlugin.m +++ b/Graphics/MetalNativeRenderingPlugin/Assets/Plugins/iOS/MetalPlugin.m @@ -11,9 +11,7 @@ static IUnityInterfaces* g_UnityInterfaces = 0; static IUnityGraphics* g_Graphics = 0; -// NB finally in 2017.4 we switched to versioned metal plugin interface -// NB old unversioned interface will be still provided for some time for backwards compatibility -static IUnityGraphicsMetalV1* g_MetalGraphics = 0; +static IUnityGraphicsMetalV2* g_MetalGraphics = 0; // plugin assets @@ -60,7 +58,7 @@ static void CreatePluginAssets() { id lib = [device newLibraryWithSource:shaderStr options:nil error:nil]; g_VProg = [lib newFunctionWithName:@"vprog"]; - g_FShaderColor = [lib newFunctionWithName:@"fshader_color"], g_FShaderTexture = [lib newFunctionWithName:@"fshader_tex"]; + g_FShaderColor = [lib newFunctionWithName:@"fshader_color"]; g_FShaderTexture = [lib newFunctionWithName:@"fshader_tex"]; // pos.x pos.y uv.x uv.y const float vdata[] = { @@ -90,15 +88,18 @@ static void CreatePluginAssets() { // to simplify our lives: we will use similar setup for both "color rect" and "texture" draw calls // the only reason we cannot pre-alloc them is that we want to handle changing RT transparently -static id CreateCommonRenderPipeline(id fs, MTLPixelFormat format, int sampleCount) { +static id CreateCommonRenderPipeline(id fs, MTLPixelFormat colorFormat, MTLPixelFormat depthFormat, MTLPixelFormat stencilFormat, int sampleCount) { id device = g_MetalGraphics->MetalDevice(); NSBundle* mtlBundle = g_MetalGraphics->MetalBundle(); MTLRenderPipelineDescriptor* pipeDesc = [[mtlBundle classNamed:@"MTLRenderPipelineDescriptor"] new]; MTLRenderPipelineColorAttachmentDescriptor* colorDesc = [[mtlBundle classNamed:@"MTLRenderPipelineColorAttachmentDescriptor"] new]; - colorDesc.pixelFormat = format; + colorDesc.pixelFormat = colorFormat; pipeDesc.colorAttachments[0] = colorDesc; + pipeDesc.depthAttachmentPixelFormat = depthFormat; + pipeDesc.stencilAttachmentPixelFormat = stencilFormat; + pipeDesc.fragmentFunction = fs; pipeDesc.vertexFunction = g_VProg; pipeDesc.vertexDescriptor = g_VertexDesc; @@ -115,12 +116,18 @@ static void CreatePluginAssets() { static void DoExtraDrawCall() { // get current render pass setup - id rt = g_MetalGraphics->CurrentRenderPassDescriptor().colorAttachments[0].texture; + MTLRenderPassDescriptor* curDesc = g_MetalGraphics->CurrentRenderPassDescriptor(); + + id rtColor = curDesc.colorAttachments[0].texture; + id rtDepth = curDesc.depthAttachment.texture; + id rtStencil = curDesc.stencilAttachment.texture; - if(rt.pixelFormat != g_ExtraDrawCallPixelFormat || rt.sampleCount != g_ExtraDrawCallSampleCount) { + if(rtColor.pixelFormat != g_ExtraDrawCallPixelFormat || rtColor.sampleCount != g_ExtraDrawCallSampleCount) { // RT format changed - recreate render pipeline - g_ExtraDrawCallPixelFormat = rt.pixelFormat, g_ExtraDrawCallSampleCount = (int)rt.sampleCount; - g_ExtraDrawCallPipe = CreateCommonRenderPipeline(g_FShaderColor, g_ExtraDrawCallPixelFormat, g_ExtraDrawCallSampleCount); + // we silently assume that depth/stencil format does not change + // even though we dont need it we need to set it up as otherwise validation will whine + g_ExtraDrawCallPixelFormat = rtColor.pixelFormat; g_ExtraDrawCallSampleCount = (int)rtColor.sampleCount; + g_ExtraDrawCallPipe = CreateCommonRenderPipeline(g_FShaderColor, g_ExtraDrawCallPixelFormat, rtDepth.pixelFormat, rtStencil.pixelFormat, g_ExtraDrawCallSampleCount); } // get current command encoder, update render setup and do extra draw call @@ -135,7 +142,7 @@ static void DoExtraDrawCall() { static UnityRenderBuffer g_CopySrcRB = 0, g_CopyDstRB = 0; UNITY_INTERFACE_EXPORT UNITY_INTERFACE_API void SetRTCopyTargets(void* src, void* dst) { - g_CopySrcRB = src, g_CopyDstRB = dst; + g_CopySrcRB = src; g_CopyDstRB = dst; } // we need to take special care about what "texture" do we use @@ -184,7 +191,7 @@ static void DoCaptureRT() { // prepare render pass MTLRenderPassColorAttachmentDescriptor* att = [[mtlBundle classNamed: @"MTLRenderPassColorAttachmentDescriptor"] new]; // NB we assume AA was already resolved, so we dont care - att.texture = dst; att.loadAction = MTLLoadActionLoad, att.storeAction = MTLStoreActionStore; + att.texture = dst; att.loadAction = MTLLoadActionLoad; att.storeAction = MTLStoreActionStore; MTLRenderPassDescriptor* desc = [[mtlBundle classNamed: @"MTLRenderPassDescriptor"] new]; desc.colorAttachments[0] = att; @@ -192,12 +199,18 @@ static void DoCaptureRT() { // prepare render pipeline if(dst.pixelFormat != g_RTCopyPixelFormat || dst.sampleCount != g_RTCopySampleCount) { // RT format changed - recreate render pipeline - g_RTCopyPixelFormat = dst.pixelFormat, g_RTCopySampleCount = (int)dst.sampleCount; - g_RTCopyPipe = CreateCommonRenderPipeline(g_FShaderTexture, g_RTCopyPixelFormat, g_RTCopySampleCount); + g_RTCopyPixelFormat = dst.pixelFormat; g_RTCopySampleCount = (int)dst.sampleCount; + g_RTCopyPipe = CreateCommonRenderPipeline(g_FShaderTexture, g_RTCopyPixelFormat, MTLPixelFormatInvalid, MTLPixelFormatInvalid, g_RTCopySampleCount); } + // note that this is just an example of how to create your own command buffer, properly commiting unity's one + // this is absolutely not needed here, and was added just for the illustration purposes + [g_MetalGraphics->CommitCurrentCommandBuffer() waitUntilScheduled]; + id cb = [g_MetalGraphics->CommandQueue() commandBuffer]; + cb.label = @"Dummy Test CB"; + // render - id cmd = [g_MetalGraphics->CurrentCommandBuffer() renderCommandEncoderWithDescriptor:desc]; + id cmd = [cb renderCommandEncoderWithDescriptor:desc]; [cmd setRenderPipelineState:g_RTCopyPipe]; [cmd setCullMode:MTLCullModeNone]; [cmd setVertexBuffer:g_VB offset:0 atIndex:0]; @@ -205,6 +218,9 @@ static void DoCaptureRT() { [cmd drawIndexedPrimitives:MTLPrimitiveTypeTriangle indexCount:6 indexType:MTLIndexTypeUInt16 indexBuffer:g_IB indexBufferOffset:0]; [cmd endEncoding]; cmd = nil; + + [cb commit]; + cb = nil; } @@ -243,7 +259,7 @@ UnityRenderingEvent UNITY_INTERFACE_EXPORT UNITY_INTERFACE_API GetRenderEventFun void UNITY_INTERFACE_EXPORT UNITY_INTERFACE_API UnityPluginLoad(IUnityInterfaces* unityInterfaces) { g_UnityInterfaces = unityInterfaces; g_Graphics = UNITY_GET_INTERFACE(g_UnityInterfaces, IUnityGraphics); - g_MetalGraphics = UNITY_GET_INTERFACE(g_UnityInterfaces, IUnityGraphicsMetalV1); + g_MetalGraphics = UNITY_GET_INTERFACE(g_UnityInterfaces, IUnityGraphicsMetalV2); // we get plugin load after initial graphics init, so do callback manually g_Graphics->RegisterDeviceEventCallback(OnGraphicsDeviceEvent); diff --git a/NativeIntegration/BackgroundTasks/BackgroundFetch/Assets/BackgroundFetch.cs b/NativeIntegration/BackgroundTasks/BackgroundFetch/Assets/BackgroundFetch.cs index 7f1c5b8..325e8ac 100644 --- a/NativeIntegration/BackgroundTasks/BackgroundFetch/Assets/BackgroundFetch.cs +++ b/NativeIntegration/BackgroundTasks/BackgroundFetch/Assets/BackgroundFetch.cs @@ -20,13 +20,10 @@ void Update() { fetchedText = QueryFetchedText(); if (fetchedText != null) + { Debug.Log("Just Fetched: " + fetchedText); + text.text = fetchedText; + } } } - - void OnGUI() - { - if (fetchedText != null) - text.text = fetchedText; - } } diff --git a/NativeIntegration/BackgroundTasks/BackgroundFetch/Assets/BackgroundFetch.unity b/NativeIntegration/BackgroundTasks/BackgroundFetch/Assets/BackgroundFetch.unity index 06d4c32..adce9d0 100644 --- a/NativeIntegration/BackgroundTasks/BackgroundFetch/Assets/BackgroundFetch.unity +++ b/NativeIntegration/BackgroundTasks/BackgroundFetch/Assets/BackgroundFetch.unity @@ -1,32 +1,33 @@ %YAML 1.1 %TAG !u! tag:unity3d.com,2011: --- !u!29 &1 -SceneSettings: +OcclusionCullingSettings: m_ObjectHideFlags: 0 - m_PVSData: - m_PVSObjectsArray: [] - m_PVSPortalsArray: [] + serializedVersion: 2 m_OcclusionBakeSettings: smallestOccluder: 5 - smallestHole: .25 + smallestHole: 0.25 backfaceThreshold: 100 + m_SceneGUID: 00000000000000000000000000000000 + m_OcclusionCullingData: {fileID: 0} --- !u!104 &2 RenderSettings: m_ObjectHideFlags: 0 - serializedVersion: 6 + serializedVersion: 9 m_Fog: 0 - m_FogColor: {r: .5, g: .5, b: .5, a: 1} + m_FogColor: {r: 0.5, g: 0.5, b: 0.5, a: 1} m_FogMode: 3 - m_FogDensity: .00999999978 + m_FogDensity: 0.01 m_LinearFogStart: 0 m_LinearFogEnd: 300 - m_AmbientSkyColor: {r: .211999997, g: .226999998, b: .259000003, a: 1} - m_AmbientEquatorColor: {r: .114, g: .125, b: .133000001, a: 1} - m_AmbientGroundColor: {r: .0469999984, g: .0430000015, b: .0350000001, a: 1} + m_AmbientSkyColor: {r: 0.212, g: 0.227, b: 0.259, a: 1} + m_AmbientEquatorColor: {r: 0.114, g: 0.125, b: 0.133, a: 1} + m_AmbientGroundColor: {r: 0.047, g: 0.043, b: 0.035, a: 1} m_AmbientIntensity: 1 m_AmbientMode: 1 + m_SubtractiveShadowColor: {r: 0.42, g: 0.478, b: 0.627, a: 1} m_SkyboxMaterial: {fileID: 0} - m_HaloStrength: .5 + m_HaloStrength: 0.5 m_FlareStrength: 1 m_FlareFadeSpeed: 3 m_HaloTexture: {fileID: 0} @@ -37,66 +38,102 @@ RenderSettings: m_ReflectionIntensity: 1 m_CustomReflection: {fileID: 0} m_Sun: {fileID: 0} ---- !u!127 &3 -LevelGameManager: - m_ObjectHideFlags: 0 + m_IndirectSpecularColor: {r: 0, g: 0, b: 0, a: 1} + m_UseRadianceAmbientProbe: 0 --- !u!157 &4 LightmapSettings: m_ObjectHideFlags: 0 - serializedVersion: 5 + serializedVersion: 12 m_GIWorkflowMode: 1 - m_LightmapsMode: 1 m_GISettings: serializedVersion: 2 m_BounceScale: 1 m_IndirectOutputScale: 1 m_AlbedoBoost: 1 - m_TemporalCoherenceThreshold: 1 m_EnvironmentLightingMode: 0 m_EnableBakedLightmaps: 1 m_EnableRealtimeLightmaps: 0 m_LightmapEditorSettings: - serializedVersion: 3 + serializedVersion: 12 m_Resolution: 1 m_BakeResolution: 50 - m_TextureWidth: 1024 - m_TextureHeight: 1024 + m_AtlasSize: 1024 + m_AO: 0 m_AOMaxDistance: 1 - m_Padding: 2 m_CompAOExponent: 0 + m_CompAOExponentDirect: 0 + m_ExtractAmbientOcclusion: 0 + m_Padding: 2 m_LightmapParameters: {fileID: 0} + m_LightmapsBakeMode: 1 m_TextureCompression: 0 m_FinalGather: 0 + m_FinalGatherFiltering: 1 m_FinalGatherRayCount: 1024 - m_LightmapSnapshot: {fileID: 0} - m_RuntimeCPUUsage: 25 + m_ReflectionCompression: 2 + m_MixedBakeMode: 1 + m_BakeBackend: 0 + m_PVRSampling: 1 + m_PVRDirectSampleCount: 32 + m_PVRSampleCount: 512 + m_PVRBounces: 2 + m_PVREnvironmentSampleCount: 512 + m_PVREnvironmentReferencePointCount: 2048 + m_PVRFilteringMode: 0 + m_PVRDenoiserTypeDirect: 0 + m_PVRDenoiserTypeIndirect: 0 + m_PVRDenoiserTypeAO: 0 + m_PVRFilterTypeDirect: 0 + m_PVRFilterTypeIndirect: 0 + m_PVRFilterTypeAO: 0 + m_PVREnvironmentMIS: 0 + m_PVRCulling: 1 + m_PVRFilteringGaussRadiusDirect: 1 + m_PVRFilteringGaussRadiusIndirect: 5 + m_PVRFilteringGaussRadiusAO: 2 + m_PVRFilteringAtrousPositionSigmaDirect: 0.5 + m_PVRFilteringAtrousPositionSigmaIndirect: 2 + m_PVRFilteringAtrousPositionSigmaAO: 1 + m_ExportTrainingData: 0 + m_TrainingDataDestination: TrainingData + m_LightProbeSampleCountMultiplier: 4 + m_LightingDataAsset: {fileID: 0} + m_LightingSettings: {fileID: 1227555799} --- !u!196 &5 NavMeshSettings: serializedVersion: 2 m_ObjectHideFlags: 0 m_BuildSettings: - serializedVersion: 2 - agentRadius: .5 + serializedVersion: 3 + agentTypeID: 0 + agentRadius: 0.5 agentHeight: 2 agentSlope: 45 - agentClimb: .400000006 + agentClimb: 0.4 ledgeDropHeight: 0 maxJumpAcrossDistance: 0 - accuratePlacement: 0 minRegionArea: 2 - cellSize: .166666672 manualCellSize: 0 + cellSize: 0.16666667 + manualTileSize: 0 + tileSize: 256 + buildHeightMesh: 0 + maxJobWorkers: 0 + preserveTilesOutsideBounds: 0 + debug: + m_Flags: 0 m_NavMeshData: {fileID: 0} --- !u!1 &125920478 GameObject: m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} - serializedVersion: 4 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 m_Component: - - 4: {fileID: 125920481} - - 23: {fileID: 125920480} - - 102: {fileID: 125920479} + - component: {fileID: 125920481} + - component: {fileID: 125920480} + - component: {fileID: 125920479} m_Layer: 0 m_Name: Text m_TagString: Untagged @@ -108,8 +145,9 @@ GameObject: TextMesh: serializedVersion: 3 m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 125920478} m_Text: Unknown m_OffsetZ: 0 @@ -128,52 +166,136 @@ TextMesh: --- !u!23 &125920480 MeshRenderer: m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 125920478} m_Enabled: 1 m_CastShadows: 0 m_ReceiveShadows: 0 + m_DynamicOccludee: 1 + m_StaticShadowCaster: 0 + m_MotionVectors: 1 + m_LightProbeUsage: 0 + m_ReflectionProbeUsage: 0 + m_RayTracingMode: 2 + m_RayTraceProcedural: 0 + m_RenderingLayerMask: 1 + m_RendererPriority: 0 m_Materials: - {fileID: 10100, guid: 0000000000000000e000000000000000, type: 0} - m_SubsetIndices: + m_StaticBatchInfo: + firstSubMesh: 0 + subMeshCount: 0 m_StaticBatchRoot: {fileID: 0} - m_UseLightProbes: 0 - m_ReflectionProbeUsage: 0 m_ProbeAnchor: {fileID: 0} + m_LightProbeVolumeOverride: {fileID: 0} m_ScaleInLightmap: 1 + m_ReceiveGI: 1 m_PreserveUVs: 0 + m_IgnoreNormalsForChartDetection: 0 m_ImportantGI: 0 - m_AutoUVMaxDistance: .5 + m_StitchLightmapSeams: 1 + m_SelectedEditorRenderState: 3 + m_MinimumChartSize: 4 + m_AutoUVMaxDistance: 0.5 m_AutoUVMaxAngle: 89 m_LightmapParameters: {fileID: 0} m_SortingLayerID: 0 + m_SortingLayer: 0 m_SortingOrder: 0 + m_AdditionalVertexStreams: {fileID: 0} --- !u!4 &125920481 Transform: m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 125920478} m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} - m_LocalPosition: {x: 0, y: 1, z: -8} - m_LocalScale: {x: .300000012, y: .300000012, z: .300000012} + m_LocalPosition: {x: 0, y: 1, z: -9} + m_LocalScale: {x: 0.1, y: 0.1, z: 0.1} + m_ConstrainProportionsScale: 0 m_Children: [] m_Father: {fileID: 0} m_RootOrder: 1 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!850595691 &1227555799 +LightingSettings: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_Name: Settings.lighting + serializedVersion: 6 + m_GIWorkflowMode: 1 + m_EnableBakedLightmaps: 1 + m_EnableRealtimeLightmaps: 0 + m_RealtimeEnvironmentLighting: 1 + m_BounceScale: 1 + m_AlbedoBoost: 1 + m_IndirectOutputScale: 1 + m_UsingShadowmask: 0 + m_BakeBackend: 0 + m_LightmapMaxSize: 1024 + m_BakeResolution: 50 + m_Padding: 2 + m_LightmapCompression: 0 + m_AO: 0 + m_AOMaxDistance: 1 + m_CompAOExponent: 0 + m_CompAOExponentDirect: 0 + m_ExtractAO: 0 + m_MixedBakeMode: 1 + m_LightmapsBakeMode: 1 + m_FilterMode: 1 + m_LightmapParameters: {fileID: 15204, guid: 0000000000000000f000000000000000, type: 0} + m_ExportTrainingData: 0 + m_TrainingDataDestination: TrainingData + m_RealtimeResolution: 1 + m_ForceWhiteAlbedo: 0 + m_ForceUpdates: 0 + m_FinalGather: 0 + m_FinalGatherRayCount: 1024 + m_FinalGatherFiltering: 1 + m_PVRCulling: 1 + m_PVRSampling: 1 + m_PVRDirectSampleCount: 32 + m_PVRSampleCount: 512 + m_PVREnvironmentSampleCount: 512 + m_PVREnvironmentReferencePointCount: 2048 + m_LightProbeSampleCountMultiplier: 4 + m_PVRBounces: 2 + m_PVRMinBounces: 2 + m_PVREnvironmentImportanceSampling: 0 + m_PVRFilteringMode: 0 + m_PVRDenoiserTypeDirect: 0 + m_PVRDenoiserTypeIndirect: 0 + m_PVRDenoiserTypeAO: 0 + m_PVRFilterTypeDirect: 0 + m_PVRFilterTypeIndirect: 0 + m_PVRFilterTypeAO: 0 + m_PVRFilteringGaussRadiusDirect: 1 + m_PVRFilteringGaussRadiusIndirect: 5 + m_PVRFilteringGaussRadiusAO: 2 + m_PVRFilteringAtrousPositionSigmaDirect: 0.5 + m_PVRFilteringAtrousPositionSigmaIndirect: 2 + m_PVRFilteringAtrousPositionSigmaAO: 1 + m_PVRTiledBaking: 0 + m_NumRaysToShootPerTexel: -1 --- !u!1 &1236988171 GameObject: m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} - serializedVersion: 4 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 m_Component: - - 4: {fileID: 1236988176} - - 20: {fileID: 1236988175} - - 92: {fileID: 1236988174} - - 124: {fileID: 1236988173} - - 81: {fileID: 1236988172} - - 114: {fileID: 1236988177} + - component: {fileID: 1236988176} + - component: {fileID: 1236988175} + - component: {fileID: 1236988173} + - component: {fileID: 1236988172} + - component: {fileID: 1236988177} m_Layer: 0 m_Name: Main Camera m_TagString: MainCamera @@ -184,41 +306,51 @@ GameObject: --- !u!81 &1236988172 AudioListener: m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 1236988171} m_Enabled: 1 --- !u!124 &1236988173 Behaviour: m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} - m_GameObject: {fileID: 1236988171} - m_Enabled: 1 ---- !u!92 &1236988174 -Behaviour: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 1236988171} m_Enabled: 1 --- !u!20 &1236988175 Camera: m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 1236988171} m_Enabled: 1 serializedVersion: 2 m_ClearFlags: 1 - m_BackGroundColor: {r: .192156866, g: .301960796, b: .474509805, a: .0196078438} + m_BackGroundColor: {r: 0.19215687, g: 0.3019608, b: 0.4745098, a: 0.019607844} + m_projectionMatrixMode: 1 + m_GateFitMode: 2 + m_FOVAxisMode: 0 + m_Iso: 200 + m_ShutterSpeed: 0.005 + m_Aperture: 16 + m_FocusDistance: 10 + m_FocalLength: 50 + m_BladeCount: 5 + m_Curvature: {x: 2, y: 11} + m_BarrelClipping: 0.25 + m_Anamorphism: 0 + m_SensorSize: {x: 36, y: 24} + m_LensShift: {x: 0, y: 0} m_NormalizedViewPortRect: serializedVersion: 2 x: 0 y: 0 width: 1 height: 1 - near clip plane: .300000012 + near clip plane: 0.3 far clip plane: 1000 field of view: 60 orthographic: 0 @@ -230,28 +362,35 @@ Camera: m_RenderingPath: -1 m_TargetTexture: {fileID: 0} m_TargetDisplay: 0 + m_TargetEye: 3 m_HDR: 0 + m_AllowMSAA: 1 + m_AllowDynamicResolution: 0 + m_ForceIntoRT: 0 m_OcclusionCulling: 1 m_StereoConvergence: 10 - m_StereoSeparation: .0219999999 - m_StereoMirrorMode: 0 + m_StereoSeparation: 0.022 --- !u!4 &1236988176 Transform: m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 1236988171} m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} m_LocalPosition: {x: 0, y: 1, z: -10} m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 m_Children: [] m_Father: {fileID: 0} m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} --- !u!114 &1236988177 MonoBehaviour: m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 1236988171} m_Enabled: 1 m_EditorHideFlags: 0 diff --git a/NativeIntegration/BackgroundTasks/BackgroundFetch/Assets/BackgroundFetch.unity.meta b/NativeIntegration/BackgroundTasks/BackgroundFetch/Assets/BackgroundFetch.unity.meta index 7df05e0..61823b2 100644 --- a/NativeIntegration/BackgroundTasks/BackgroundFetch/Assets/BackgroundFetch.unity.meta +++ b/NativeIntegration/BackgroundTasks/BackgroundFetch/Assets/BackgroundFetch.unity.meta @@ -1,6 +1,7 @@ fileFormatVersion: 2 guid: 0f5b62f77d553436b839a5b4fb564a19 DefaultImporter: + externalObjects: {} userData: assetBundleName: assetBundleVariant: diff --git a/NativeIntegration/BackgroundTasks/BackgroundFetch/Assets/Plugins/iOS/MyAppController.mm b/NativeIntegration/BackgroundTasks/BackgroundFetch/Assets/Plugins/iOS/MyAppController.mm index 4e1f88f..11a3c71 100644 --- a/NativeIntegration/BackgroundTasks/BackgroundFetch/Assets/Plugins/iOS/MyAppController.mm +++ b/NativeIntegration/BackgroundTasks/BackgroundFetch/Assets/Plugins/iOS/MyAppController.mm @@ -25,7 +25,7 @@ - (BOOL)application:(UIApplication*)application willFinishLaunchingWithOptions:( - (void)application:(UIApplication*)application performFetchWithCompletionHandler:(void (^)(UIBackgroundFetchResult))completionHandler { - NSURL* url = [NSURL URLWithString: @"http://unity3d.com"]; + NSURL* url = [NSURL URLWithString: @"https://unity.com"]; NSURLRequest* request = [NSURLRequest requestWithURL: url cachePolicy: NSURLRequestReloadIgnoringLocalCacheData timeoutInterval: 10.0]; NSData* data = [NSURLConnection sendSynchronousRequest: request returningResponse: nil error: nil]; NSString* text = [NSString stringWithUTF8String: (const char*)data.bytes]; diff --git a/NativeIntegration/BackgroundTasks/BackgroundFetch/Assets/Plugins/iOS/MyAppController.mm.meta b/NativeIntegration/BackgroundTasks/BackgroundFetch/Assets/Plugins/iOS/MyAppController.mm.meta index d118d44..4d78b54 100644 --- a/NativeIntegration/BackgroundTasks/BackgroundFetch/Assets/Plugins/iOS/MyAppController.mm.meta +++ b/NativeIntegration/BackgroundTasks/BackgroundFetch/Assets/Plugins/iOS/MyAppController.mm.meta @@ -1,5 +1,33 @@ fileFormatVersion: 2 guid: 356656511764c4c859451ec0f9ed873a -DefaultImporter: +PluginImporter: + externalObjects: {} + serializedVersion: 2 + iconMap: {} + executionOrder: {} + defineConstraints: [] + isPreloaded: 0 + isOverridable: 0 + isExplicitlyReferenced: 0 + validateReferences: 1 + platformData: + - first: + Any: + second: + enabled: 0 + settings: {} + - first: + Editor: Editor + second: + enabled: 0 + settings: + DefaultValueInitialized: true + - first: + iPhone: iOS + second: + enabled: 1 + settings: + AddToEmbeddedBinaries: false userData: assetBundleName: + assetBundleVariant: diff --git a/NativeIntegration/BackgroundTasks/BackgroundFetch/ProjectSettings/ProjectSettings.asset b/NativeIntegration/BackgroundTasks/BackgroundFetch/ProjectSettings/ProjectSettings.asset index af9080c..6bf7f4d 100644 --- a/NativeIntegration/BackgroundTasks/BackgroundFetch/ProjectSettings/ProjectSettings.asset +++ b/NativeIntegration/BackgroundTasks/BackgroundFetch/ProjectSettings/ProjectSettings.asset @@ -3,54 +3,94 @@ --- !u!129 &1 PlayerSettings: m_ObjectHideFlags: 0 - serializedVersion: 6 + serializedVersion: 24 + productGUID: e4fd3e742048646968dea9f619fbc3b1 AndroidProfiler: 0 - defaultScreenOrientation: 0 + AndroidFilterTouchesWhenObscured: 0 + AndroidEnableSustainedPerformanceMode: 0 + defaultScreenOrientation: 4 targetDevice: 2 - targetGlesGraphics: -1 - targetIOSGraphics: -1 - targetResolution: 0 + useOnDemandResources: 0 accelerometerFrequency: 60 companyName: DefaultCompany productName: BackgroundFetch - cloudProjectId: defaultCursor: {fileID: 0} cursorHotspot: {x: 0, y: 0} + m_SplashScreenBackgroundColor: {r: 0.12156863, g: 0.12156863, b: 0.1254902, a: 1} m_ShowUnitySplashScreen: 1 + m_ShowUnitySplashLogo: 1 + m_SplashScreenOverlayOpacity: 1 + m_SplashScreenAnimation: 1 + m_SplashScreenLogoStyle: 1 + m_SplashScreenDrawMode: 0 + m_SplashScreenBackgroundAnimationZoom: 1 + m_SplashScreenLogoAnimationZoom: 1 + m_SplashScreenBackgroundLandscapeAspect: 1 + m_SplashScreenBackgroundPortraitAspect: 1 + m_SplashScreenBackgroundLandscapeUvs: + serializedVersion: 2 + x: 0 + y: 0 + width: 1 + height: 1 + m_SplashScreenBackgroundPortraitUvs: + serializedVersion: 2 + x: 0 + y: 0 + width: 1 + height: 1 + m_SplashScreenLogos: [] + m_VirtualRealitySplashScreen: {fileID: 0} + m_HolographicTrackingLossScreen: {fileID: 0} defaultScreenWidth: 1024 defaultScreenHeight: 768 defaultScreenWidthWeb: 960 defaultScreenHeightWeb: 600 - m_RenderingPath: 1 - m_MobileRenderingPath: 1 + m_StereoRenderingPath: 0 m_ActiveColorSpace: 0 + m_SpriteBatchVertexThreshold: 300 m_MTRendering: 1 - m_MobileMTRendering: 0 - m_UseDX11: 1 - m_Stereoscopic3D: 0 + mipStripping: 0 + numberOfMipsStripped: 0 + m_StackTraceTypes: 010000000100000001000000010000000100000001000000 iosShowActivityIndicatorOnLoading: -1 androidShowActivityIndicatorOnLoading: -1 - iosAppInBackgroundBehavior: -1 - displayResolutionDialog: 1 + iosUseCustomAppBackgroundBehavior: 1 allowedAutorotateToPortrait: 1 allowedAutorotateToPortraitUpsideDown: 1 allowedAutorotateToLandscapeRight: 1 allowedAutorotateToLandscapeLeft: 1 useOSAutorotation: 1 use32BitDisplayBuffer: 1 + preserveFramebufferAlpha: 0 disableDepthAndStencilBuffers: 0 - defaultIsFullScreen: 1 + androidStartInFullscreen: 1 + androidRenderOutsideSafeArea: 1 + androidUseSwappy: 0 + androidBlitType: 0 + androidResizableWindow: 0 + androidDefaultWindowWidth: 1920 + androidDefaultWindowHeight: 1080 + androidMinimumWindowWidth: 400 + androidMinimumWindowHeight: 300 + androidFullscreenMode: 1 defaultIsNativeResolution: 1 + macRetinaSupport: 1 runInBackground: 0 captureSingleScreen: 0 - Override IPod Music: 0 + muteOtherAudioSources: 0 Prepare IOS For Recording: 0 + Force IOS Speakers When Recording: 0 + deferSystemGesturesMode: 0 + hideHomeButton: 0 submitAnalytics: 1 usePlayerLog: 1 bakeCollisionMeshes: 0 forceSingleInstance: 0 + useFlipModelSwapchain: 1 resizableWindow: 0 useMacAppStoreValidation: 0 + macAppStoreCategory: public.app-category.games gpuSkinning: 0 xboxPIXTextureCapture: 0 xboxEnableAvatar: 0 @@ -58,60 +98,107 @@ PlayerSettings: xboxEnableKinectAutoTracking: 0 xboxEnableFitness: 0 visibleInBackground: 0 - macFullscreenMode: 2 - d3d9FullscreenMode: 1 - d3d11FullscreenMode: 1 + allowFullscreenSwitch: 1 + fullscreenMode: 2 xboxSpeechDB: 0 xboxEnableHeadOrientation: 0 xboxEnableGuest: 0 + xboxEnablePIXSampling: 0 + metalFramebufferOnly: 0 xboxOneResolution: 0 - ps3SplashScreen: {fileID: 0} - videoMemoryForVertexBuffers: 0 - psp2PowerMode: 0 - psp2AcquireBGM: 1 - m_SupportedAspectRatios: - 4:3: 1 - 5:4: 1 - 16:10: 1 - 16:9: 1 - Others: 1 - bundleIdentifier: com.Company.ProductName + xboxOneSResolution: 0 + xboxOneXResolution: 3 + xboxOneMonoLoggingLevel: 0 + xboxOneLoggingLevel: 1 + xboxOneDisableEsram: 0 + xboxOneEnableTypeOptimization: 0 + xboxOnePresentImmediateThreshold: 0 + switchQueueCommandMemory: 1048576 + switchQueueControlMemory: 16384 + switchQueueComputeMemory: 262144 + switchNVNShaderPoolsGranularity: 33554432 + switchNVNDefaultPoolsGranularity: 16777216 + switchNVNOtherPoolsGranularity: 16777216 + switchGpuScratchPoolGranularity: 2097152 + switchAllowGpuScratchShrinking: 0 + switchNVNMaxPublicTextureIDCount: 0 + switchNVNMaxPublicSamplerIDCount: 0 + switchNVNGraphicsFirmwareMemory: 32 + stadiaPresentMode: 0 + stadiaTargetFramerate: 0 + vulkanNumSwapchainBuffers: 3 + vulkanEnableSetSRGBWrite: 0 + vulkanEnablePreTransform: 0 + vulkanEnableLateAcquireNextImage: 0 + vulkanEnableCommandBufferRecycling: 1 + loadStoreDebugModeEnabled: 0 bundleVersion: 1.0 preloadedAssets: [] - metroEnableIndependentInputSource: 0 - metroEnableLowLatencyPresentationAPI: 0 + metroInputSource: 0 + wsaTransparentSwapchain: 0 + m_HolographicPauseOnTrackingLoss: 1 xboxOneDisableKinectGpuReservation: 0 - productGUID: e4fd3e742048646968dea9f619fbc3b1 + xboxOneEnable7thCore: 1 + vrSettings: + enable360StereoCapture: 0 + isWsaHolographicRemotingEnabled: 0 + enableFrameTimingStats: 0 + enableOpenGLProfilerGPURecorders: 1 + useHDRDisplay: 0 + D3DHDRBitDepth: 0 + m_ColorGamuts: 00000000 + targetPixelDensity: 30 + resolutionScalingMode: 0 + resetResolutionOnWindowResize: 0 + androidSupportedAspectRatio: 1 + androidMaxAspectRatio: 2.1 + applicationIdentifier: + Android: com.Company.ProductName + Standalone: unity.DefaultCompany.BackgroundFetch + iPhone: com.Company.ProductName + tvOS: com.Company.ProductName + buildNumber: + Standalone: 0 + iPhone: 0 + tvOS: 0 + overrideDefaultApplicationIdentifier: 1 AndroidBundleVersionCode: 1 - AndroidMinSdkVersion: 9 + AndroidMinSdkVersion: 22 + AndroidTargetSdkVersion: 0 AndroidPreferredInstallLocation: 1 aotOptions: - apiCompatibilityLevel: 2 + stripEngineCode: 1 iPhoneStrippingLevel: 0 iPhoneScriptCallOptimization: 0 ForceInternetPermission: 0 ForceSDCardPermission: 0 CreateWallpaper: 0 APKExpansionFiles: 0 - preloadShaders: 0 + keepLoadedShadersAlive: 0 StripUnusedMeshComponents: 0 + strictShaderVariantMatching: 0 + VertexChannelCompressionMask: 4054 iPhoneSdkVersion: 988 - iPhoneTargetOSVersion: 22 + iOSTargetOSVersionString: 12.0 + tvOSSdkVersion: 0 + tvOSRequireExtendedGameController: 0 + tvOSTargetOSVersionString: 12.0 uIPrerenderedIcon: 0 uIRequiresPersistentWiFi: 0 + uIRequiresFullScreen: 1 uIStatusBarHidden: 1 uIExitOnSuspend: 0 uIStatusBarStyle: 0 - iPhoneSplashScreen: {fileID: 0} - iPhoneHighResSplashScreen: {fileID: 0} - iPhoneTallHighResSplashScreen: {fileID: 0} - iPhone47inSplashScreen: {fileID: 0} - iPhone55inPortraitSplashScreen: {fileID: 0} - iPhone55inLandscapeSplashScreen: {fileID: 0} - iPadPortraitSplashScreen: {fileID: 0} - iPadHighResPortraitSplashScreen: {fileID: 0} - iPadLandscapeSplashScreen: {fileID: 0} - iPadHighResLandscapeSplashScreen: {fileID: 0} + appleTVSplashScreen: {fileID: 0} + appleTVSplashScreen2x: {fileID: 0} + tvOSSmallIconLayers: [] + tvOSSmallIconLayers2x: [] + tvOSLargeIconLayers: [] + tvOSLargeIconLayers2x: [] + tvOSTopShelfImageLayers: [] + tvOSTopShelfImageLayers2x: [] + tvOSTopShelfImageWideLayers: [] + tvOSTopShelfImageWideLayers2x: [] iOSLaunchScreenType: 0 iOSLaunchScreenPortrait: {fileID: 0} iOSLaunchScreenLandscape: {fileID: 0} @@ -121,60 +208,415 @@ PlayerSettings: iOSLaunchScreenFillPct: 100 iOSLaunchScreenSize: 100 iOSLaunchScreenCustomXibPath: - AndroidTargetDevice: 0 + iOSLaunchScreeniPadType: 0 + iOSLaunchScreeniPadImage: {fileID: 0} + iOSLaunchScreeniPadBackgroundColor: + serializedVersion: 2 + rgba: 0 + iOSLaunchScreeniPadFillPct: 100 + iOSLaunchScreeniPadSize: 100 + iOSLaunchScreeniPadCustomXibPath: + iOSLaunchScreenCustomStoryboardPath: + iOSLaunchScreeniPadCustomStoryboardPath: + iOSDeviceRequirements: [] + iOSURLSchemes: [] + macOSURLSchemes: [] + iOSBackgroundModes: 128 + iOSMetalForceHardShadows: 0 + metalEditorSupport: 1 + metalAPIValidation: 1 + iOSRenderExtraFrameOnPause: 1 + iosCopyPluginsCodeInsteadOfSymlink: 0 + appleDeveloperTeamID: + iOSManualSigningProvisioningProfileID: + tvOSManualSigningProvisioningProfileID: + iOSManualSigningProvisioningProfileType: 0 + tvOSManualSigningProvisioningProfileType: 0 + appleEnableAutomaticSigning: 0 + iOSRequireARKit: 0 + iOSAutomaticallyDetectAndAddCapabilities: 1 + appleEnableProMotion: 0 + shaderPrecisionModel: 0 + clonedFromGUID: 00000000000000000000000000000000 + templatePackageId: + templateDefaultScene: + useCustomMainManifest: 0 + useCustomLauncherManifest: 0 + useCustomMainGradleTemplate: 0 + useCustomLauncherGradleManifest: 0 + useCustomBaseGradleTemplate: 0 + useCustomGradlePropertiesTemplate: 0 + useCustomProguardFile: 0 + AndroidTargetArchitectures: 1 + AndroidTargetDevices: 0 AndroidSplashScreenScale: 0 - AndroidKeystoreName: + androidSplashScreen: {fileID: 0} + AndroidKeystoreName: '{inproject}: ' AndroidKeyaliasName: + AndroidEnableArmv9SecurityFeatures: 0 + AndroidBuildApkPerCpuArchitecture: 0 AndroidTVCompatibility: 1 AndroidIsGame: 1 + AndroidEnableTango: 0 androidEnableBanner: 1 + androidUseLowAccuracyLocation: 0 + androidUseCustomKeystore: 0 m_AndroidBanners: - width: 320 height: 180 banner: {fileID: 0} androidGamepadSupportLevel: 0 - resolutionDialogBanner: {fileID: 0} + chromeosInputEmulation: 1 + AndroidMinifyRelease: 0 + AndroidMinifyDebug: 0 + AndroidValidateAppBundleSize: 1 + AndroidAppBundleSizeToValidate: 150 m_BuildTargetIcons: - m_BuildTarget: m_Icons: - - m_Icon: {fileID: 0} - m_Size: 128 + - serializedVersion: 2 + m_Icon: {fileID: 0} + m_Width: 128 + m_Height: 128 + m_Kind: 0 + m_BuildTargetPlatformIcons: + - m_BuildTarget: iPhone + m_Icons: + - m_Textures: [] + m_Width: 180 + m_Height: 180 + m_Kind: 0 + m_SubKind: iPhone + - m_Textures: [] + m_Width: 120 + m_Height: 120 + m_Kind: 0 + m_SubKind: iPhone + - m_Textures: [] + m_Width: 167 + m_Height: 167 + m_Kind: 0 + m_SubKind: iPad + - m_Textures: [] + m_Width: 152 + m_Height: 152 + m_Kind: 0 + m_SubKind: iPad + - m_Textures: [] + m_Width: 76 + m_Height: 76 + m_Kind: 0 + m_SubKind: iPad + - m_Textures: [] + m_Width: 120 + m_Height: 120 + m_Kind: 3 + m_SubKind: iPhone + - m_Textures: [] + m_Width: 80 + m_Height: 80 + m_Kind: 3 + m_SubKind: iPhone + - m_Textures: [] + m_Width: 80 + m_Height: 80 + m_Kind: 3 + m_SubKind: iPad + - m_Textures: [] + m_Width: 40 + m_Height: 40 + m_Kind: 3 + m_SubKind: iPad + - m_Textures: [] + m_Width: 87 + m_Height: 87 + m_Kind: 1 + m_SubKind: iPhone + - m_Textures: [] + m_Width: 58 + m_Height: 58 + m_Kind: 1 + m_SubKind: iPhone + - m_Textures: [] + m_Width: 29 + m_Height: 29 + m_Kind: 1 + m_SubKind: iPhone + - m_Textures: [] + m_Width: 58 + m_Height: 58 + m_Kind: 1 + m_SubKind: iPad + - m_Textures: [] + m_Width: 29 + m_Height: 29 + m_Kind: 1 + m_SubKind: iPad + - m_Textures: [] + m_Width: 60 + m_Height: 60 + m_Kind: 2 + m_SubKind: iPhone + - m_Textures: [] + m_Width: 40 + m_Height: 40 + m_Kind: 2 + m_SubKind: iPhone + - m_Textures: [] + m_Width: 40 + m_Height: 40 + m_Kind: 2 + m_SubKind: iPad + - m_Textures: [] + m_Width: 20 + m_Height: 20 + m_Kind: 2 + m_SubKind: iPad + - m_Textures: [] + m_Width: 1024 + m_Height: 1024 + m_Kind: 4 + m_SubKind: App Store m_BuildTargetBatching: [] - webPlayerTemplate: APPLICATION:Default + m_BuildTargetGraphicsJobs: + - m_BuildTarget: WindowsStandaloneSupport + m_GraphicsJobs: 1 + - m_BuildTarget: MacStandaloneSupport + m_GraphicsJobs: 0 + - m_BuildTarget: LinuxStandaloneSupport + m_GraphicsJobs: 1 + - m_BuildTarget: AndroidPlayer + m_GraphicsJobs: 0 + - m_BuildTarget: iOSSupport + m_GraphicsJobs: 0 + - m_BuildTarget: PS4Player + m_GraphicsJobs: 1 + - m_BuildTarget: PS5Player + m_GraphicsJobs: 1 + - m_BuildTarget: XboxOnePlayer + m_GraphicsJobs: 1 + - m_BuildTarget: GameCoreXboxOneSupport + m_GraphicsJobs: 1 + - m_BuildTarget: GameCoreScarlettSupport + m_GraphicsJobs: 1 + - m_BuildTarget: Switch + m_GraphicsJobs: 1 + - m_BuildTarget: WebGLSupport + m_GraphicsJobs: 0 + - m_BuildTarget: MetroSupport + m_GraphicsJobs: 1 + - m_BuildTarget: AppleTVSupport + m_GraphicsJobs: 0 + - m_BuildTarget: BJMSupport + m_GraphicsJobs: 1 + - m_BuildTarget: LuminSupport + m_GraphicsJobs: 0 + - m_BuildTarget: CloudRendering + m_GraphicsJobs: 1 + - m_BuildTarget: EmbeddedLinux + m_GraphicsJobs: 1 + - m_BuildTarget: QNX + m_GraphicsJobs: 0 + m_BuildTargetGraphicsJobMode: + - m_BuildTarget: PS4Player + m_GraphicsJobMode: -1218746304 + - m_BuildTarget: XboxOnePlayer + m_GraphicsJobMode: -1218746304 + m_BuildTargetGraphicsAPIs: + - m_BuildTarget: iOSSupport + m_APIs: 10000000 + m_Automatic: 1 + - m_BuildTarget: AndroidPlayer + m_APIs: 0b00000008000000 + m_Automatic: 0 + m_BuildTargetVRSettings: [] + openGLRequireES31: 0 + openGLRequireES31AEP: 0 + openGLRequireES32: 0 m_TemplateCustomTags: {} + mobileMTRendering: + iPhone: 1 + tvOS: 1 + m_BuildTargetGroupLightmapEncodingQuality: + - m_BuildTarget: Standalone + m_EncodingQuality: 1 + - m_BuildTarget: XboxOne + m_EncodingQuality: 1 + - m_BuildTarget: PS4 + m_EncodingQuality: 1 + - m_BuildTarget: GameCoreScarlett + m_EncodingQuality: 1 + - m_BuildTarget: GameCoreXboxOne + m_EncodingQuality: 1 + m_BuildTargetGroupHDRCubemapEncodingQuality: + - m_BuildTarget: Standalone + m_EncodingQuality: 2 + - m_BuildTarget: XboxOne + m_EncodingQuality: 2 + - m_BuildTarget: PS4 + m_EncodingQuality: 2 + - m_BuildTarget: GameCoreScarlett + m_EncodingQuality: 2 + - m_BuildTarget: GameCoreXboxOne + m_EncodingQuality: 2 + m_BuildTargetGroupLightmapSettings: [] + m_BuildTargetGroupLoadStoreDebugModeSettings: [] + m_BuildTargetNormalMapEncoding: [] + m_BuildTargetDefaultTextureCompressionFormat: [] + playModeTestRunnerEnabled: 0 + runPlayModeTestAsEditModeTest: 0 actionOnDotNetUnhandledException: 1 enableInternalProfiler: 0 logObjCUncaughtExceptions: 1 enableCrashReportAPI: 0 + cameraUsageDescription: locationUsageDescription: - XboxTitleId: - XboxImageXexPath: - XboxSpaPath: - XboxGenerateSpa: 0 - XboxDeployKinectResources: 0 - XboxSplashScreen: {fileID: 0} - xboxEnableSpeech: 0 - xboxAdditionalTitleMemorySize: 0 - xboxDeployKinectHeadOrientation: 0 - xboxDeployKinectHeadPosition: 0 - ps3TitleConfigPath: - ps3DLCConfigPath: - ps3ThumbnailPath: - ps3BackgroundPath: - ps3SoundPath: - ps3NPAgeRating: 12 - ps3TrophyCommId: - ps3NpCommunicationPassphrase: - ps3TrophyPackagePath: - ps3BootCheckMaxSaveGameSizeKB: 128 - ps3TrophyCommSig: - ps3SaveGameSlots: 1 - ps3TrialMode: 0 - ps3VideoMemoryForAudio: 0 - ps3EnableVerboseMemoryStats: 0 - ps3UseSPUForUmbra: 0 - ps3EnableMoveSupport: 1 - ps3DisableDolbyEncoding: 0 + microphoneUsageDescription: + bluetoothUsageDescription: + macOSTargetOSVersion: 10.13.0 + switchNMETAOverride: + switchNetLibKey: + switchSocketMemoryPoolSize: 6144 + switchSocketAllocatorPoolSize: 128 + switchSocketConcurrencyLimit: 14 + switchScreenResolutionBehavior: 2 + switchUseCPUProfiler: 0 + switchUseGOLDLinker: 0 + switchLTOSetting: 0 + switchApplicationID: 0x01004b9000490000 + switchNSODependencies: + switchCompilerFlags: + switchTitleNames_0: + switchTitleNames_1: + switchTitleNames_2: + switchTitleNames_3: + switchTitleNames_4: + switchTitleNames_5: + switchTitleNames_6: + switchTitleNames_7: + switchTitleNames_8: + switchTitleNames_9: + switchTitleNames_10: + switchTitleNames_11: + switchTitleNames_12: + switchTitleNames_13: + switchTitleNames_14: + switchTitleNames_15: + switchPublisherNames_0: + switchPublisherNames_1: + switchPublisherNames_2: + switchPublisherNames_3: + switchPublisherNames_4: + switchPublisherNames_5: + switchPublisherNames_6: + switchPublisherNames_7: + switchPublisherNames_8: + switchPublisherNames_9: + switchPublisherNames_10: + switchPublisherNames_11: + switchPublisherNames_12: + switchPublisherNames_13: + switchPublisherNames_14: + switchPublisherNames_15: + switchIcons_0: {fileID: 0} + switchIcons_1: {fileID: 0} + switchIcons_2: {fileID: 0} + switchIcons_3: {fileID: 0} + switchIcons_4: {fileID: 0} + switchIcons_5: {fileID: 0} + switchIcons_6: {fileID: 0} + switchIcons_7: {fileID: 0} + switchIcons_8: {fileID: 0} + switchIcons_9: {fileID: 0} + switchIcons_10: {fileID: 0} + switchIcons_11: {fileID: 0} + switchIcons_12: {fileID: 0} + switchIcons_13: {fileID: 0} + switchIcons_14: {fileID: 0} + switchIcons_15: {fileID: 0} + switchSmallIcons_0: {fileID: 0} + switchSmallIcons_1: {fileID: 0} + switchSmallIcons_2: {fileID: 0} + switchSmallIcons_3: {fileID: 0} + switchSmallIcons_4: {fileID: 0} + switchSmallIcons_5: {fileID: 0} + switchSmallIcons_6: {fileID: 0} + switchSmallIcons_7: {fileID: 0} + switchSmallIcons_8: {fileID: 0} + switchSmallIcons_9: {fileID: 0} + switchSmallIcons_10: {fileID: 0} + switchSmallIcons_11: {fileID: 0} + switchSmallIcons_12: {fileID: 0} + switchSmallIcons_13: {fileID: 0} + switchSmallIcons_14: {fileID: 0} + switchSmallIcons_15: {fileID: 0} + switchManualHTML: + switchAccessibleURLs: + switchLegalInformation: + switchMainThreadStackSize: 1048576 + switchPresenceGroupId: + switchLogoHandling: 0 + switchReleaseVersion: 0 + switchDisplayVersion: 1.0.0 + switchStartupUserAccount: 0 + switchTouchScreenUsage: 0 + switchSupportedLanguagesMask: 0 + switchLogoType: 0 + switchApplicationErrorCodeCategory: + switchUserAccountSaveDataSize: 0 + switchUserAccountSaveDataJournalSize: 0 + switchApplicationAttribute: 0 + switchCardSpecSize: -1 + switchCardSpecClock: -1 + switchRatingsMask: 0 + switchRatingsInt_0: 0 + switchRatingsInt_1: 0 + switchRatingsInt_2: 0 + switchRatingsInt_3: 0 + switchRatingsInt_4: 0 + switchRatingsInt_5: 0 + switchRatingsInt_6: 0 + switchRatingsInt_7: 0 + switchRatingsInt_8: 0 + switchRatingsInt_9: 0 + switchRatingsInt_10: 0 + switchRatingsInt_11: 0 + switchRatingsInt_12: 0 + switchLocalCommunicationIds_0: + switchLocalCommunicationIds_1: + switchLocalCommunicationIds_2: + switchLocalCommunicationIds_3: + switchLocalCommunicationIds_4: + switchLocalCommunicationIds_5: + switchLocalCommunicationIds_6: + switchLocalCommunicationIds_7: + switchParentalControl: 0 + switchAllowsScreenshot: 1 + switchAllowsVideoCapturing: 1 + switchAllowsRuntimeAddOnContentInstall: 0 + switchDataLossConfirmation: 0 + switchUserAccountLockEnabled: 0 + switchSystemResourceMemory: 16777216 + switchSupportedNpadStyles: 22 + switchNativeFsCacheSize: 32 + switchIsHoldTypeHorizontal: 1 + switchSupportedNpadCount: 8 + switchSocketConfigEnabled: 0 + switchTcpInitialSendBufferSize: 32 + switchTcpInitialReceiveBufferSize: 64 + switchTcpAutoSendBufferSizeMax: 256 + switchTcpAutoReceiveBufferSizeMax: 256 + switchUdpSendBufferSize: 9 + switchUdpReceiveBufferSize: 42 + switchSocketBufferEfficiency: 4 + switchSocketInitializeEnabled: 1 + switchNetworkInterfaceManagerInitializeEnabled: 1 + switchPlayerConnectionEnabled: 1 + switchUseNewStyleFilepaths: 1 + switchUseMicroSleepForYield: 1 + switchEnableRamDiskSupport: 0 + switchMicroSleepForYieldTime: 25 + switchRamDiskSpaceSize: 12 ps4NPAgeRating: 12 ps4NPTitleSecret: ps4NPTrophyPackPath: @@ -186,82 +628,119 @@ PlayerSettings: ps4AppType: 0 ps4ParamSfxPath: ps4VideoOutPixelFormat: 0 - ps4VideoOutResolution: 4 + ps4VideoOutInitialWidth: 1920 + ps4VideoOutBaseModeInitialWidth: 1920 + ps4VideoOutReprojectionRate: 60 ps4PronunciationXMLPath: ps4PronunciationSIGPath: ps4BackgroundImagePath: ps4StartupImagePath: + ps4StartupImagesFolder: + ps4IconImagesFolder: ps4SaveDataImagePath: + ps4SdkOverride: ps4BGMPath: ps4ShareFilePath: + ps4ShareOverlayImagePath: + ps4PrivacyGuardImagePath: + ps4ExtraSceSysFile: ps4NPtitleDatPath: ps4RemotePlayKeyAssignment: -1 + ps4RemotePlayKeyMappingDir: + ps4PlayTogetherPlayerCount: 0 ps4EnterButtonAssignment: 1 ps4ApplicationParam1: 0 ps4ApplicationParam2: 0 ps4ApplicationParam3: 0 ps4ApplicationParam4: 0 + ps4DownloadDataSize: 0 + ps4GarlicHeapSize: 2048 + ps4ProGarlicHeapSize: 2560 + playerPrefsMaxSize: 32768 ps4Passcode: 5xr84P2R391UXaLHbavJvFZGfO47XWS2 ps4pnSessions: 1 ps4pnPresence: 1 ps4pnFriends: 1 ps4pnGameCustomData: 1 playerPrefsSupport: 0 + enableApplicationExit: 0 + resetTempFolder: 1 + restrictedAudioUsageRights: 0 + ps4UseResolutionFallback: 0 + ps4ReprojectionSupport: 0 + ps4UseAudio3dBackend: 0 + ps4UseLowGarlicFragmentationMode: 1 + ps4SocialScreenEnabled: 0 + ps4ScriptOptimizationLevel: 2 + ps4Audio3dVirtualSpeakerCount: 14 + ps4attribCpuUsage: 0 + ps4PatchPkgPath: + ps4PatchLatestPkgPath: + ps4PatchChangeinfoPath: + ps4PatchDayOne: 0 + ps4attribUserManagement: 0 + ps4attribMoveSupport: 0 + ps4attrib3DSupport: 0 + ps4attribShareSupport: 0 + ps4attribExclusiveVR: 0 + ps4disableAutoHideSplash: 0 + ps4videoRecordingFeaturesUsed: 0 + ps4contentSearchFeaturesUsed: 0 + ps4CompatibilityPS5: 0 + ps4AllowPS5Detection: 0 + ps4GPU800MHz: 1 + ps4attribEyeToEyeDistanceSettingVR: 0 + ps4IncludedModules: [] + ps4attribVROutputEnabled: 0 monoEnv: - psp2Splashimage: {fileID: 0} - psp2NPTrophyPackPath: - psp2NPSupportGBMorGJP: 0 - psp2NPAgeRating: 12 - psp2NPTitleDatPath: - psp2NPCommsID: - psp2NPCommunicationsID: - psp2NPCommsPassphrase: - psp2NPCommsSig: - psp2ParamSfxPath: - psp2ManualPath: - psp2LiveAreaGatePath: - psp2LiveAreaBackroundPath: - psp2LiveAreaPath: - psp2LiveAreaTrialPath: - psp2PatchChangeInfoPath: - psp2PatchOriginalPackage: - psp2PackagePassword: tncxBYJWjApJsTEruU2xthWkMNJQNCfy - psp2KeystoneFile: - psp2MemoryExpansionMode: 0 - psp2DRMType: 0 - psp2StorageType: 0 - psp2MediaCapacity: 0 - psp2DLCConfigPath: - psp2ThumbnailPath: - psp2BackgroundPath: - psp2SoundPath: - psp2TrophyCommId: - psp2TrophyPackagePath: - psp2PackagedResourcesPath: - psp2SaveDataQuota: 10240 - psp2ParentalLevel: 1 - psp2ShortTitle: Not Set - psp2ContentID: IV0000-ABCD12345_00-0123456789ABCDEF - psp2Category: 0 - psp2MasterVersion: 01.00 - psp2AppVersion: 01.00 - psp2TVBootMode: 0 - psp2EnterButtonAssignment: 2 - psp2TVDisableEmu: 0 - psp2AllowTwitterDialog: 1 - psp2Upgradable: 0 - psp2HealthWarning: 0 - psp2UseLibLocation: 0 - psp2InfoBarOnStartup: 0 - psp2InfoBarColor: 0 - psmSplashimage: {fileID: 0} + splashScreenBackgroundSourceLandscape: {fileID: 0} + splashScreenBackgroundSourcePortrait: {fileID: 0} + blurSplashScreenBackground: 1 spritePackerPolicy: + webGLMemorySize: 32 + webGLExceptionSupport: 1 + webGLNameFilesAsHashes: 0 + webGLShowDiagnostics: 0 + webGLDataCaching: 1 + webGLDebugSymbols: 0 + webGLEmscriptenArgs: + webGLModulesDirectory: + webGLTemplate: APPLICATION:Default + webGLAnalyzeBuildSize: 0 + webGLUseEmbeddedResources: 0 + webGLCompressionFormat: 0 + webGLWasmArithmeticExceptions: 0 + webGLLinkerTarget: 1 + webGLThreadsSupport: 0 + webGLDecompressionFallback: 0 + webGLInitialMemorySize: 32 + webGLMaximumMemorySize: 2048 + webGLMemoryGrowthMode: 2 + webGLMemoryLinearGrowthStep: 16 + webGLMemoryGeometricGrowthStep: 0.2 + webGLMemoryGeometricGrowthCap: 96 scriptingDefineSymbols: {} + additionalCompilerArguments: {} + platformArchitecture: + iOS: 2 + scriptingBackend: + iOS: 1 + il2cppCompilerConfiguration: {} + il2cppCodeGeneration: {} + managedStrippingLevel: {} + incrementalIl2cppBuild: {} + suppressCommonWarnings: 1 + allowUnsafeCode: 0 + useDeterministicCompilation: 1 + enableRoslynAnalyzers: 1 + additionalIl2CppArgs: + scriptingRuntimeVersion: 1 + gcIncremental: 1 + gcWBarrierValidation: 0 + apiCompatibilityLevelPerPlatform: {} + m_RenderingPath: 1 + m_MobileRenderingPath: 1 metroPackageName: BackgroundFetch - metroPackageLogo: - metroPackageLogo140: - metroPackageLogo180: - metroPackageLogo240: metroPackageVersion: metroCertificatePath: metroCertificatePassword: @@ -269,90 +748,25 @@ PlayerSettings: metroCertificateIssuer: metroCertificateNotAfter: 0000000000000000 metroApplicationDescription: BackgroundFetch - metroStoreTileLogo80: - metroStoreTileLogo: - metroStoreTileLogo140: - metroStoreTileLogo180: - metroStoreTileWideLogo80: - metroStoreTileWideLogo: - metroStoreTileWideLogo140: - metroStoreTileWideLogo180: - metroStoreTileSmallLogo80: - metroStoreTileSmallLogo: - metroStoreTileSmallLogo140: - metroStoreTileSmallLogo180: - metroStoreSmallTile80: - metroStoreSmallTile: - metroStoreSmallTile140: - metroStoreSmallTile180: - metroStoreLargeTile80: - metroStoreLargeTile: - metroStoreLargeTile140: - metroStoreLargeTile180: - metroStoreSplashScreenImage: - metroStoreSplashScreenImage140: - metroStoreSplashScreenImage180: - metroPhoneAppIcon: - metroPhoneAppIcon140: - metroPhoneAppIcon240: - metroPhoneSmallTile: - metroPhoneSmallTile140: - metroPhoneSmallTile240: - metroPhoneMediumTile: - metroPhoneMediumTile140: - metroPhoneMediumTile240: - metroPhoneWideTile: - metroPhoneWideTile140: - metroPhoneWideTile240: - metroPhoneSplashScreenImage: - metroPhoneSplashScreenImage140: - metroPhoneSplashScreenImage240: + wsaImages: {} metroTileShortName: - metroCommandLineArgsFile: metroTileShowName: 0 metroMediumTileShowName: 0 metroLargeTileShowName: 0 metroWideTileShowName: 0 + metroSupportStreamingInstall: 0 + metroLastRequiredScene: 0 metroDefaultTileSize: 1 metroTileForegroundText: 1 metroTileBackgroundColor: {r: 0, g: 0, b: 0, a: 1} metroSplashScreenBackgroundColor: {r: 0, g: 0, b: 0, a: 1} metroSplashScreenUseBackgroundColor: 0 platformCapabilities: {} + metroTargetDeviceFamilies: {} metroFTAName: metroFTAFileTypes: [] metroProtocolName: - metroCompilationOverrides: 1 - blackberryDeviceAddress: - blackberryDevicePassword: - blackberryTokenPath: - blackberryTokenExires: - blackberryTokenAuthor: - blackberryTokenAuthorId: - blackberryCskPassword: - blackberrySaveLogPath: - blackberrySharedPermissions: 0 - blackberryCameraPermissions: 0 - blackberryGPSPermissions: 0 - blackberryDeviceIDPermissions: 0 - blackberryMicrophonePermissions: 0 - blackberryGamepadSupport: 0 - blackberryBuildId: 0 - blackberryLandscapeSplashScreen: {fileID: 0} - blackberryPortraitSplashScreen: {fileID: 0} - blackberrySquareSplashScreen: {fileID: 0} - tizenProductDescription: - tizenProductURL: - tizenCertificatePath: - tizenCertificatePassword: - tizenGPSPermissions: 0 - tizenMicrophonePermissions: 0 - stvDeviceAddress: - stvProductDescription: - stvProductAuthor: - stvProductAuthorEmail: - stvProductLink: - stvProductCategory: 0 + vcxProjDefaultLanguage: XboxOneProductId: XboxOneUpdateKey: XboxOneSandboxId: @@ -362,20 +776,50 @@ PlayerSettings: XboxOneGameOsOverridePath: XboxOnePackagingOverridePath: XboxOneAppManifestOverridePath: + XboxOneVersion: 1.0.0.0 XboxOnePackageEncryption: 0 XboxOnePackageUpdateGranularity: 2 XboxOneDescription: + XboxOneLanguage: + - enus + XboxOneCapability: [] + XboxOneGameRating: {} XboxOneIsContentPackage: 0 + XboxOneEnhancedXboxCompatibilityMode: 0 XboxOneEnableGPUVariability: 0 XboxOneSockets: {} XboxOneSplashScreen: {fileID: 0} XboxOneAllowedProductIds: [] XboxOnePersistentLocalStorageSize: 0 - intPropertyNames: - - iOS::Architecture - - iOS::ScriptingBackend - iOS::Architecture: 2 - iOS::ScriptingBackend: 1 - boolPropertyNames: [] - stringPropertyNames: [] - firstStreamedLevelWithResources: 0 + XboxOneXTitleMemory: 8 + XboxOneOverrideIdentityName: + XboxOneOverrideIdentityPublisher: + vrEditorSettings: {} + cloudServicesEnabled: {} + luminIcon: + m_Name: + m_ModelFolderPath: + m_PortalFolderPath: + luminCert: + m_CertPath: + m_SignPackage: 1 + luminIsChannelApp: 0 + luminVersion: + m_VersionCode: 1 + m_VersionName: + apiCompatibilityLevel: 6 + activeInputHandler: 0 + cloudProjectId: + framebufferDepthMemorylessMode: 0 + qualitySettingsNames: [] + projectName: + organizationId: + cloudEnabled: 0 + legacyClampBlendShapeWeights: 1 + playerDataPath: + forceSRGBBlit: 1 + enableGamepadInput: 1 + cpuConfiguration: + hmiLoadingImage: {fileID: 0} + virtualTexturingSupportEnabled: 0 + insecureHttpOption: 0 diff --git a/NativeIntegration/BackgroundTasks/BackgroundFetch/README.md b/NativeIntegration/BackgroundTasks/BackgroundFetch/README.md index ccffec8..e5fad73 100644 --- a/NativeIntegration/BackgroundTasks/BackgroundFetch/README.md +++ b/NativeIntegration/BackgroundTasks/BackgroundFetch/README.md @@ -8,22 +8,13 @@ This sample shows how to add support for background executions (in this case - f ##Prerequisites -Unity: 5.1 +Unity: 2022 -iOS: any +iOS: iOS 13+ #Caveats -After generating xcode project you should manually tweak info.plist: -if you prefer tweaking it with xcode - add key "Required background modes" and one value "App downloads content from the network" -if you want to manually edit info.plist, add: - - UIBackgroundModes - - fetch - - Background fetch happens at "random" intervals (it is up to iOS to call you), so for debugging you want to use Debug -> Simulate Simulate Background Fetch @@ -46,8 +37,14 @@ In our case Update looks like that: { fetchedText = QueryFetchedText(); if (fetchedText != null) + if (fetchedText != null) + { Debug.Log("Just Fetched: " + fetchedText); + text.text = fetchedText; + } } } so you will see it logged immediately (even though app is in background) + +Note that we have enabled "Enable Custom Background Behaviors" and "Background fetch" in Player Settings. diff --git a/NativeIntegration/Misc/TextureFromGallery/Assets/Editor.meta b/NativeIntegration/Misc/TextureFromGallery/Assets/Editor.meta new file mode 100644 index 0000000..8e92dd8 --- /dev/null +++ b/NativeIntegration/Misc/TextureFromGallery/Assets/Editor.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: af355b1651de04bc78a2f56ee057223f +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/NativeIntegration/Misc/TextureFromGallery/Assets/Editor/PostprocessBuild.cs b/NativeIntegration/Misc/TextureFromGallery/Assets/Editor/PostprocessBuild.cs new file mode 100644 index 0000000..5b14393 --- /dev/null +++ b/NativeIntegration/Misc/TextureFromGallery/Assets/Editor/PostprocessBuild.cs @@ -0,0 +1,22 @@ +using System.IO; +using UnityEditor; +using UnityEditor.Build; +using UnityEditor.Callbacks; +using UnityEditor.iOS.Xcode; + +public class PostprocessBuild +{ + [PostProcessBuild] + public static void OnPostprocessBuild(BuildTarget buildTarget, string path) + { + if (buildTarget == BuildTarget.iOS) + { + string plistPath = path + "/Info.plist"; + + PlistDocument doc = new PlistDocument(); + doc.ReadFromFile(plistPath); + doc.root.SetString("NSPhotoLibraryUsageDescription", "TEST"); + doc.WriteToFile(plistPath); + } + } +} diff --git a/NativeIntegration/Misc/TextureFromGallery/Assets/Editor/PostprocessBuild.cs.meta b/NativeIntegration/Misc/TextureFromGallery/Assets/Editor/PostprocessBuild.cs.meta new file mode 100644 index 0000000..748b7f7 --- /dev/null +++ b/NativeIntegration/Misc/TextureFromGallery/Assets/Editor/PostprocessBuild.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: d1fe8f1d04a8f4a42a9f52a49ef2383d +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/NativeIntegration/Misc/TextureFromGallery/Assets/Plugins/iOS/GalleryTextureLoaderImpl.mm.meta b/NativeIntegration/Misc/TextureFromGallery/Assets/Plugins/iOS/GalleryTextureLoaderImpl.mm.meta index ea580d3..f24d0b9 100644 --- a/NativeIntegration/Misc/TextureFromGallery/Assets/Plugins/iOS/GalleryTextureLoaderImpl.mm.meta +++ b/NativeIntegration/Misc/TextureFromGallery/Assets/Plugins/iOS/GalleryTextureLoaderImpl.mm.meta @@ -1,56 +1,84 @@ fileFormatVersion: 2 guid: 34541fc03278f428391a3a1b3116287e PluginImporter: - serializedVersion: 1 + externalObjects: {} + serializedVersion: 2 iconMap: {} executionOrder: {} + defineConstraints: [] isPreloaded: 0 + isOverridable: 0 + isExplicitlyReferenced: 0 + validateReferences: 1 platformData: - Any: - enabled: 0 - settings: {} - Editor: + - first: + : Linux + second: enabled: 0 settings: CPU: AnyCPU - DefaultValueInitialized: true - OS: AnyOS - Linux: + - first: + : LinuxUniversal + second: enabled: 0 settings: CPU: AnyCPU - Linux64: + - first: + : OSXIntel + second: enabled: 0 settings: CPU: AnyCPU - LinuxUniversal: + - first: + : OSXIntel64 + second: enabled: 0 settings: CPU: AnyCPU - OSXIntel: + - first: + Any: + second: + enabled: 0 + settings: {} + - first: + Editor: Editor + second: enabled: 0 settings: CPU: AnyCPU - OSXIntel64: + DefaultValueInitialized: true + OS: AnyOS + - first: + Standalone: Linux64 + second: enabled: 0 settings: CPU: AnyCPU - OSXUniversal: + - first: + Standalone: OSXUniversal + second: enabled: 0 settings: CPU: AnyCPU - Win: + - first: + Standalone: Win + second: enabled: 0 settings: CPU: AnyCPU - Win64: + - first: + Standalone: Win64 + second: enabled: 0 settings: CPU: AnyCPU - iOS: + - first: + iPhone: iOS + second: enabled: 1 settings: CompileFlags: FrameworkDependencies: AssetsLibrary; userData: assetBundleName: + assetBundleVariant: diff --git a/NativeIntegration/Misc/UpdateXcodeProject/Assets/Editor/Unity.iOS.Extensions.Xcode.dll b/NativeIntegration/Misc/UpdateXcodeProject/Assets/Editor/Unity.iOS.Extensions.Xcode.dll deleted file mode 100755 index 3e2c169..0000000 Binary files a/NativeIntegration/Misc/UpdateXcodeProject/Assets/Editor/Unity.iOS.Extensions.Xcode.dll and /dev/null differ diff --git a/NativeIntegration/Misc/UpdateXcodeProject/Assets/Editor/Unity.iOS.Extensions.Xcode.dll.meta b/NativeIntegration/Misc/UpdateXcodeProject/Assets/Editor/Unity.iOS.Extensions.Xcode.dll.meta deleted file mode 100644 index d19f66f..0000000 --- a/NativeIntegration/Misc/UpdateXcodeProject/Assets/Editor/Unity.iOS.Extensions.Xcode.dll.meta +++ /dev/null @@ -1,7 +0,0 @@ -fileFormatVersion: 2 -guid: 4b9607f4d1ede4513baef82b894f6ab0 -MonoAssemblyImporter: - serializedVersion: 1 - iconMap: {} - executionOrder: {} - userData: diff --git a/NativeIntegration/Misc/UpdateXcodeProject/Assets/Editor/XcodeProjectUpdater.cs b/NativeIntegration/Misc/UpdateXcodeProject/Assets/Editor/XcodeProjectUpdater.cs index ce58c2b..0f398a5 100644 --- a/NativeIntegration/Misc/UpdateXcodeProject/Assets/Editor/XcodeProjectUpdater.cs +++ b/NativeIntegration/Misc/UpdateXcodeProject/Assets/Editor/XcodeProjectUpdater.cs @@ -26,14 +26,14 @@ internal static void CopyAndReplaceDirectory(string srcPath, string dstPath) [PostProcessBuild] public static void OnPostprocessBuild(BuildTarget buildTarget, string path) { - if (buildTarget == BuildTarget.iPhone) + if (buildTarget == BuildTarget.iOS) { string projPath = path + "/Unity-iPhone.xcodeproj/project.pbxproj"; PBXProject proj = new PBXProject(); proj.ReadFromString(File.ReadAllText(projPath)); - string target = proj.TargetGuidByName("Unity-iPhone"); + string target = proj.GetUnityFrameworkTargetGuid(); // Add user packages to project. Most other source or resource files and packages // can be added the same way. diff --git a/NativeIntegration/Misc/UpdateXcodeProject/NativeAssets/TestLib.framework/Versions/A/TestLib b/NativeIntegration/Misc/UpdateXcodeProject/NativeAssets/TestLib.framework/Versions/A/TestLib index 4ec7dc6..b82b680 100644 Binary files a/NativeIntegration/Misc/UpdateXcodeProject/NativeAssets/TestLib.framework/Versions/A/TestLib and b/NativeIntegration/Misc/UpdateXcodeProject/NativeAssets/TestLib.framework/Versions/A/TestLib differ diff --git a/NativeIntegration/Misc/UpdateXcodeProject/NativeAssets/TestLib/TestLib.xcodeproj/project.pbxproj b/NativeIntegration/Misc/UpdateXcodeProject/NativeAssets/TestLib/TestLib.xcodeproj/project.pbxproj index f980bfe..254f1e2 100644 --- a/NativeIntegration/Misc/UpdateXcodeProject/NativeAssets/TestLib/TestLib.xcodeproj/project.pbxproj +++ b/NativeIntegration/Misc/UpdateXcodeProject/NativeAssets/TestLib/TestLib.xcodeproj/project.pbxproj @@ -360,6 +360,7 @@ isa = XCBuildConfiguration; buildSettings = { ALWAYS_SEARCH_USER_PATHS = NO; + ARCHS = arm64; CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; CLANG_CXX_LIBRARY = "libc++"; CLANG_ENABLE_MODULES = YES; @@ -387,7 +388,7 @@ GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 7.1; + IPHONEOS_DEPLOYMENT_TARGET = 11.0; ONLY_ACTIVE_ARCH = YES; SDKROOT = iphoneos; }; @@ -397,6 +398,7 @@ isa = XCBuildConfiguration; buildSettings = { ALWAYS_SEARCH_USER_PATHS = NO; + ARCHS = arm64; CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; CLANG_CXX_LIBRARY = "libc++"; CLANG_ENABLE_MODULES = YES; @@ -418,7 +420,7 @@ GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 7.1; + IPHONEOS_DEPLOYMENT_TARGET = 11.0; SDKROOT = iphoneos; VALIDATE_PRODUCT = YES; }; @@ -503,7 +505,7 @@ INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Bundles"; MACOSX_DEPLOYMENT_TARGET = 10.9; PRODUCT_NAME = TestLib; - SDKROOT = iphoneos7.1; + SDKROOT = iphoneos; WRAPPER_EXTENSION = bundle; }; name = Debug; @@ -520,7 +522,7 @@ INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Bundles"; MACOSX_DEPLOYMENT_TARGET = 10.9; PRODUCT_NAME = TestLib; - SDKROOT = iphoneos7.1; + SDKROOT = iphoneos; WRAPPER_EXTENSION = bundle; }; name = Release; diff --git a/NativeIntegration/Misc/UpdateXcodeProject/README.md b/NativeIntegration/Misc/UpdateXcodeProject/README.md index 0acbac3..677b2eb 100644 --- a/NativeIntegration/Misc/UpdateXcodeProject/README.md +++ b/NativeIntegration/Misc/UpdateXcodeProject/README.md @@ -3,12 +3,12 @@ ## Description -This sample shows how to modify generated Xcode projects in order to support +This sample shows how to modify generated Xcode projects in order to support various types of native plugins. ##Prerequisites -Unity: 4.5 +Unity: 2020 iOS: any diff --git a/NativeIntegration/UI/NavigationController/Assets/Plugins/iOS/MyAppController.mm b/NativeIntegration/UI/NavigationController/Assets/Plugins/iOS/MyAppController.mm index 8297763..fcd9c2e 100644 --- a/NativeIntegration/UI/NavigationController/Assets/Plugins/iOS/MyAppController.mm +++ b/NativeIntegration/UI/NavigationController/Assets/Plugins/iOS/MyAppController.mm @@ -30,7 +30,7 @@ - (void)willStartWithViewController:(UIViewController*)controller [[UIBarButtonItem alloc] initWithTitle: @"Left" style: UIBarButtonItemStyleBordered target: self action: @selector(moveLeft:)]; _embedController2.view = [[UIWebView alloc] initWithFrame: [[UIScreen mainScreen] bounds]]; - [(UIWebView*)_embedController2.view loadRequest: [NSURLRequest requestWithURL: [NSURL URLWithString: @"http://www.unity3d.com"]]]; + [(UIWebView*)_embedController2.view loadRequest: [NSURLRequest requestWithURL: [NSURL URLWithString: @"https://unity.com"]]]; _rootController.view = _rootView; diff --git a/NativeIntegration/UI/NavigationController/Assets/Plugins/iOS/MyAppController.mm.meta b/NativeIntegration/UI/NavigationController/Assets/Plugins/iOS/MyAppController.mm.meta index edb035a..838fb72 100644 --- a/NativeIntegration/UI/NavigationController/Assets/Plugins/iOS/MyAppController.mm.meta +++ b/NativeIntegration/UI/NavigationController/Assets/Plugins/iOS/MyAppController.mm.meta @@ -1,4 +1,33 @@ fileFormatVersion: 2 guid: 3cadb9c197a3b482d915d42b2d34b832 -DefaultImporter: +PluginImporter: + externalObjects: {} + serializedVersion: 2 + iconMap: {} + executionOrder: {} + defineConstraints: [] + isPreloaded: 0 + isOverridable: 0 + isExplicitlyReferenced: 0 + validateReferences: 1 + platformData: + - first: + Any: + second: + enabled: 0 + settings: {} + - first: + Editor: Editor + second: + enabled: 0 + settings: + DefaultValueInitialized: true + - first: + iPhone: iOS + second: + enabled: 1 + settings: + AddToEmbeddedBinaries: false userData: + assetBundleName: + assetBundleVariant: diff --git a/NativeIntegration/UI/ResizedView/Assets/Plugins/iOS/ScreenshotCreator.mm b/NativeIntegration/UI/ResizedView/Assets/Plugins/iOS/ScreenshotCreator.mm index d405b8a..c93ad1b 100644 --- a/NativeIntegration/UI/ResizedView/Assets/Plugins/iOS/ScreenshotCreator.mm +++ b/NativeIntegration/UI/ResizedView/Assets/Plugins/iOS/ScreenshotCreator.mm @@ -1,6 +1,6 @@ #import "ScreenshotCreator.h" -#include "GlesHelper.h" +#include "UnityMetalSupport.h" #include "DisplayManager.h" static ScreenshotCreator* _Creator = nil; @@ -56,7 +56,8 @@ - (void)onFrameResolved bufferW = CVPixelBufferGetWidth(pixelBuf); bufferH = CVPixelBufferGetHeight(pixelBuf); bufferRowLen = CVPixelBufferGetBytesPerRow(pixelBuf); - bufferFlipped = CVOpenGLESTextureIsFlipped((CVOpenGLESTextureRef)mainDisplaySurface->cvTextureCacheTexture); + // note that for metal rows ordering is opposite to gl + bufferFlipped = !CVMetalTextureIsFlipped((CVMetalTextureRef)mainDisplaySurface->cvTextureCacheTexture); imageW = mainDisplaySurface->targetW; imageH = mainDisplaySurface->targetH; diff --git a/NativeIntegration/UI/ResizedView/Assets/Screenshot.cs b/NativeIntegration/UI/ResizedView/Assets/Screenshot.cs index b20e21d..eba46ea 100644 --- a/NativeIntegration/UI/ResizedView/Assets/Screenshot.cs +++ b/NativeIntegration/UI/ResizedView/Assets/Screenshot.cs @@ -45,7 +45,7 @@ void OnGUI() savingScreenshot = true; CaptureScreenshot(ScreenshotCompleteCallback, "test.png"); #else - Application.CaptureScreenshot("test.png"); + ScreenCapture.CaptureScreenshot("test.png"); #endif } } diff --git a/NativeIntegration/UI/ResizedView/Assets/TestOrientation.cs b/NativeIntegration/UI/ResizedView/Assets/TestOrientation.cs index 85a57c2..62c0e1d 100644 --- a/NativeIntegration/UI/ResizedView/Assets/TestOrientation.cs +++ b/NativeIntegration/UI/ResizedView/Assets/TestOrientation.cs @@ -19,7 +19,7 @@ IEnumerator ChangeOrientation() ScreenOrientation orientation = (ScreenOrientation)UnityInterfaceOrientation(); bool isPortrait = orientation == ScreenOrientation.Portrait || orientation == ScreenOrientation.PortraitUpsideDown; - UnityChangeInterfaceOrientation((int)(isPortrait ? ScreenOrientation.Landscape : ScreenOrientation.Portrait)); + UnityChangeInterfaceOrientation((int)(isPortrait ? ScreenOrientation.LandscapeLeft : ScreenOrientation.Portrait)); #endif } diff --git a/NativeIntegration/UI/ResizedView/ProjectSettings/GraphicsSettings.asset b/NativeIntegration/UI/ResizedView/ProjectSettings/GraphicsSettings.asset index 03ff332..ce70b72 100644 Binary files a/NativeIntegration/UI/ResizedView/ProjectSettings/GraphicsSettings.asset and b/NativeIntegration/UI/ResizedView/ProjectSettings/GraphicsSettings.asset differ diff --git a/NativeIntegration/UI/ResizedView/ProjectSettings/ProjectSettings.asset b/NativeIntegration/UI/ResizedView/ProjectSettings/ProjectSettings.asset index 3d061c6..6518110 100644 Binary files a/NativeIntegration/UI/ResizedView/ProjectSettings/ProjectSettings.asset and b/NativeIntegration/UI/ResizedView/ProjectSettings/ProjectSettings.asset differ diff --git a/NativeIntegration/Video/VideoPlayer/Assets/Plugins/iOS/VideoPlayerInterface.mm b/NativeIntegration/Video/VideoPlayer/Assets/Plugins/iOS/VideoPlayerInterface.mm index 43e9b4b..e9d6196 100644 --- a/NativeIntegration/Video/VideoPlayer/Assets/Plugins/iOS/VideoPlayerInterface.mm +++ b/NativeIntegration/Video/VideoPlayer/Assets/Plugins/iOS/VideoPlayerInterface.mm @@ -69,6 +69,9 @@ - (void)onPlayerDidFinishPlayingVideo { view.hidden = YES; } +- (void)onPlayerError:(NSError*)error +{ +} - (void)pause { [player pause]; } - (void)resume { [player resume]; } diff --git a/NativeIntegration/Video/VideoPlayer/Assets/Plugins/iOS/VideoPlayerInterface.mm.meta b/NativeIntegration/Video/VideoPlayer/Assets/Plugins/iOS/VideoPlayerInterface.mm.meta index a8d26f1..11e0660 100644 --- a/NativeIntegration/Video/VideoPlayer/Assets/Plugins/iOS/VideoPlayerInterface.mm.meta +++ b/NativeIntegration/Video/VideoPlayer/Assets/Plugins/iOS/VideoPlayerInterface.mm.meta @@ -1,4 +1,33 @@ fileFormatVersion: 2 guid: 0231df34b74ec410a9ee27018ee10d27 -DefaultImporter: +PluginImporter: + externalObjects: {} + serializedVersion: 2 + iconMap: {} + executionOrder: {} + defineConstraints: [] + isPreloaded: 0 + isOverridable: 0 + isExplicitlyReferenced: 0 + validateReferences: 1 + platformData: + - first: + Any: + second: + enabled: 0 + settings: {} + - first: + Editor: Editor + second: + enabled: 0 + settings: + DefaultValueInitialized: true + - first: + iPhone: iOS + second: + enabled: 1 + settings: + AddToEmbeddedBinaries: false userData: + assetBundleName: + assetBundleVariant: diff --git a/NativeIntegration/Video/VideoPlayer/Assets/TestVideoPlayer.cs b/NativeIntegration/Video/VideoPlayer/Assets/TestVideoPlayer.cs index 9d13aec..c333e76 100644 --- a/NativeIntegration/Video/VideoPlayer/Assets/TestVideoPlayer.cs +++ b/NativeIntegration/Video/VideoPlayer/Assets/TestVideoPlayer.cs @@ -23,7 +23,6 @@ private static void VideoPlayer_RewindVideo() {} private string[] videoPath = new string[] { "Data/Raw/big_buck_bunny.mp4", - "http://www.quirksmode.org/html5/videos/big_buck_bunny.mp4" }; private int curVideo = 0; diff --git a/NativeIntegration/Video/VideoPlayer/ProjectSettings/GraphicsSettings.asset b/NativeIntegration/Video/VideoPlayer/ProjectSettings/GraphicsSettings.asset index 103c53f..ce70b72 100644 Binary files a/NativeIntegration/Video/VideoPlayer/ProjectSettings/GraphicsSettings.asset and b/NativeIntegration/Video/VideoPlayer/ProjectSettings/GraphicsSettings.asset differ diff --git a/NativeIntegration/Video/VideoPlayer/ProjectSettings/ProjectSettings.asset b/NativeIntegration/Video/VideoPlayer/ProjectSettings/ProjectSettings.asset index 898ac09..0107319 100644 Binary files a/NativeIntegration/Video/VideoPlayer/ProjectSettings/ProjectSettings.asset and b/NativeIntegration/Video/VideoPlayer/ProjectSettings/ProjectSettings.asset differ diff --git a/NativeIntegration/WWW/CustomConnection/README.md b/NativeIntegration/WWW/CustomConnection/README.md index 7b9e96a..1fa094e 100644 --- a/NativeIntegration/WWW/CustomConnection/README.md +++ b/NativeIntegration/WWW/CustomConnection/README.md @@ -8,7 +8,7 @@ This sample shows how to tweak WWW connection to better suit your needs. ##Prerequisites -Unity: 4.3.1 +Unity: 4.3.1 - 2019.1 iOS: any