Skip to content

Latest commit

 

History

History
283 lines (186 loc) · 13 KB

UnityChoseKun.md

File metadata and controls

283 lines (186 loc) · 13 KB

UnityChoseKun

GitHub package.json version GitHub code size in bytes

Introduction

Have you ever experienced time being wasted to complete a build every time for a small setting changed in the GamObject? This tool not only allows to make changes to your GameObject without rebuilding every time, but also can while the actual device is running.

Overview

Tool used to control application built with Unity running on a real device (Switch,Android,iOS,etc) from UnityEditor.

Can adjust the component inside the application that are running on the actual device: UnityChoseKunDemo02

Could show UnityEditor from the device's screen: UnityChoseKunDemo03

What you can do with this project

The following tasks can be performed in the UnityEditor

  • Display the screen rendered on the actual device (PlayerView).
  • Display hierarchy of the scene being played in the actual device (Hierarchy View)
  • Reflect the changes made to the selected GameObject's component to the actual device (Inspector View).

Operating Environment

  • Unity version
    • Unity2018.4.26f1 (Some functions are limited)
    • Unity2019.4.40f1
    • Unity2020.2.2f1
    • Unity2020.3.27f1
    • Unity2021.2.15f1
    • Unity2021.3.1f1
    • Unity2022.3.0f1
  • Platform
    • Android
      • Pixel3XL
      • Pixel4XL
    • iOS
      • iPhone 6S

Adjustable Components

You can make adjustments on the following components

Here is a step on how to add new component/class: Howto_add_class_en.md

Caution

  • Will not take any responsibility for any damage that are caused by using this tool.
  • Cannot be used with Script Debugging.
  • Enabling the Player View makes the device hot. The ammount of CPU resources being used depends on the screen resolution. Before playing the PlayerView, it is recommended to change the screen resolution from Screen in Player Inspector. In Pixel4XL's case, the CPU resources were'nt used at all when the screen resolution was reduced to 604x288.
  • Material is only for checking the content, not writing back the edited content.
  • In order to change the referenced Material's Shader/Texture, you need to Pull them first.
  • Following functions cannot be made in Unity2018:
    • Replace referenced texture.
    • Readback feature of PlayerView's Async GPU.
  • If you quit Unity Editor while the device and UnityChoseKun remain connected, crash will occur inside EditorConnection.instance.DisconnectAll() To prevent that, disconnect from the device by changing the access point of UnityChoseKun to the Editor.

Setup

UnityChoseKun uses a separate RemoteConnect package. Please obtain it together with UnityChoseKun. Setup is completed by adding the obtained package to any Unity project.

git clone https://github.com/katsumasa/RemoteConnect.git
git clone https://github.com/katsumasa/UnityChoseKun.git

How to use

Place the entire contents of this repository under the Asset folder of the UnityProject.

Building

Features

PlayerViewer

Viewer that plays the content displayed on the actual device in UnityEditor.

PlayerView

Launch Method

From Menu, choose Window->UnityChoseKun->Player View. The PlayerView Window shows up.

How to operate

Connect To

Specify the device you want to connect. The connection mechanism is shared with UnityProfiler, so when you switch to one of them, the other one will switch as well.

PlayIcon Play Begin/End
RecIcon Record Begin/End
ScreenShotIcon Save Screenshot
SaveFolderIcon Specify the path of the recording results

Enable Async GPU Readback

If you check this box, you will be able to use Async GPU Readback to process images. This may reduce the load of the MainTharead.

Reflesh Interval

Specify the process interval images being transfered. By giving interval, it may lead to reducing CPU load.

Record Folder

Folder where the recorded results will export to.

Record Count Max

Specify which frame to start record. The recording will automatically stop once you have set the frame.

Record Count

You can seek the recorded result.

UnityChoseKunDemo04

Warning
  • This is a very high-load process.
  • We recommend you to adjust the width and height in SetScreen or skip frame and press Play.

PlayerHierarchy

HierarchyView

Reload

Analyzes scene informartion of the application that are running on actual device, then extract is as a Hierachy Tree. The first step is to run Reload to gather information of the scene. It'll take some time to Reload if the scene holds tens of thousands of GameObjects.

You could change the parent-child relationship of GameObjectsthe same way as in the Editor's Hierarchy does. Also can generate GameObjects or add basic Components with the right-click modal dialog.

NOTE
Adding a Component that is not included in the application will cause an error.

Player Inspector

Windows that allows you to edit contens inside the class of UnityEngine that are running on actual device.

Inspector

Edits the content of selected GameObject's Component in Player Hierarchy. Currently, there are few components are editable. But enable can be editable for almost any components.

InspectorView

  • [Connect To] : Select the device you wish to connectc. It's shared with the Profiler
  • [Add Component] : Add Component to GameObject (Currently in progress).
Component

Inspector_Component

Counts the type and number of components that exists in a scene. Components that are not supported by this tool are counted in the Specified Class.

Texture

Inspector_Texture

Lists the textures that are referenced in a scene as well as textures that are included in resources runned by an app.

  • [Pull] : Obtain list of references form GameObjects that are in the scene and textures included in resources.

You need to run the Pull command before changing the Texture that Material is referencing

Sprite

image

Sorting Layer

image

Shader

Inspector_Shader

List of Shader that are included in Resources and scene of the app running on actual device.

  • [Pull] : Obtain list of references form GameObjects that are in the scene and shaders included in resources.

You need to run the Pull command before changing the Sahder that Material is referencing。

Screen

Inspector_Screen

Edit the static members of the Screen Class.

  • [Pull] : Get the static members of the Screen Class.
  • [Push] : Edited information will show on the actual device.
Time

Inspector_Time

Edit the static members of the Time Class.

  • [Pull] : Get the static members of the Time Class.
  • [Push] : Edited information will show on the actual device.
Application

Inspector_Application

Edit the static members of the Application Class. Also could run Application.Quit().

  • [Pull] : Get the static members of the Application Class.
  • [Push] : Edited information will show on the actual device.
  • [Quit] : Run Application.Quite().
Android

Inspector_AndroidView

You can edit the Android device's specific features.

QualitySettings

QualitySettingsView

You can edit QualitySetting.

OnDemandRendering

ScalableBufferManager

Thats all! Appreciate your comments and feedback!

Katsumasa Kimura: [email protected]