본문 바로가기
개발/Unity 자료

Unity) 커스텀 디바이스 추가 하기(Custom Simulator : iPhone 14,15 Pro / etc)

by 테샤르 2024. 10. 9.

커스텀 디바이스 추가 하기(Custom Simulator :  iPhone 14,15 Pro / etc)

 

Unity 엔진에서 모바일을 개발하는 과정에서는 여러가지 Device의 해상도에서 어떻게 나오는지 확인을 해야 한다.

그 과정에서 Simulator를 사용하는데 시간이 지날수록 새로운 Device가 나오는데 내장된 업데이트가 되지 않고 있다.

 

<Unity Device Simulator Devices 1.0.0>

 

반응형

 

 < Game  : Simulator>

기존의 시뮬레이터에서는 지원하는 Device가 최신 기기의 디바이스가 없는 경우에 추가를 해야한다.

 

 

< 추가 방법 >

Device의 정보를 적은 Json 형태의 파일을 넣으면 된다.

경로 Assset 경로
.Device Json Assets/Devices/
디바이스 이미지 Assets/Devices/Overlays/iPhone 14.png

 

< iPhone 14.devie >

{
    "friendlyName": "Apple iPhone 14",
    "version": 1,
    "screens": [
        {
            "width": 1170,
            "height": 2532,
            "navigationBarHeight": 0,
            "dpi": 460.0,
            "orientations": [
                {
                    "orientation": 1,
                    "safeArea": {
                        "serializedVersion": "2",
                        "x": 0.0,
                        "y": 102.0,
                        "width": 1170.0,
                        "height": 2289.0
                    }
                },
                {
                    "orientation": 2,
                    "safeArea": {
                        "serializedVersion": "2",
                        "x": 0.0,
                        "y": 141.0,
                        "width": 1170.0,
                        "height": 2289.0
                    }
                },
                {
                    "orientation": 3,
                    "safeArea": {
                        "serializedVersion": "2",
                        "x": 141.0,
                        "y": 63.0,
                        "width": 2250.0,
                        "height": 1107.0
                    }
                },
                {
                    "orientation": 4,
                    "safeArea": {
                        "serializedVersion": "2",
                        "x": 141.0,
                        "y": 63.0,
                        "width": 2250.0,
                        "height": 1107.0
                    }
                }
            ],
            "presentation": {
                "overlayPath": "Overlays/iPhone 14.png",
                "borderSize": {
                    "x": 80.0,
                    "y": 70.0,
                    "z": 80.0,
                    "w": 70.0
                }
            }
        }
    ],
    "systemInfo": {
        "deviceModel": "iPhone14,7",
        "deviceType": 1,
        "operatingSystem": "iOS 17.0",
        "operatingSystemFamily": 0,
        "processorCount": 6,
        "processorFrequency": 0,
        "processorType": "arm64e",
        "supportsAccelerometer": true,
        "supportsAudio": true,
        "supportsGyroscope": true,
        "supportsLocationService": true,
        "supportsVibration": true,
        "systemMemorySize": 2813,
        "unsupportedIdentifier": "n/a",
        "graphicsDependentData": [
            {
                "graphicsDeviceType": 16,
                "graphicsMemorySize": 1024,
                "graphicsDeviceName": "Apple A15 GPU",
                "graphicsDeviceVendor": "Apple",
                "graphicsDeviceID": 0,
                "graphicsDeviceVendorID": 0,
                "graphicsUVStartsAtTop": true,
                "graphicsDeviceVersion": "Metal",
                "graphicsShaderLevel": 50,
                "graphicsMultiThreaded": true,
                "renderingThreadingMode": 0,
                "hasHiddenSurfaceRemovalOnGPU": true,
                "hasDynamicUniformArrayIndexingInFragmentShaders": true,
                "supportsShadows": true,
                "supportsRawShadowDepthSampling": true,
                "supportsMotionVectors": true,
                "supports3DTextures": true,
                "supports2DArrayTextures": true,
                "supports3DRenderTextures": true,
                "supportsCubemapArrayTextures": true,
                "copyTextureSupport": 31,
                "supportsComputeShaders": true,
                "supportsGeometryShaders": false,
                "supportsTessellationShaders": true,
                "supportsInstancing": true,
                "supportsHardwareQuadTopology": false,
                "supports32bitsIndexBuffer": true,
                "supportsSparseTextures": false,
                "supportedRenderTargetCount": 8,
                "supportsSeparatedRenderTargetsBlend": true,
                "supportedRandomWriteTargetCount": 8,
                "supportsMultisampledTextures": 1,
                "supportsMultisampleAutoResolve": false,
                "supportsTextureWrapMirrorOnce": 0,
                "usesReversedZBuffer": true,
                "npotSupport": 2,
                "maxTextureSize": 16384,
                "maxCubemapSize": 16384,
                "maxComputeBufferInputsVertex": 8,
                "maxComputeBufferInputsFragment": 8,
                "maxComputeBufferInputsGeometry": 0,
                "maxComputeBufferInputsDomain": 8,
                "maxComputeBufferInputsHull": 8,
                "maxComputeBufferInputsCompute": 8,
                "maxComputeWorkGroupSize": 1024,
                "maxComputeWorkGroupSizeX": 1024,
                "maxComputeWorkGroupSizeY": 1024,
                "maxComputeWorkGroupSizeZ": 1024,
                "supportsAsyncCompute": false,
                "supportsGraphicsFence": true,
                "supportsAsyncGPUReadback": true,
                "supportsRayTracing": false,
                "supportsSetConstantBuffer": true,
                "hasMipMaxLevel": true,
                "supportsMipStreaming": true,
                "usesLoadStoreActions": true,
                "supportedTextureFormats": [1, 2, 3, 4, 5],
                "supportedRenderTextureFormats": [1, 2, 3, 4, 5],
                "ldrGraphicsFormat": 59,
                "hdrGraphicsFormat": 74
            }
        ]
    }
}

 

 

< iPhone 14 디바이스 디스플레이 스펙 정보>

  • Screen resolution (points): 390 x 844
  • Native resolution (pixels): 1170 x 2532 (460 ppi)
  • Native Scale factor: 3x

https://useyourloaf.com/blog/iphone-14-screen-sizes/

 

Screen Resolution 과 Safe Area 의 가장 큰 영역을 추가해서 넣으면 된다.

 

 

 iPhone 14 Screen Sizes : [링크]

 

iPhone 14 Screen Sizes

The notch is being replaced by the dynamic island. Here's a recap of what's changed with the 2022 iPhone 14 screen sizes.

useyourloaf.com

 

 

Unity Device Simulator : [링크]

 

Unity - Manual: Device Simulator

Device Simulator introduction Device Simulator This section of the documentation contains information about Unity’s Device Simulator. A screenshot of the Simulator view Page Description Device Simulator introduction Introduces the Device Simulator and it

docs.unity3d.com

 

 Unity Device-Simulator Add Device : [링크]

 

Unity - Manual: Adding a device

Extending the device simulator Adding a device To add a new device to the Device Simulator, you create a device definition and a device overlay. A device definition is a text file with the .device extension in your Unity project. It contains JSON that desc

docs.unity3d.com

 

 

 

★☆☆☆☆

 

반응형

댓글