Version: 2020.3
Android에서 크래시 버그 리포트
Windows

Chrome OS

This section contains information on developing for the Chrome OS platform. In general, all Android documentation in the Unity User manual also applies to Chrome OS, but there are some differences and new things to consider that are in this section.

Setting up your Chrome OS device

Make sure that you follow Google’s Developer Documentation on how to prepare your development environment. Make sure that you use Android Debug Bridge (adb) over WiFi or ethernet to connect to your device. This makes it easier for Unity to discover and connect to your device.

Building for Chrome OS

In the Build Settings, there are two specific Chrome OS targets: x86 and x86–64. To natively support the full spectrum of Chrome OS devices, select both of these as the build target, plus the existing ARM options.

If you instead want to limit the devices on which your Android application can run, use the Target Devices Player Setting. Set this to Phones, Tablets, and TV Devices Only to limit your application to run only on phones, tablets, and TV devices. Select Chrome OS Devices Only if you only want to run on Chrome OS and want to avoid all other Android devices.

You must connect with adb to run a built APK on your Chrome OS device.

플레이어 설정(Player Settings)

In addition to the existing Android player settings, there are some Player Settings that are specific to Chrome OS:

Player Setting 설명
Target Architectures Select which target architecture you want to support. To support all Chrome OS devices, you must select both of these as the build target.
x86 (Chrome OS) This is only supported for Chrome OS, 32-bit x86.
x86–64 (Chrome OS) This is only supported for Chrome OS, 64-bit x86–64.
TargetDevices Use this setting to constrain the devices on which your application is allowed to run.
All Devices No constraints placed.
Phones, Tablets, and TV Devices Only Constrains your application to only run on Android phones, tablets, and TV devices.
Chrome OS Devices Only Excludes all Android phones and tablets and allows your application to run only on Chrome OS devices.
Chrome OS Input Emulation This setting converts all mouse and touchpad events into touchscreen events. This setting is enabled by default.

This setting is useful if you developed your application for Android and you want it to work on Chrome OS with no extra development. If you want your application to fully receive all mouse and touchpad events, and fully support those input devices on ChromeOS, you should disable this setting.

By default, on Chrome OS, an application misses mouse positional updates (when a button isn’t pressed) and both mouse or touchpad scrolling events and button presses.

Using the Unity Profiler and Managed Debuggers

Automatic discovery of Unity applications for managed debuggers and the Unity Profiler isn’t supported because of networking restrictions on Chrome OS. Both work but you must connect to them manually via the device’s IP address. For more information, see Profiling your application documentation.

Full-screen and windows

The Android window-related player settings are important on Chrome OS because it has a desktop windowing user interface. You can use these settings to allow your application to start full-screen or in a window, determine the starting and minimum sizes of the window, and whether it is resizable or not. Windowing behavior is also affected by which orientations are allowed via auto-rotation.

For the most optimum performance, you should either allow portrait orientation, or landscape orientation: but not both. You should also allow windowed applications to be resized if they aren’t in full-screen. This is because there are several known issues with rotating and windowing, which currently limit the behavior of your application in these modes.

Mouse and touchpad input

Chrome OS devices come in a variety of form factors including laptop and tablet forms. Some devices support both modes. Because a lot of Chrome OS devices are laptops or have a laptop mode, this places a greater importance on mouse, touchpad, and keyboard input than is typical in a standard Android app that’s touchscreen-based.

By default, Chrome OS emulates touchscreen input, even if the end user is using a mouse or touchpad. This means that an Android app that was developed with phones and tablets in mind is usable by default on a Chrome OS device. If you want to get the most out of these new input devices, you should disable the Player Setting Chrome OS Input Emulation. This option then allows mouse and touchpad input to come through unchanged to your app. This means you need to write Unity input code to handle mouse input and touchpad input; but if you do this, you need to be able to read the cursor position, handle button presses and touchpad clicks, and read scrolling events.

Android and Chrome OS supports custom cursors. This works just like it does on other platforms.

UI and touch-screen keyboards

Unity has a few UI systems available. In general on Android, whenever there is an input field or text field selected, the virtual on-screen keyboard always comes up so that the user can enter text. On Chrome OS, if there is a hardware keyboard available, then the on-screen keyboard is not shown or used. If there is no hardware keyboard available, then the on-screen keyboard is used like normal on Android. Please note: if your app specifically asks to open a TouchScreenKeyboard, this works the same on Chrome OS.

Many UI widgets are highlighted if the user’s mouse cursor hovers over them. On Chrome OS, this only works if mouse positions are reported reliably, which is dependent on the Chrome OS Input Emulation Player Setting being disabled.

Supported CPUs and devices

Unity supports all brands of Chrome OS devices that are in a laptop, tablet, netbook or desktop form. Chromecast devices aren’t supported. The minimum supported major Chrome OS version is R89 and any following release on the “stable” release channel. As on other platforms, you can use beta and development OS builds at your own discretion.

알려진 문제

  • x86 and x86_64 architectures are only supported for running on Chrome OS devices, not any other Android device with an Intel processor.
  • Project Tiny doesn’t work natively on Chrome OS x86 and x86–64 devices.
  • In the Unity Physics package, Havok Physics isn’t supported on Chrome OS.
  • Script debugging and profiling is only supported over WiFi or Ethernet.
  • Script only builds aren’t supported.
  • Profiling and debugging in Android Studio only works if your target device is in Developer Mode. For more information, see the Chromium documentation
  • Applications that support auto rotating to all orientations suffer from several bugs, including rotating when they shouldn’t and getting set to the wrong resolution at times.
  • Non-resizable windows do not behave properly on Chrome OS devices that have both clamshell and tablet modes. Once in tablet mode, the app goes full-screen and will never go back to its original size, even when returning to clamshell mode.
  • Chrome OS isn’t a supported Unity Editor platform.
  • Burst isn’t compatible with builds for x86 and x86_64.
  • x86 and x86_64 don’t support Mono; only IL2CPP.
  • If you’re using the Unity video player, H.265 videos are not supported on Chrome OS devices. H.264 is a better option.
Android에서 크래시 버그 리포트
Windows
Copyright © 2023 Unity Technologies
优美缔软件(上海)有限公司 版权所有
"Unity"、Unity 徽标及其他 Unity 商标是 Unity Technologies 或其附属机构在美国及其他地区的商标或注册商标。其他名称或品牌是其各自所有者的商标。
公安部备案号:
31010902002961