├── UnityProject
├── ProjectSettings
│ ├── ProjectVersion.txt
│ ├── NetworkManager.asset
│ ├── TimeManager.asset
│ ├── EditorBuildSettings.asset
│ ├── UnityAnalyticsManager.asset
│ ├── UnityAdsSettings.asset
│ ├── AudioManager.asset
│ ├── EditorSettings.asset
│ ├── TagManager.asset
│ ├── DynamicsManager.asset
│ ├── Physics2DSettings.asset
│ ├── NavMeshAreas.asset
│ ├── GraphicsSettings.asset
│ ├── QualitySettings.asset
│ ├── InputManager.asset
│ └── ProjectSettings.asset
└── Assets
│ ├── FontAwesome.otf
│ ├── AndroidPlugin.jar
│ ├── Main.unity.meta
│ ├── BatteryMonitor.cs.meta
│ ├── BatteryLevelPlugin.cs.meta
│ ├── AndroidPlugin.jar.meta
│ ├── FontAwesome.otf.meta
│ ├── BatteryLevelPlugin.cs
│ ├── BatteryMonitor.cs
│ └── Main.unity
├── .gitignore
├── AndroidPlugin
├── local.properties
├── AndroidManifest.xml
├── project.properties
├── ant.properties
├── proguard-project.txt
├── src
│ └── com
│ │ └── RSG
│ │ └── AndroidPlugin
│ │ └── AndroidPlugin.java
└── build.xml
├── LICENSE
└── README.md
/UnityProject/ProjectSettings/ProjectVersion.txt:
--------------------------------------------------------------------------------
1 | m_EditorVersion: 5.2.0f3
2 | m_StandardAssetsVersion: 0
3 |
--------------------------------------------------------------------------------
/UnityProject/Assets/FontAwesome.otf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Real-Serious-Games/Unity-Android-Plugin-Example/HEAD/UnityProject/Assets/FontAwesome.otf
--------------------------------------------------------------------------------
/UnityProject/Assets/AndroidPlugin.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Real-Serious-Games/Unity-Android-Plugin-Example/HEAD/UnityProject/Assets/AndroidPlugin.jar
--------------------------------------------------------------------------------
/UnityProject/ProjectSettings/NetworkManager.asset:
--------------------------------------------------------------------------------
1 | %YAML 1.1
2 | %TAG !u! tag:unity3d.com,2011:
3 | --- !u!149 &1
4 | NetworkManager:
5 | m_ObjectHideFlags: 0
6 | m_DebugLevel: 0
7 | m_Sendrate: 15
8 | m_AssetToPrefab: {}
9 |
--------------------------------------------------------------------------------
/UnityProject/Assets/Main.unity.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 789d03261e2f1c14fb5105e90d3442e5
3 | timeCreated: 1441606719
4 | licenseType: Pro
5 | DefaultImporter:
6 | userData:
7 | assetBundleName:
8 | assetBundleVariant:
9 |
--------------------------------------------------------------------------------
/UnityProject/ProjectSettings/TimeManager.asset:
--------------------------------------------------------------------------------
1 | %YAML 1.1
2 | %TAG !u! tag:unity3d.com,2011:
3 | --- !u!5 &1
4 | TimeManager:
5 | m_ObjectHideFlags: 0
6 | Fixed Timestep: .0199999996
7 | Maximum Allowed Timestep: .333333343
8 | m_TimeScale: 1
9 |
--------------------------------------------------------------------------------
/UnityProject/ProjectSettings/EditorBuildSettings.asset:
--------------------------------------------------------------------------------
1 | %YAML 1.1
2 | %TAG !u! tag:unity3d.com,2011:
3 | --- !u!1045 &1
4 | EditorBuildSettings:
5 | m_ObjectHideFlags: 0
6 | serializedVersion: 2
7 | m_Scenes:
8 | - enabled: 1
9 | path: Assets/Main.unity
10 |
--------------------------------------------------------------------------------
/UnityProject/ProjectSettings/UnityAnalyticsManager.asset:
--------------------------------------------------------------------------------
1 | %YAML 1.1
2 | %TAG !u! tag:unity3d.com,2011:
3 | --- !u!303 &1
4 | UnityAnalyticsManager:
5 | m_ObjectHideFlags: 0
6 | m_Enabled: 0
7 | m_InitializeOnStartup: 1
8 | m_TestMode: 0
9 | m_TestEventUrl:
10 | m_TestConfigUrl:
11 |
--------------------------------------------------------------------------------
/UnityProject/ProjectSettings/UnityAdsSettings.asset:
--------------------------------------------------------------------------------
1 | %YAML 1.1
2 | %TAG !u! tag:unity3d.com,2011:
3 | --- !u!292 &1
4 | UnityAdsSettings:
5 | m_ObjectHideFlags: 0
6 | m_Enabled: 0
7 | m_InitializeOnStartup: 1
8 | m_TestMode: 0
9 | m_EnabledPlatforms: 4294967295
10 | m_IosGameId:
11 | m_AndroidGameId:
12 |
--------------------------------------------------------------------------------
/UnityProject/Assets/BatteryMonitor.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 7e6d9620e8092074099aa92c3575bc04
3 | timeCreated: 1441604425
4 | licenseType: Pro
5 | MonoImporter:
6 | serializedVersion: 2
7 | defaultReferences: []
8 | executionOrder: 0
9 | icon: {instanceID: 0}
10 | userData:
11 | assetBundleName:
12 | assetBundleVariant:
13 |
--------------------------------------------------------------------------------
/UnityProject/Assets/BatteryLevelPlugin.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: dc26a525e6cc077498831d85180c09c4
3 | timeCreated: 1441933195
4 | licenseType: Pro
5 | MonoImporter:
6 | serializedVersion: 2
7 | defaultReferences: []
8 | executionOrder: 0
9 | icon: {instanceID: 0}
10 | userData:
11 | assetBundleName:
12 | assetBundleVariant:
13 |
--------------------------------------------------------------------------------
/UnityProject/ProjectSettings/AudioManager.asset:
--------------------------------------------------------------------------------
1 | %YAML 1.1
2 | %TAG !u! tag:unity3d.com,2011:
3 | --- !u!11 &1
4 | AudioManager:
5 | m_ObjectHideFlags: 0
6 | m_Volume: 1
7 | Rolloff Scale: 1
8 | Doppler Factor: 1
9 | Default Speaker Mode: 2
10 | m_SampleRate: 0
11 | m_DSPBufferSize: 0
12 | m_VirtualVoiceCount: 512
13 | m_RealVoiceCount: 32
14 | m_SpatializerPlugin:
15 | m_DisableAudio: 0
16 |
--------------------------------------------------------------------------------
/UnityProject/Assets/AndroidPlugin.jar.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 64f6075c89d35ec4094c7bfb62d61677
3 | timeCreated: 1442544132
4 | licenseType: Pro
5 | PluginImporter:
6 | serializedVersion: 1
7 | iconMap: {}
8 | executionOrder: {}
9 | isPreloaded: 0
10 | platformData:
11 | Any:
12 | enabled: 1
13 | settings: {}
14 | userData:
15 | assetBundleName:
16 | assetBundleVariant:
17 |
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | [Ll]ibrary/
2 | [Tt]emp/
3 | [Oo]bj/
4 | [Bb]uild/
5 |
6 | # Autogenerated VS/MD solution and project files
7 | *.csproj
8 | *.unityproj
9 | *.sln
10 | *.suo
11 | *.tmp
12 | *.user
13 | *.userprefs
14 | *.pidb
15 | *.booproj
16 |
17 | # Unity3D generated meta files
18 | *.pidb.meta
19 |
20 | # Unity3D Generated File On Crash Reports
21 | sysinfo.txt
22 | .DS_Store
23 | AndroidPlugin/bin/
24 | AndroidPlugin/gen/
25 |
--------------------------------------------------------------------------------
/AndroidPlugin/local.properties:
--------------------------------------------------------------------------------
1 | # This file is automatically generated by Android Tools.
2 | # Do not modify this file -- YOUR CHANGES WILL BE ERASED!
3 | #
4 | # This file must *NOT* be checked into Version Control Systems,
5 | # as it contains information specific to your local configuration.
6 |
7 | # location of the SDK. This is only used by Ant
8 | # For customization when using a Version Control System, please read the
9 | # header note.
10 | sdk.dir=C:\\dev\\android-sdk-windows
11 |
--------------------------------------------------------------------------------
/UnityProject/Assets/FontAwesome.otf.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: dc9513c44ff88ed4a84d128248f2eafa
3 | timeCreated: 1441605282
4 | licenseType: Pro
5 | TrueTypeFontImporter:
6 | serializedVersion: 2
7 | fontSize: 16
8 | forceTextureCase: -2
9 | characterSpacing: 1
10 | characterPadding: 0
11 | includeFontData: 1
12 | use2xBehaviour: 0
13 | fontNames: []
14 | customCharacters:
15 | fontRenderingMode: 0
16 | userData:
17 | assetBundleName:
18 | assetBundleVariant:
19 |
--------------------------------------------------------------------------------
/UnityProject/ProjectSettings/EditorSettings.asset:
--------------------------------------------------------------------------------
1 | %YAML 1.1
2 | %TAG !u! tag:unity3d.com,2011:
3 | --- !u!159 &1
4 | EditorSettings:
5 | m_ObjectHideFlags: 0
6 | serializedVersion: 3
7 | m_ExternalVersionControlSupport: Visible Meta Files
8 | m_SerializationMode: 2
9 | m_WebSecurityEmulationEnabled: 0
10 | m_WebSecurityEmulationHostUrl: http://www.mydomain.com/mygame.unity3d
11 | m_DefaultBehaviorMode: 0
12 | m_SpritePackerMode: 2
13 | m_SpritePackerPaddingPower: 1
14 | m_ProjectGenerationIncludedExtensions: txt;xml;fnt;cd
15 | m_ProjectGenerationRootNamespace:
16 |
--------------------------------------------------------------------------------
/AndroidPlugin/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
2 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
--------------------------------------------------------------------------------
/UnityProject/ProjectSettings/TagManager.asset:
--------------------------------------------------------------------------------
1 | %YAML 1.1
2 | %TAG !u! tag:unity3d.com,2011:
3 | --- !u!78 &1
4 | TagManager:
5 | serializedVersion: 2
6 | tags: []
7 | layers:
8 | - Default
9 | - TransparentFX
10 | - Ignore Raycast
11 | -
12 | - Water
13 | - UI
14 | -
15 | -
16 | -
17 | -
18 | -
19 | -
20 | -
21 | -
22 | -
23 | -
24 | -
25 | -
26 | -
27 | -
28 | -
29 | -
30 | -
31 | -
32 | -
33 | -
34 | -
35 | -
36 | -
37 | -
38 | -
39 | -
40 | m_SortingLayers:
41 | - name: Default
42 | uniqueID: 0
43 | locked: 0
44 |
--------------------------------------------------------------------------------
/AndroidPlugin/project.properties:
--------------------------------------------------------------------------------
1 | # This file is automatically generated by Android Tools.
2 | # Do not modify this file -- YOUR CHANGES WILL BE ERASED!
3 | #
4 | # This file must be checked in Version Control Systems.
5 | #
6 | # To customize properties used by the Ant build system edit
7 | # "ant.properties", and override values to adapt the script to your
8 | # project structure.
9 | #
10 | # To enable ProGuard to shrink and obfuscate your code, uncomment this (available properties: sdk.dir, user.home):
11 | #proguard.config=${sdk.dir}/tools/proguard/proguard-android.txt:proguard-project.txt
12 |
13 | android.library=true
14 | # Project target.
15 | target=android-21
16 |
--------------------------------------------------------------------------------
/UnityProject/ProjectSettings/DynamicsManager.asset:
--------------------------------------------------------------------------------
1 | %YAML 1.1
2 | %TAG !u! tag:unity3d.com,2011:
3 | --- !u!55 &1
4 | PhysicsManager:
5 | m_ObjectHideFlags: 0
6 | serializedVersion: 2
7 | m_Gravity: {x: 0, y: -9.81000042, z: 0}
8 | m_DefaultMaterial: {fileID: 0}
9 | m_BounceThreshold: 2
10 | m_SleepThreshold: .00499999989
11 | m_DefaultContactOffset: .00999999978
12 | m_SolverIterationCount: 6
13 | m_QueriesHitTriggers: 1
14 | m_EnableAdaptiveForce: 0
15 | m_LayerCollisionMatrix: ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
16 |
--------------------------------------------------------------------------------
/AndroidPlugin/ant.properties:
--------------------------------------------------------------------------------
1 | # This file is used to override default values used by the Ant build system.
2 | #
3 | # This file must be checked into Version Control Systems, as it is
4 | # integral to the build system of your project.
5 |
6 | # This file is only used by the Ant script.
7 |
8 | # You can use this to override default values such as
9 | # 'source.dir' for the location of your java source folder and
10 | # 'out.dir' for the location of your output folder.
11 |
12 | # You can also use it define how the release builds are signed by declaring
13 | # the following properties:
14 | # 'key.store' for the location of your keystore and
15 | # 'key.alias' for the name of the key to use.
16 | # The password will be asked during the build when you use the 'release' target.
17 |
18 |
--------------------------------------------------------------------------------
/AndroidPlugin/proguard-project.txt:
--------------------------------------------------------------------------------
1 | # To enable ProGuard in your project, edit project.properties
2 | # to define the proguard.config property as described in that file.
3 | #
4 | # Add project specific ProGuard rules here.
5 | # By default, the flags in this file are appended to flags specified
6 | # in ${sdk.dir}/tools/proguard/proguard-android.txt
7 | # You can edit the include path and order by changing the ProGuard
8 | # include property in project.properties.
9 | #
10 | # For more details, see
11 | # http://developer.android.com/guide/developing/tools/proguard.html
12 |
13 | # Add any project specific keep options here:
14 |
15 | # If your project uses WebView with JS, uncomment the following
16 | # and specify the fully qualified class name to the JavaScript interface
17 | # class:
18 | #-keepclassmembers class fqcn.of.javascript.interface.for.webview {
19 | # public *;
20 | #}
21 |
--------------------------------------------------------------------------------
/UnityProject/Assets/BatteryLevelPlugin.cs:
--------------------------------------------------------------------------------
1 | using UnityEngine;
2 | using System;
3 | using System.Collections;
4 |
5 | public class BatteryLevelPlugin
6 | {
7 | public BatteryLevelPlugin()
8 | {
9 |
10 | }
11 |
12 | public static float GetBatteryLevel()
13 | {
14 | if (Application.platform == RuntimePlatform.Android)
15 | {
16 | using (var javaUnityPlayer = new AndroidJavaClass("com.unity3d.player.UnityPlayer"))
17 | {
18 | using (var currentActivity = javaUnityPlayer.GetStatic("currentActivity"))
19 | {
20 | using (var androidPlugin = new AndroidJavaObject("com.RSG.AndroidPlugin.AndroidPlugin", currentActivity))
21 | {
22 | return androidPlugin.Call("GetBatteryPct");
23 | }
24 | }
25 | }
26 | }
27 |
28 | return 1f;
29 | }
30 | }
31 |
--------------------------------------------------------------------------------
/UnityProject/ProjectSettings/Physics2DSettings.asset:
--------------------------------------------------------------------------------
1 | %YAML 1.1
2 | %TAG !u! tag:unity3d.com,2011:
3 | --- !u!19 &1
4 | Physics2DSettings:
5 | m_ObjectHideFlags: 0
6 | serializedVersion: 2
7 | m_Gravity: {x: 0, y: -9.81000042}
8 | m_DefaultMaterial: {fileID: 0}
9 | m_VelocityIterations: 8
10 | m_PositionIterations: 3
11 | m_VelocityThreshold: 1
12 | m_MaxLinearCorrection: .200000003
13 | m_MaxAngularCorrection: 8
14 | m_MaxTranslationSpeed: 100
15 | m_MaxRotationSpeed: 360
16 | m_MinPenetrationForPenalty: .00999999978
17 | m_BaumgarteScale: .200000003
18 | m_BaumgarteTimeOfImpactScale: .75
19 | m_TimeToSleep: .5
20 | m_LinearSleepTolerance: .00999999978
21 | m_AngularSleepTolerance: 2
22 | m_QueriesHitTriggers: 1
23 | m_QueriesStartInColliders: 1
24 | m_ChangeStopsCallbacks: 0
25 | m_LayerCollisionMatrix: ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
26 |
--------------------------------------------------------------------------------
/LICENSE:
--------------------------------------------------------------------------------
1 | The MIT License (MIT)
2 |
3 | Copyright (c) 2015 Real Serious Games
4 |
5 | Permission is hereby granted, free of charge, to any person obtaining a copy
6 | of this software and associated documentation files (the "Software"), to deal
7 | in the Software without restriction, including without limitation the rights
8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | copies of the Software, and to permit persons to whom the Software is
10 | furnished to do so, subject to the following conditions:
11 |
12 | The above copyright notice and this permission notice shall be included in all
13 | copies or substantial portions of the Software.
14 |
15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21 | SOFTWARE.
22 |
23 |
--------------------------------------------------------------------------------
/UnityProject/ProjectSettings/NavMeshAreas.asset:
--------------------------------------------------------------------------------
1 | %YAML 1.1
2 | %TAG !u! tag:unity3d.com,2011:
3 | --- !u!126 &1
4 | NavMeshAreas:
5 | m_ObjectHideFlags: 0
6 | serializedVersion: 2
7 | areas:
8 | - name: Walkable
9 | cost: 1
10 | - name: Not Walkable
11 | cost: 1
12 | - name: Jump
13 | cost: 2
14 | - name:
15 | cost: 1
16 | - name:
17 | cost: 1
18 | - name:
19 | cost: 1
20 | - name:
21 | cost: 1
22 | - name:
23 | cost: 1
24 | - name:
25 | cost: 1
26 | - name:
27 | cost: 1
28 | - name:
29 | cost: 1
30 | - name:
31 | cost: 1
32 | - name:
33 | cost: 1
34 | - name:
35 | cost: 1
36 | - name:
37 | cost: 1
38 | - name:
39 | cost: 1
40 | - name:
41 | cost: 1
42 | - name:
43 | cost: 1
44 | - name:
45 | cost: 1
46 | - name:
47 | cost: 1
48 | - name:
49 | cost: 1
50 | - name:
51 | cost: 1
52 | - name:
53 | cost: 1
54 | - name:
55 | cost: 1
56 | - name:
57 | cost: 1
58 | - name:
59 | cost: 1
60 | - name:
61 | cost: 1
62 | - name:
63 | cost: 1
64 | - name:
65 | cost: 1
66 | - name:
67 | cost: 1
68 | - name:
69 | cost: 1
70 | - name:
71 | cost: 1
72 |
--------------------------------------------------------------------------------
/UnityProject/ProjectSettings/GraphicsSettings.asset:
--------------------------------------------------------------------------------
1 | %YAML 1.1
2 | %TAG !u! tag:unity3d.com,2011:
3 | --- !u!30 &1
4 | GraphicsSettings:
5 | m_ObjectHideFlags: 0
6 | serializedVersion: 4
7 | m_Deferred:
8 | m_Mode: 1
9 | m_Shader: {fileID: 69, guid: 0000000000000000f000000000000000, type: 0}
10 | m_DeferredReflections:
11 | m_Mode: 1
12 | m_Shader: {fileID: 74, guid: 0000000000000000f000000000000000, type: 0}
13 | m_LegacyDeferred:
14 | m_Mode: 1
15 | m_Shader: {fileID: 63, guid: 0000000000000000f000000000000000, type: 0}
16 | m_AlwaysIncludedShaders:
17 | - {fileID: 7, guid: 0000000000000000f000000000000000, type: 0}
18 | - {fileID: 15104, guid: 0000000000000000f000000000000000, type: 0}
19 | - {fileID: 15105, guid: 0000000000000000f000000000000000, type: 0}
20 | - {fileID: 15106, guid: 0000000000000000f000000000000000, type: 0}
21 | - {fileID: 10770, guid: 0000000000000000f000000000000000, type: 0}
22 | - {fileID: 10782, guid: 0000000000000000f000000000000000, type: 0}
23 | m_PreloadedShaders: []
24 | m_LightmapStripping: 0
25 | m_LightmapKeepPlain: 1
26 | m_LightmapKeepDirCombined: 1
27 | m_LightmapKeepDirSeparate: 1
28 | m_LightmapKeepDynamicPlain: 1
29 | m_LightmapKeepDynamicDirCombined: 1
30 | m_LightmapKeepDynamicDirSeparate: 1
31 | m_FogStripping: 0
32 | m_FogKeepLinear: 1
33 | m_FogKeepExp: 1
34 | m_FogKeepExp2: 1
35 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # Unity-Android-Plugin-Example
2 |
3 | A simple example showing how to call native Android Java code from Unity.
4 | http://www.what-could-possibly-go-wrong.com/creating-a-native-android-plugin-for-unity3d/
5 |
6 | The UnityProject directory contains the Unity project (set up with Unity 5.2), with everything you need to build
7 | it for Android.
8 |
9 | The AndroidPlugin directory contains the source to the native Android plugin used in the
10 | Unity project (AndroidPlugin.jar), which has been tested against Android 5.0 (API level 21).
11 |
12 | ## Building
13 |
14 | To build the Unity project, just open it in Unity, connect an Android device and go to *Build
15 | and Run* in the menu. There is already a compiled version of the Android plugin (AndroidPlugin.jar)
16 | in the Unity project `Assets` folder so there is no need to compile it first just to run the
17 | program.
18 |
19 | To build the Android plugin, first make sure you have installed the
20 | [Android SDK](https://developer.android.com/sdk/index.html) and [Ant](http://ant.apache.org/).
21 | First, either make sure your `ANDROID_HOME` environment variable is set to your installation
22 | of the Android SDK, or edit the `sdk.dir=...` line in the `local.properties` file inside
23 | the AndroidPlugin folder.
24 |
25 | Once that is all configured, navigate to AndroidPlugin and run
26 | ```
27 | ant jar
28 | ```
29 | Then copy the compiled `AndroidPlugin.jar` from `AndroidPlugin/bin` to `UnityProject/Assets`.
30 |
31 |
--------------------------------------------------------------------------------
/AndroidPlugin/src/com/RSG/AndroidPlugin/AndroidPlugin.java:
--------------------------------------------------------------------------------
1 | package com.RSG.AndroidPlugin;
2 |
3 | import android.os.Environment;
4 | import android.os.BatteryManager;
5 | import android.content.Intent;
6 | import android.content.IntentFilter;
7 | import android.content.Context;
8 |
9 | public class AndroidPlugin
10 | {
11 | // Needed to get the battery level.
12 | private Context context;
13 |
14 | public AndroidPlugin(Context context)
15 | {
16 | this.context = context;
17 | }
18 |
19 | // Return the battery level as a float between 0 and 1 (1 being fully charged, 0 fulled discharged)
20 | public float GetBatteryPct()
21 | {
22 | Intent batteryStatus = GetBatteryStatusIntent();
23 |
24 | int level = batteryStatus.getIntExtra(BatteryManager.EXTRA_LEVEL, -1);
25 | int scale = batteryStatus.getIntExtra(BatteryManager.EXTRA_SCALE, -1);
26 |
27 | float batteryPct = level / (float)scale;
28 | return batteryPct;
29 | }
30 |
31 | // Return whether or not we're currently on charge
32 | public boolean IsBatteryCharging()
33 | {
34 | Intent batteryStatus = GetBatteryStatusIntent();
35 |
36 | int status = batteryStatus.getIntExtra(BatteryManager.EXTRA_STATUS, -1);
37 | return status == BatteryManager.BATTERY_STATUS_CHARGING ||
38 | status == BatteryManager.BATTERY_STATUS_FULL;
39 | }
40 |
41 | private Intent GetBatteryStatusIntent()
42 | {
43 | IntentFilter ifilter = new IntentFilter(Intent.ACTION_BATTERY_CHANGED);
44 | return context.registerReceiver(null, ifilter);
45 | }
46 | }
--------------------------------------------------------------------------------
/UnityProject/Assets/BatteryMonitor.cs:
--------------------------------------------------------------------------------
1 | using UnityEngine;
2 | using UnityEngine.UI;
3 | using System;
4 | using System.Collections;
5 |
6 | public class BatteryMonitor : MonoBehaviour
7 | {
8 | public Text batteryLevelText;
9 | public Text batteryLevelIcon; // We're using fonticons so even though this looks like a picture, it's actually a text widget.
10 |
11 | // Character codes to use for the Font Awesome icons to use.
12 | static readonly string BATTERY_LEVEL_100 = Char.ConvertFromUtf32(0xf240);
13 | static readonly string BATTERY_LEVEL_75 = Char.ConvertFromUtf32(0xf241);
14 | static readonly string BATTERY_LEVEL_50 = Char.ConvertFromUtf32(0xf242);
15 | static readonly string BATTERY_LEVEL_25 = Char.ConvertFromUtf32(0xf243);
16 | static readonly string BATTERY_LEVEL_0 = Char.ConvertFromUtf32(0xf244);
17 |
18 | // Update is called once per frame
19 | void Update ()
20 | {
21 | UpdateStatusIndicators();
22 | }
23 |
24 | ///
25 | /// Find the current device battery level and update indicators in the
26 | /// UI accordingly.
27 | ///
28 | void UpdateStatusIndicators()
29 | {
30 | var currentBatteryLevel = BatteryLevelPlugin.GetBatteryLevel() * 100f;
31 | batteryLevelText.text = String.Format("{0}%", currentBatteryLevel);
32 |
33 | // Show the icon that matches the current level most closely.
34 | if (currentBatteryLevel >= 88)
35 | {
36 | batteryLevelIcon.text = BATTERY_LEVEL_100;
37 | }
38 | else if (currentBatteryLevel >= 63)
39 | {
40 | batteryLevelIcon.text = BATTERY_LEVEL_75;
41 | }
42 | else if (currentBatteryLevel >= 38)
43 | {
44 | batteryLevelIcon.text = BATTERY_LEVEL_50;
45 | }
46 | else if (currentBatteryLevel >= 13)
47 | {
48 | batteryLevelIcon.text = BATTERY_LEVEL_25;
49 | }
50 | else
51 | {
52 | batteryLevelIcon.text = BATTERY_LEVEL_0;
53 | }
54 | }
55 | }
56 |
--------------------------------------------------------------------------------
/AndroidPlugin/build.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
7 |
8 |
9 |
29 |
30 |
31 |
35 |
36 |
37 |
38 |
39 |
40 |
49 |
50 |
51 |
52 |
56 |
57 |
69 |
70 |
71 |
89 |
90 |
91 |
92 |
93 |
96 |
97 |
98 |
99 |
--------------------------------------------------------------------------------
/UnityProject/ProjectSettings/QualitySettings.asset:
--------------------------------------------------------------------------------
1 | %YAML 1.1
2 | %TAG !u! tag:unity3d.com,2011:
3 | --- !u!47 &1
4 | QualitySettings:
5 | m_ObjectHideFlags: 0
6 | serializedVersion: 5
7 | m_CurrentQuality: 5
8 | m_QualitySettings:
9 | - serializedVersion: 2
10 | name: Fastest
11 | pixelLightCount: 0
12 | shadows: 0
13 | shadowResolution: 0
14 | shadowProjection: 1
15 | shadowCascades: 1
16 | shadowDistance: 15
17 | shadowNearPlaneOffset: 2
18 | shadowCascade2Split: .333333343
19 | shadowCascade4Split: {x: .0666666701, y: .200000003, z: .466666669}
20 | blendWeights: 1
21 | textureQuality: 1
22 | anisotropicTextures: 0
23 | antiAliasing: 0
24 | softParticles: 0
25 | softVegetation: 0
26 | realtimeReflectionProbes: 0
27 | billboardsFaceCameraPosition: 0
28 | vSyncCount: 0
29 | lodBias: .300000012
30 | maximumLODLevel: 0
31 | particleRaycastBudget: 4
32 | excludedTargetPlatforms: []
33 | - serializedVersion: 2
34 | name: Fast
35 | pixelLightCount: 0
36 | shadows: 0
37 | shadowResolution: 0
38 | shadowProjection: 1
39 | shadowCascades: 1
40 | shadowDistance: 20
41 | shadowNearPlaneOffset: 2
42 | shadowCascade2Split: .333333343
43 | shadowCascade4Split: {x: .0666666701, y: .200000003, z: .466666669}
44 | blendWeights: 2
45 | textureQuality: 0
46 | anisotropicTextures: 0
47 | antiAliasing: 0
48 | softParticles: 0
49 | softVegetation: 0
50 | realtimeReflectionProbes: 0
51 | billboardsFaceCameraPosition: 0
52 | vSyncCount: 0
53 | lodBias: .400000006
54 | maximumLODLevel: 0
55 | particleRaycastBudget: 16
56 | excludedTargetPlatforms: []
57 | - serializedVersion: 2
58 | name: Simple
59 | pixelLightCount: 1
60 | shadows: 1
61 | shadowResolution: 0
62 | shadowProjection: 1
63 | shadowCascades: 1
64 | shadowDistance: 20
65 | shadowNearPlaneOffset: 2
66 | shadowCascade2Split: .333333343
67 | shadowCascade4Split: {x: .0666666701, y: .200000003, z: .466666669}
68 | blendWeights: 2
69 | textureQuality: 0
70 | anisotropicTextures: 1
71 | antiAliasing: 0
72 | softParticles: 0
73 | softVegetation: 0
74 | realtimeReflectionProbes: 0
75 | billboardsFaceCameraPosition: 0
76 | vSyncCount: 0
77 | lodBias: .699999988
78 | maximumLODLevel: 0
79 | particleRaycastBudget: 64
80 | excludedTargetPlatforms: []
81 | - serializedVersion: 2
82 | name: Good
83 | pixelLightCount: 2
84 | shadows: 2
85 | shadowResolution: 1
86 | shadowProjection: 1
87 | shadowCascades: 2
88 | shadowDistance: 40
89 | shadowNearPlaneOffset: 2
90 | shadowCascade2Split: .333333343
91 | shadowCascade4Split: {x: .0666666701, y: .200000003, z: .466666669}
92 | blendWeights: 2
93 | textureQuality: 0
94 | anisotropicTextures: 1
95 | antiAliasing: 0
96 | softParticles: 0
97 | softVegetation: 1
98 | realtimeReflectionProbes: 1
99 | billboardsFaceCameraPosition: 1
100 | vSyncCount: 1
101 | lodBias: 1
102 | maximumLODLevel: 0
103 | particleRaycastBudget: 256
104 | excludedTargetPlatforms: []
105 | - serializedVersion: 2
106 | name: Beautiful
107 | pixelLightCount: 3
108 | shadows: 2
109 | shadowResolution: 2
110 | shadowProjection: 1
111 | shadowCascades: 2
112 | shadowDistance: 70
113 | shadowNearPlaneOffset: 2
114 | shadowCascade2Split: .333333343
115 | shadowCascade4Split: {x: .0666666701, y: .200000003, z: .466666669}
116 | blendWeights: 4
117 | textureQuality: 0
118 | anisotropicTextures: 2
119 | antiAliasing: 2
120 | softParticles: 1
121 | softVegetation: 1
122 | realtimeReflectionProbes: 1
123 | billboardsFaceCameraPosition: 1
124 | vSyncCount: 1
125 | lodBias: 1.5
126 | maximumLODLevel: 0
127 | particleRaycastBudget: 1024
128 | excludedTargetPlatforms: []
129 | - serializedVersion: 2
130 | name: Fantastic
131 | pixelLightCount: 4
132 | shadows: 2
133 | shadowResolution: 2
134 | shadowProjection: 1
135 | shadowCascades: 4
136 | shadowDistance: 150
137 | shadowNearPlaneOffset: 2
138 | shadowCascade2Split: .333333343
139 | shadowCascade4Split: {x: .0666666701, y: .200000003, z: .466666669}
140 | blendWeights: 4
141 | textureQuality: 0
142 | anisotropicTextures: 2
143 | antiAliasing: 2
144 | softParticles: 1
145 | softVegetation: 1
146 | realtimeReflectionProbes: 1
147 | billboardsFaceCameraPosition: 1
148 | vSyncCount: 1
149 | lodBias: 2
150 | maximumLODLevel: 0
151 | particleRaycastBudget: 4096
152 | excludedTargetPlatforms: []
153 | m_PerPlatformDefaultQuality:
154 | Android: 2
155 | BlackBerry: 2
156 | GLES Emulation: 5
157 | PS3: 5
158 | PS4: 5
159 | PSM: 5
160 | PSP2: 5
161 | Samsung TV: 2
162 | Standalone: 5
163 | Tizen: 2
164 | WP8: 5
165 | Web: 5
166 | WebGL: 3
167 | Windows Store Apps: 5
168 | XBOX360: 5
169 | XboxOne: 5
170 | iPhone: 2
171 |
--------------------------------------------------------------------------------
/UnityProject/ProjectSettings/InputManager.asset:
--------------------------------------------------------------------------------
1 | %YAML 1.1
2 | %TAG !u! tag:unity3d.com,2011:
3 | --- !u!13 &1
4 | InputManager:
5 | m_ObjectHideFlags: 0
6 | serializedVersion: 2
7 | m_Axes:
8 | - serializedVersion: 3
9 | m_Name: Horizontal
10 | descriptiveName:
11 | descriptiveNegativeName:
12 | negativeButton: left
13 | positiveButton: right
14 | altNegativeButton: a
15 | altPositiveButton: d
16 | gravity: 3
17 | dead: .00100000005
18 | sensitivity: 3
19 | snap: 1
20 | invert: 0
21 | type: 0
22 | axis: 0
23 | joyNum: 0
24 | - serializedVersion: 3
25 | m_Name: Vertical
26 | descriptiveName:
27 | descriptiveNegativeName:
28 | negativeButton: down
29 | positiveButton: up
30 | altNegativeButton: s
31 | altPositiveButton: w
32 | gravity: 3
33 | dead: .00100000005
34 | sensitivity: 3
35 | snap: 1
36 | invert: 0
37 | type: 0
38 | axis: 0
39 | joyNum: 0
40 | - serializedVersion: 3
41 | m_Name: Fire1
42 | descriptiveName:
43 | descriptiveNegativeName:
44 | negativeButton:
45 | positiveButton: left ctrl
46 | altNegativeButton:
47 | altPositiveButton: mouse 0
48 | gravity: 1000
49 | dead: .00100000005
50 | sensitivity: 1000
51 | snap: 0
52 | invert: 0
53 | type: 0
54 | axis: 0
55 | joyNum: 0
56 | - serializedVersion: 3
57 | m_Name: Fire2
58 | descriptiveName:
59 | descriptiveNegativeName:
60 | negativeButton:
61 | positiveButton: left alt
62 | altNegativeButton:
63 | altPositiveButton: mouse 1
64 | gravity: 1000
65 | dead: .00100000005
66 | sensitivity: 1000
67 | snap: 0
68 | invert: 0
69 | type: 0
70 | axis: 0
71 | joyNum: 0
72 | - serializedVersion: 3
73 | m_Name: Fire3
74 | descriptiveName:
75 | descriptiveNegativeName:
76 | negativeButton:
77 | positiveButton: left shift
78 | altNegativeButton:
79 | altPositiveButton: mouse 2
80 | gravity: 1000
81 | dead: .00100000005
82 | sensitivity: 1000
83 | snap: 0
84 | invert: 0
85 | type: 0
86 | axis: 0
87 | joyNum: 0
88 | - serializedVersion: 3
89 | m_Name: Jump
90 | descriptiveName:
91 | descriptiveNegativeName:
92 | negativeButton:
93 | positiveButton: space
94 | altNegativeButton:
95 | altPositiveButton:
96 | gravity: 1000
97 | dead: .00100000005
98 | sensitivity: 1000
99 | snap: 0
100 | invert: 0
101 | type: 0
102 | axis: 0
103 | joyNum: 0
104 | - serializedVersion: 3
105 | m_Name: Mouse X
106 | descriptiveName:
107 | descriptiveNegativeName:
108 | negativeButton:
109 | positiveButton:
110 | altNegativeButton:
111 | altPositiveButton:
112 | gravity: 0
113 | dead: 0
114 | sensitivity: .100000001
115 | snap: 0
116 | invert: 0
117 | type: 1
118 | axis: 0
119 | joyNum: 0
120 | - serializedVersion: 3
121 | m_Name: Mouse Y
122 | descriptiveName:
123 | descriptiveNegativeName:
124 | negativeButton:
125 | positiveButton:
126 | altNegativeButton:
127 | altPositiveButton:
128 | gravity: 0
129 | dead: 0
130 | sensitivity: .100000001
131 | snap: 0
132 | invert: 0
133 | type: 1
134 | axis: 1
135 | joyNum: 0
136 | - serializedVersion: 3
137 | m_Name: Mouse ScrollWheel
138 | descriptiveName:
139 | descriptiveNegativeName:
140 | negativeButton:
141 | positiveButton:
142 | altNegativeButton:
143 | altPositiveButton:
144 | gravity: 0
145 | dead: 0
146 | sensitivity: .100000001
147 | snap: 0
148 | invert: 0
149 | type: 1
150 | axis: 2
151 | joyNum: 0
152 | - serializedVersion: 3
153 | m_Name: Horizontal
154 | descriptiveName:
155 | descriptiveNegativeName:
156 | negativeButton:
157 | positiveButton:
158 | altNegativeButton:
159 | altPositiveButton:
160 | gravity: 0
161 | dead: .189999998
162 | sensitivity: 1
163 | snap: 0
164 | invert: 0
165 | type: 2
166 | axis: 0
167 | joyNum: 0
168 | - serializedVersion: 3
169 | m_Name: Vertical
170 | descriptiveName:
171 | descriptiveNegativeName:
172 | negativeButton:
173 | positiveButton:
174 | altNegativeButton:
175 | altPositiveButton:
176 | gravity: 0
177 | dead: .189999998
178 | sensitivity: 1
179 | snap: 0
180 | invert: 1
181 | type: 2
182 | axis: 1
183 | joyNum: 0
184 | - serializedVersion: 3
185 | m_Name: Fire1
186 | descriptiveName:
187 | descriptiveNegativeName:
188 | negativeButton:
189 | positiveButton: joystick button 0
190 | altNegativeButton:
191 | altPositiveButton:
192 | gravity: 1000
193 | dead: .00100000005
194 | sensitivity: 1000
195 | snap: 0
196 | invert: 0
197 | type: 0
198 | axis: 0
199 | joyNum: 0
200 | - serializedVersion: 3
201 | m_Name: Fire2
202 | descriptiveName:
203 | descriptiveNegativeName:
204 | negativeButton:
205 | positiveButton: joystick button 1
206 | altNegativeButton:
207 | altPositiveButton:
208 | gravity: 1000
209 | dead: .00100000005
210 | sensitivity: 1000
211 | snap: 0
212 | invert: 0
213 | type: 0
214 | axis: 0
215 | joyNum: 0
216 | - serializedVersion: 3
217 | m_Name: Fire3
218 | descriptiveName:
219 | descriptiveNegativeName:
220 | negativeButton:
221 | positiveButton: joystick button 2
222 | altNegativeButton:
223 | altPositiveButton:
224 | gravity: 1000
225 | dead: .00100000005
226 | sensitivity: 1000
227 | snap: 0
228 | invert: 0
229 | type: 0
230 | axis: 0
231 | joyNum: 0
232 | - serializedVersion: 3
233 | m_Name: Jump
234 | descriptiveName:
235 | descriptiveNegativeName:
236 | negativeButton:
237 | positiveButton: joystick button 3
238 | altNegativeButton:
239 | altPositiveButton:
240 | gravity: 1000
241 | dead: .00100000005
242 | sensitivity: 1000
243 | snap: 0
244 | invert: 0
245 | type: 0
246 | axis: 0
247 | joyNum: 0
248 | - serializedVersion: 3
249 | m_Name: Submit
250 | descriptiveName:
251 | descriptiveNegativeName:
252 | negativeButton:
253 | positiveButton: return
254 | altNegativeButton:
255 | altPositiveButton: joystick button 0
256 | gravity: 1000
257 | dead: .00100000005
258 | sensitivity: 1000
259 | snap: 0
260 | invert: 0
261 | type: 0
262 | axis: 0
263 | joyNum: 0
264 | - serializedVersion: 3
265 | m_Name: Submit
266 | descriptiveName:
267 | descriptiveNegativeName:
268 | negativeButton:
269 | positiveButton: enter
270 | altNegativeButton:
271 | altPositiveButton: space
272 | gravity: 1000
273 | dead: .00100000005
274 | sensitivity: 1000
275 | snap: 0
276 | invert: 0
277 | type: 0
278 | axis: 0
279 | joyNum: 0
280 | - serializedVersion: 3
281 | m_Name: Cancel
282 | descriptiveName:
283 | descriptiveNegativeName:
284 | negativeButton:
285 | positiveButton: escape
286 | altNegativeButton:
287 | altPositiveButton: joystick button 1
288 | gravity: 1000
289 | dead: .00100000005
290 | sensitivity: 1000
291 | snap: 0
292 | invert: 0
293 | type: 0
294 | axis: 0
295 | joyNum: 0
296 |
--------------------------------------------------------------------------------
/UnityProject/ProjectSettings/ProjectSettings.asset:
--------------------------------------------------------------------------------
1 | %YAML 1.1
2 | %TAG !u! tag:unity3d.com,2011:
3 | --- !u!129 &1
4 | PlayerSettings:
5 | m_ObjectHideFlags: 0
6 | serializedVersion: 7
7 | AndroidProfiler: 0
8 | defaultScreenOrientation: 4
9 | targetDevice: 2
10 | targetResolution: 0
11 | accelerometerFrequency: 60
12 | companyName: RSG
13 | productName: Unity Android Plugin Example
14 | defaultCursor: {fileID: 0}
15 | cursorHotspot: {x: 0, y: 0}
16 | m_ShowUnitySplashScreen: 1
17 | defaultScreenWidth: 1024
18 | defaultScreenHeight: 768
19 | defaultScreenWidthWeb: 960
20 | defaultScreenHeightWeb: 600
21 | m_RenderingPath: 1
22 | m_MobileRenderingPath: 1
23 | m_ActiveColorSpace: 0
24 | m_MTRendering: 1
25 | m_MobileMTRendering: 0
26 | m_Stereoscopic3D: 0
27 | iosShowActivityIndicatorOnLoading: -1
28 | androidShowActivityIndicatorOnLoading: -1
29 | iosAppInBackgroundBehavior: 0
30 | displayResolutionDialog: 1
31 | allowedAutorotateToPortrait: 1
32 | allowedAutorotateToPortraitUpsideDown: 1
33 | allowedAutorotateToLandscapeRight: 1
34 | allowedAutorotateToLandscapeLeft: 1
35 | useOSAutorotation: 1
36 | use32BitDisplayBuffer: 1
37 | disableDepthAndStencilBuffers: 0
38 | defaultIsFullScreen: 1
39 | defaultIsNativeResolution: 1
40 | runInBackground: 0
41 | captureSingleScreen: 0
42 | Override IPod Music: 0
43 | Prepare IOS For Recording: 0
44 | submitAnalytics: 1
45 | usePlayerLog: 1
46 | bakeCollisionMeshes: 0
47 | forceSingleInstance: 0
48 | resizableWindow: 0
49 | useMacAppStoreValidation: 0
50 | gpuSkinning: 0
51 | xboxPIXTextureCapture: 0
52 | xboxEnableAvatar: 0
53 | xboxEnableKinect: 0
54 | xboxEnableKinectAutoTracking: 0
55 | xboxEnableFitness: 0
56 | visibleInBackground: 0
57 | macFullscreenMode: 2
58 | d3d9FullscreenMode: 1
59 | d3d11FullscreenMode: 1
60 | xboxSpeechDB: 0
61 | xboxEnableHeadOrientation: 0
62 | xboxEnableGuest: 0
63 | n3dsDisableStereoscopicView: 0
64 | n3dsEnableSharedListOpt: 1
65 | n3dsEnableVSync: 0
66 | xboxOneResolution: 0
67 | ps3SplashScreen: {fileID: 0}
68 | videoMemoryForVertexBuffers: 0
69 | psp2PowerMode: 0
70 | psp2AcquireBGM: 1
71 | wiiUTVResolution: 0
72 | wiiUGamePadMSAA: 1
73 | wiiUSupportsNunchuk: 0
74 | wiiUSupportsClassicController: 0
75 | wiiUSupportsBalanceBoard: 0
76 | wiiUSupportsMotionPlus: 0
77 | wiiUSupportsProController: 0
78 | wiiUAllowScreenCapture: 1
79 | wiiUControllerCount: 0
80 | m_SupportedAspectRatios:
81 | 4:3: 1
82 | 5:4: 1
83 | 16:10: 1
84 | 16:9: 1
85 | Others: 1
86 | bundleIdentifier: com.RSG.AndroidPluginExample
87 | bundleVersion: 1.0
88 | preloadedAssets: []
89 | metroEnableIndependentInputSource: 0
90 | metroEnableLowLatencyPresentationAPI: 0
91 | xboxOneDisableKinectGpuReservation: 0
92 | virtualRealitySupported: 0
93 | productGUID: bd21acdb011a9a045b7e0fe88dddb087
94 | AndroidBundleVersionCode: 1
95 | AndroidMinSdkVersion: 9
96 | AndroidPreferredInstallLocation: 1
97 | aotOptions:
98 | apiCompatibilityLevel: 2
99 | stripEngineCode: 1
100 | iPhoneStrippingLevel: 0
101 | iPhoneScriptCallOptimization: 0
102 | iPhoneBuildNumber: 0
103 | ForceInternetPermission: 0
104 | ForceSDCardPermission: 0
105 | CreateWallpaper: 0
106 | APKExpansionFiles: 0
107 | preloadShaders: 0
108 | StripUnusedMeshComponents: 0
109 | VertexChannelCompressionMask:
110 | serializedVersion: 2
111 | m_Bits: 238
112 | iPhoneSdkVersion: 988
113 | iPhoneTargetOSVersion: 22
114 | uIPrerenderedIcon: 0
115 | uIRequiresPersistentWiFi: 0
116 | uIStatusBarHidden: 1
117 | uIExitOnSuspend: 0
118 | uIStatusBarStyle: 0
119 | iPhoneSplashScreen: {fileID: 0}
120 | iPhoneHighResSplashScreen: {fileID: 0}
121 | iPhoneTallHighResSplashScreen: {fileID: 0}
122 | iPhone47inSplashScreen: {fileID: 0}
123 | iPhone55inPortraitSplashScreen: {fileID: 0}
124 | iPhone55inLandscapeSplashScreen: {fileID: 0}
125 | iPadPortraitSplashScreen: {fileID: 0}
126 | iPadHighResPortraitSplashScreen: {fileID: 0}
127 | iPadLandscapeSplashScreen: {fileID: 0}
128 | iPadHighResLandscapeSplashScreen: {fileID: 0}
129 | iOSLaunchScreenType: 0
130 | iOSLaunchScreenPortrait: {fileID: 0}
131 | iOSLaunchScreenLandscape: {fileID: 0}
132 | iOSLaunchScreenBackgroundColor:
133 | serializedVersion: 2
134 | rgba: 0
135 | iOSLaunchScreenFillPct: 100
136 | iOSLaunchScreenSize: 100
137 | iOSLaunchScreenCustomXibPath:
138 | AndroidTargetDevice: 0
139 | AndroidSplashScreenScale: 0
140 | androidSplashScreen: {fileID: 0}
141 | AndroidKeystoreName:
142 | AndroidKeyaliasName:
143 | AndroidTVCompatibility: 1
144 | AndroidIsGame: 1
145 | androidEnableBanner: 1
146 | m_AndroidBanners:
147 | - width: 320
148 | height: 180
149 | banner: {fileID: 0}
150 | androidGamepadSupportLevel: 0
151 | resolutionDialogBanner: {fileID: 0}
152 | m_BuildTargetIcons:
153 | - m_BuildTarget:
154 | m_Icons:
155 | - m_Icon: {fileID: 0}
156 | m_Size: 128
157 | m_BuildTargetBatching: []
158 | m_BuildTargetGraphicsAPIs: []
159 | webPlayerTemplate: APPLICATION:Default
160 | m_TemplateCustomTags: {}
161 | wiiUTitleID: 0005000011000000
162 | wiiUGroupID: 00010000
163 | wiiUCommonSaveSize: 4096
164 | wiiUAccountSaveSize: 2048
165 | wiiUOlvAccessKey: 0
166 | wiiUTinCode: 0
167 | wiiUJoinGameId: 0
168 | wiiUJoinGameModeMask: 0000000000000000
169 | wiiUCommonBossSize: 0
170 | wiiUAccountBossSize: 0
171 | wiiUAddOnUniqueIDs: []
172 | wiiUMainThreadStackSize: 3072
173 | wiiULoaderThreadStackSize: 1024
174 | wiiUSystemHeapSize: 128
175 | wiiUTVStartupScreen: {fileID: 0}
176 | wiiUGamePadStartupScreen: {fileID: 0}
177 | wiiUProfilerLibPath:
178 | actionOnDotNetUnhandledException: 1
179 | enableInternalProfiler: 0
180 | logObjCUncaughtExceptions: 1
181 | enableCrashReportAPI: 0
182 | locationUsageDescription:
183 | XboxTitleId:
184 | XboxImageXexPath:
185 | XboxSpaPath:
186 | XboxGenerateSpa: 0
187 | XboxDeployKinectResources: 0
188 | XboxSplashScreen: {fileID: 0}
189 | xboxEnableSpeech: 0
190 | xboxAdditionalTitleMemorySize: 0
191 | xboxDeployKinectHeadOrientation: 0
192 | xboxDeployKinectHeadPosition: 0
193 | ps3TitleConfigPath:
194 | ps3DLCConfigPath:
195 | ps3ThumbnailPath:
196 | ps3BackgroundPath:
197 | ps3SoundPath:
198 | ps3NPAgeRating: 12
199 | ps3TrophyCommId:
200 | ps3NpCommunicationPassphrase:
201 | ps3TrophyPackagePath:
202 | ps3BootCheckMaxSaveGameSizeKB: 128
203 | ps3TrophyCommSig:
204 | ps3SaveGameSlots: 1
205 | ps3TrialMode: 0
206 | ps3VideoMemoryForAudio: 0
207 | ps3EnableVerboseMemoryStats: 0
208 | ps3UseSPUForUmbra: 0
209 | ps3EnableMoveSupport: 1
210 | ps3DisableDolbyEncoding: 0
211 | ps4NPAgeRating: 12
212 | ps4NPTitleSecret:
213 | ps4NPTrophyPackPath:
214 | ps4ParentalLevel: 1
215 | ps4ContentID: ED1633-NPXX51362_00-0000000000000000
216 | ps4Category: 0
217 | ps4MasterVersion: 01.00
218 | ps4AppVersion: 01.00
219 | ps4AppType: 0
220 | ps4ParamSfxPath:
221 | ps4VideoOutPixelFormat: 0
222 | ps4VideoOutResolution: 4
223 | ps4PronunciationXMLPath:
224 | ps4PronunciationSIGPath:
225 | ps4BackgroundImagePath:
226 | ps4StartupImagePath:
227 | ps4SaveDataImagePath:
228 | ps4SdkOverride:
229 | ps4BGMPath:
230 | ps4ShareFilePath:
231 | ps4NPtitleDatPath:
232 | ps4RemotePlayKeyAssignment: -1
233 | ps4RemotePlayKeyMappingDir:
234 | ps4EnterButtonAssignment: 1
235 | ps4ApplicationParam1: 0
236 | ps4ApplicationParam2: 0
237 | ps4ApplicationParam3: 0
238 | ps4ApplicationParam4: 0
239 | ps4DownloadDataSize: 0
240 | ps4GarlicHeapSize: 2048
241 | ps4Passcode: frAQBc8Wsa1xVPfvJcrgRYwTiizs2trQ
242 | ps4pnSessions: 1
243 | ps4pnPresence: 1
244 | ps4pnFriends: 1
245 | ps4pnGameCustomData: 1
246 | playerPrefsSupport: 0
247 | ps4ReprojectionSupport: 0
248 | ps4attribUserManagement: 0
249 | ps4attribMoveSupport: 0
250 | ps4attrib3DSupport: 0
251 | ps4attribShareSupport: 0
252 | monoEnv:
253 | psp2Splashimage: {fileID: 0}
254 | psp2NPTrophyPackPath:
255 | psp2NPSupportGBMorGJP: 0
256 | psp2NPAgeRating: 12
257 | psp2NPTitleDatPath:
258 | psp2NPCommsID:
259 | psp2NPCommunicationsID:
260 | psp2NPCommsPassphrase:
261 | psp2NPCommsSig:
262 | psp2ParamSfxPath:
263 | psp2ManualPath:
264 | psp2LiveAreaGatePath:
265 | psp2LiveAreaBackroundPath:
266 | psp2LiveAreaPath:
267 | psp2LiveAreaTrialPath:
268 | psp2PatchChangeInfoPath:
269 | psp2PatchOriginalPackage:
270 | psp2PackagePassword: F69AzBlax3CF3EDNhm3soLBPh71Yexui
271 | psp2KeystoneFile:
272 | psp2MemoryExpansionMode: 0
273 | psp2DRMType: 0
274 | psp2StorageType: 0
275 | psp2MediaCapacity: 0
276 | psp2DLCConfigPath:
277 | psp2ThumbnailPath:
278 | psp2BackgroundPath:
279 | psp2SoundPath:
280 | psp2TrophyCommId:
281 | psp2TrophyPackagePath:
282 | psp2PackagedResourcesPath:
283 | psp2SaveDataQuota: 10240
284 | psp2ParentalLevel: 1
285 | psp2ShortTitle: Not Set
286 | psp2ContentID: IV0000-ABCD12345_00-0123456789ABCDEF
287 | psp2Category: 0
288 | psp2MasterVersion: 01.00
289 | psp2AppVersion: 01.00
290 | psp2TVBootMode: 0
291 | psp2EnterButtonAssignment: 2
292 | psp2TVDisableEmu: 0
293 | psp2AllowTwitterDialog: 1
294 | psp2Upgradable: 0
295 | psp2HealthWarning: 0
296 | psp2UseLibLocation: 0
297 | psp2InfoBarOnStartup: 0
298 | psp2InfoBarColor: 0
299 | psmSplashimage: {fileID: 0}
300 | spritePackerPolicy:
301 | scriptingDefineSymbols: {}
302 | metroPackageName: UnityProject
303 | metroPackageLogo:
304 | metroPackageLogo140:
305 | metroPackageLogo180:
306 | metroPackageLogo240:
307 | metroPackageVersion:
308 | metroCertificatePath:
309 | metroCertificatePassword:
310 | metroCertificateSubject:
311 | metroCertificateIssuer:
312 | metroCertificateNotAfter: 0000000000000000
313 | metroApplicationDescription: UnityProject
314 | metroStoreTileLogo80:
315 | metroStoreTileLogo:
316 | metroStoreTileLogo140:
317 | metroStoreTileLogo180:
318 | metroStoreTileWideLogo80:
319 | metroStoreTileWideLogo:
320 | metroStoreTileWideLogo140:
321 | metroStoreTileWideLogo180:
322 | metroStoreTileSmallLogo80:
323 | metroStoreTileSmallLogo:
324 | metroStoreTileSmallLogo140:
325 | metroStoreTileSmallLogo180:
326 | metroStoreSmallTile80:
327 | metroStoreSmallTile:
328 | metroStoreSmallTile140:
329 | metroStoreSmallTile180:
330 | metroStoreLargeTile80:
331 | metroStoreLargeTile:
332 | metroStoreLargeTile140:
333 | metroStoreLargeTile180:
334 | metroStoreSplashScreenImage:
335 | metroStoreSplashScreenImage140:
336 | metroStoreSplashScreenImage180:
337 | metroPhoneAppIcon:
338 | metroPhoneAppIcon140:
339 | metroPhoneAppIcon240:
340 | metroPhoneSmallTile:
341 | metroPhoneSmallTile140:
342 | metroPhoneSmallTile240:
343 | metroPhoneMediumTile:
344 | metroPhoneMediumTile140:
345 | metroPhoneMediumTile240:
346 | metroPhoneWideTile:
347 | metroPhoneWideTile140:
348 | metroPhoneWideTile240:
349 | metroPhoneSplashScreenImage:
350 | metroPhoneSplashScreenImage140:
351 | metroPhoneSplashScreenImage240:
352 | metroTileShortName:
353 | metroCommandLineArgsFile:
354 | metroTileShowName: 0
355 | metroMediumTileShowName: 0
356 | metroLargeTileShowName: 0
357 | metroWideTileShowName: 0
358 | metroDefaultTileSize: 1
359 | metroTileForegroundText: 1
360 | metroTileBackgroundColor: {r: 0, g: 0, b: 0, a: 1}
361 | metroSplashScreenBackgroundColor: {r: 0, g: 0, b: 0, a: 1}
362 | metroSplashScreenUseBackgroundColor: 0
363 | platformCapabilities: {}
364 | metroFTAName:
365 | metroFTAFileTypes: []
366 | metroProtocolName:
367 | metroCompilationOverrides: 1
368 | blackberryDeviceAddress:
369 | blackberryDevicePassword:
370 | blackberryTokenPath:
371 | blackberryTokenExires:
372 | blackberryTokenAuthor:
373 | blackberryTokenAuthorId:
374 | blackberryCskPassword:
375 | blackberrySaveLogPath:
376 | blackberrySharedPermissions: 0
377 | blackberryCameraPermissions: 0
378 | blackberryGPSPermissions: 0
379 | blackberryDeviceIDPermissions: 0
380 | blackberryMicrophonePermissions: 0
381 | blackberryGamepadSupport: 0
382 | blackberryBuildId: 0
383 | blackberryLandscapeSplashScreen: {fileID: 0}
384 | blackberryPortraitSplashScreen: {fileID: 0}
385 | blackberrySquareSplashScreen: {fileID: 0}
386 | tizenProductDescription:
387 | tizenProductURL:
388 | tizenSigningProfileName:
389 | tizenGPSPermissions: 0
390 | tizenMicrophonePermissions: 0
391 | n3dsUseExtSaveData: 0
392 | n3dsCompressStaticMem: 1
393 | n3dsExtSaveDataNumber: 0x12345
394 | n3dsStackSize: 131072
395 | n3dsTargetPlatform: 2
396 | n3dsRegion: 7
397 | n3dsMediaSize: 0
398 | n3dsLogoStyle: 3
399 | n3dsTitle: GameName
400 | n3dsProductCode:
401 | n3dsApplicationId: 0xFF3FF
402 | stvDeviceAddress:
403 | stvProductDescription:
404 | stvProductAuthor:
405 | stvProductAuthorEmail:
406 | stvProductLink:
407 | stvProductCategory: 0
408 | XboxOneProductId:
409 | XboxOneUpdateKey:
410 | XboxOneSandboxId:
411 | XboxOneContentId:
412 | XboxOneTitleId:
413 | XboxOneSCId:
414 | XboxOneGameOsOverridePath:
415 | XboxOnePackagingOverridePath:
416 | XboxOneAppManifestOverridePath:
417 | XboxOnePackageEncryption: 0
418 | XboxOnePackageUpdateGranularity: 2
419 | XboxOneDescription:
420 | XboxOneIsContentPackage: 0
421 | XboxOneEnableGPUVariability: 0
422 | XboxOneSockets: {}
423 | XboxOneSplashScreen: {fileID: 0}
424 | XboxOneAllowedProductIds: []
425 | XboxOnePersistentLocalStorageSize: 0
426 | intPropertyNames:
427 | - Android::ScriptingBackend
428 | - Metro::ScriptingBackend
429 | - Standalone::ScriptingBackend
430 | - WP8::ScriptingBackend
431 | - WebGL::ScriptingBackend
432 | - WebGL::audioCompressionFormat
433 | - WebGL::exceptionSupport
434 | - WebGL::memorySize
435 | - WebPlayer::ScriptingBackend
436 | - iOS::Architecture
437 | - iOS::EnableIncrementalBuildSupportForIl2cpp
438 | - iOS::ScriptingBackend
439 | Android::ScriptingBackend: 0
440 | Metro::ScriptingBackend: 2
441 | Standalone::ScriptingBackend: 0
442 | WP8::ScriptingBackend: 2
443 | WebGL::ScriptingBackend: 1
444 | WebGL::audioCompressionFormat: 4
445 | WebGL::exceptionSupport: 1
446 | WebGL::memorySize: 256
447 | WebPlayer::ScriptingBackend: 0
448 | iOS::Architecture: 2
449 | iOS::EnableIncrementalBuildSupportForIl2cpp: 0
450 | iOS::ScriptingBackend: 1
451 | boolPropertyNames:
452 | - WebGL::analyzeBuildSize
453 | - WebGL::dataCaching
454 | - WebGL::useEmbeddedResources
455 | - XboxOne::enus
456 | WebGL::analyzeBuildSize: 0
457 | WebGL::dataCaching: 0
458 | WebGL::useEmbeddedResources: 0
459 | XboxOne::enus: 1
460 | stringPropertyNames:
461 | - WebGL::emscriptenArgs
462 | - WebGL::template
463 | - additionalIl2CppArgs::additionalIl2CppArgs
464 | WebGL::emscriptenArgs:
465 | WebGL::template: APPLICATION:Default
466 | additionalIl2CppArgs::additionalIl2CppArgs:
467 | firstStreamedSceneWithResources: 0
468 | cloudProjectId:
469 | projectName:
470 | organizationId:
471 | cloudEnabled: 0
472 |
--------------------------------------------------------------------------------
/UnityProject/Assets/Main.unity:
--------------------------------------------------------------------------------
1 | %YAML 1.1
2 | %TAG !u! tag:unity3d.com,2011:
3 | --- !u!29 &1
4 | SceneSettings:
5 | m_ObjectHideFlags: 0
6 | m_PVSData:
7 | m_PVSObjectsArray: []
8 | m_PVSPortalsArray: []
9 | m_OcclusionBakeSettings:
10 | smallestOccluder: 5
11 | smallestHole: .25
12 | backfaceThreshold: 100
13 | --- !u!104 &2
14 | RenderSettings:
15 | m_ObjectHideFlags: 0
16 | serializedVersion: 6
17 | m_Fog: 0
18 | m_FogColor: {r: .5, g: .5, b: .5, a: 1}
19 | m_FogMode: 3
20 | m_FogDensity: .00999999978
21 | m_LinearFogStart: 0
22 | m_LinearFogEnd: 300
23 | m_AmbientSkyColor: {r: .211999997, g: .226999998, b: .259000003, a: 1}
24 | m_AmbientEquatorColor: {r: .114, g: .125, b: .133000001, a: 1}
25 | m_AmbientGroundColor: {r: .0469999984, g: .0430000015, b: .0350000001, a: 1}
26 | m_AmbientIntensity: 1
27 | m_AmbientMode: 0
28 | m_SkyboxMaterial: {fileID: 10304, guid: 0000000000000000f000000000000000, type: 0}
29 | m_HaloStrength: .5
30 | m_FlareStrength: 1
31 | m_FlareFadeSpeed: 3
32 | m_HaloTexture: {fileID: 0}
33 | m_SpotCookie: {fileID: 10001, guid: 0000000000000000e000000000000000, type: 0}
34 | m_DefaultReflectionMode: 0
35 | m_DefaultReflectionResolution: 128
36 | m_ReflectionBounces: 1
37 | m_ReflectionIntensity: 1
38 | m_CustomReflection: {fileID: 0}
39 | m_Sun: {fileID: 0}
40 | --- !u!157 &4
41 | LightmapSettings:
42 | m_ObjectHideFlags: 0
43 | serializedVersion: 5
44 | m_GIWorkflowMode: 0
45 | m_LightmapsMode: 1
46 | m_GISettings:
47 | serializedVersion: 2
48 | m_BounceScale: 1
49 | m_IndirectOutputScale: 1
50 | m_AlbedoBoost: 1
51 | m_TemporalCoherenceThreshold: 1
52 | m_EnvironmentLightingMode: 0
53 | m_EnableBakedLightmaps: 1
54 | m_EnableRealtimeLightmaps: 1
55 | m_LightmapEditorSettings:
56 | serializedVersion: 3
57 | m_Resolution: 2
58 | m_BakeResolution: 40
59 | m_TextureWidth: 1024
60 | m_TextureHeight: 1024
61 | m_AOMaxDistance: 1
62 | m_Padding: 2
63 | m_CompAOExponent: 0
64 | m_LightmapParameters: {fileID: 0}
65 | m_TextureCompression: 1
66 | m_FinalGather: 0
67 | m_FinalGatherRayCount: 1024
68 | m_ReflectionCompression: 2
69 | m_LightmapSnapshot: {fileID: 0}
70 | m_RuntimeCPUUsage: 25
71 | --- !u!196 &5
72 | NavMeshSettings:
73 | serializedVersion: 2
74 | m_ObjectHideFlags: 0
75 | m_BuildSettings:
76 | serializedVersion: 2
77 | agentRadius: .5
78 | agentHeight: 2
79 | agentSlope: 45
80 | agentClimb: .400000006
81 | ledgeDropHeight: 0
82 | maxJumpAcrossDistance: 0
83 | accuratePlacement: 0
84 | minRegionArea: 2
85 | cellSize: .166666672
86 | manualCellSize: 0
87 | m_NavMeshData: {fileID: 0}
88 | --- !u!1 &445455659
89 | GameObject:
90 | m_ObjectHideFlags: 0
91 | m_PrefabParentObject: {fileID: 0}
92 | m_PrefabInternal: {fileID: 0}
93 | serializedVersion: 4
94 | m_Component:
95 | - 4: {fileID: 445455664}
96 | - 20: {fileID: 445455663}
97 | - 92: {fileID: 445455662}
98 | - 124: {fileID: 445455661}
99 | - 81: {fileID: 445455660}
100 | m_Layer: 0
101 | m_Name: Main Camera
102 | m_TagString: MainCamera
103 | m_Icon: {fileID: 0}
104 | m_NavMeshLayer: 0
105 | m_StaticEditorFlags: 0
106 | m_IsActive: 1
107 | --- !u!81 &445455660
108 | AudioListener:
109 | m_ObjectHideFlags: 0
110 | m_PrefabParentObject: {fileID: 0}
111 | m_PrefabInternal: {fileID: 0}
112 | m_GameObject: {fileID: 445455659}
113 | m_Enabled: 1
114 | --- !u!124 &445455661
115 | Behaviour:
116 | m_ObjectHideFlags: 0
117 | m_PrefabParentObject: {fileID: 0}
118 | m_PrefabInternal: {fileID: 0}
119 | m_GameObject: {fileID: 445455659}
120 | m_Enabled: 1
121 | --- !u!92 &445455662
122 | Behaviour:
123 | m_ObjectHideFlags: 0
124 | m_PrefabParentObject: {fileID: 0}
125 | m_PrefabInternal: {fileID: 0}
126 | m_GameObject: {fileID: 445455659}
127 | m_Enabled: 1
128 | --- !u!20 &445455663
129 | Camera:
130 | m_ObjectHideFlags: 0
131 | m_PrefabParentObject: {fileID: 0}
132 | m_PrefabInternal: {fileID: 0}
133 | m_GameObject: {fileID: 445455659}
134 | m_Enabled: 1
135 | serializedVersion: 2
136 | m_ClearFlags: 1
137 | m_BackGroundColor: {r: .192156866, g: .301960796, b: .474509805, a: .0196078438}
138 | m_NormalizedViewPortRect:
139 | serializedVersion: 2
140 | x: 0
141 | y: 0
142 | width: 1
143 | height: 1
144 | near clip plane: .300000012
145 | far clip plane: 1000
146 | field of view: 60
147 | orthographic: 0
148 | orthographic size: 5
149 | m_Depth: -1
150 | m_CullingMask:
151 | serializedVersion: 2
152 | m_Bits: 4294967295
153 | m_RenderingPath: -1
154 | m_TargetTexture: {fileID: 0}
155 | m_TargetDisplay: 0
156 | m_TargetEye: 3
157 | m_HDR: 0
158 | m_OcclusionCulling: 1
159 | m_StereoConvergence: 10
160 | m_StereoSeparation: .0219999999
161 | m_StereoMirrorMode: 0
162 | --- !u!4 &445455664
163 | Transform:
164 | m_ObjectHideFlags: 0
165 | m_PrefabParentObject: {fileID: 0}
166 | m_PrefabInternal: {fileID: 0}
167 | m_GameObject: {fileID: 445455659}
168 | m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
169 | m_LocalPosition: {x: 0, y: 1, z: -10}
170 | m_LocalScale: {x: 1, y: 1, z: 1}
171 | m_Children: []
172 | m_Father: {fileID: 0}
173 | m_RootOrder: 0
174 | --- !u!1 &960813751
175 | GameObject:
176 | m_ObjectHideFlags: 0
177 | m_PrefabParentObject: {fileID: 0}
178 | m_PrefabInternal: {fileID: 0}
179 | serializedVersion: 4
180 | m_Component:
181 | - 4: {fileID: 960813755}
182 | - 114: {fileID: 960813754}
183 | - 114: {fileID: 960813753}
184 | - 114: {fileID: 960813752}
185 | m_Layer: 0
186 | m_Name: EventSystem
187 | m_TagString: Untagged
188 | m_Icon: {fileID: 0}
189 | m_NavMeshLayer: 0
190 | m_StaticEditorFlags: 0
191 | m_IsActive: 1
192 | --- !u!114 &960813752
193 | MonoBehaviour:
194 | m_ObjectHideFlags: 0
195 | m_PrefabParentObject: {fileID: 0}
196 | m_PrefabInternal: {fileID: 0}
197 | m_GameObject: {fileID: 960813751}
198 | m_Enabled: 1
199 | m_EditorHideFlags: 0
200 | m_Script: {fileID: 1997211142, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3}
201 | m_Name:
202 | m_EditorClassIdentifier:
203 | m_ForceModuleActive: 0
204 | --- !u!114 &960813753
205 | MonoBehaviour:
206 | m_ObjectHideFlags: 0
207 | m_PrefabParentObject: {fileID: 0}
208 | m_PrefabInternal: {fileID: 0}
209 | m_GameObject: {fileID: 960813751}
210 | m_Enabled: 1
211 | m_EditorHideFlags: 0
212 | m_Script: {fileID: 1077351063, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3}
213 | m_Name:
214 | m_EditorClassIdentifier:
215 | m_HorizontalAxis: Horizontal
216 | m_VerticalAxis: Vertical
217 | m_SubmitButton: Submit
218 | m_CancelButton: Cancel
219 | m_InputActionsPerSecond: 10
220 | m_RepeatDelay: .5
221 | m_ForceModuleActive: 0
222 | --- !u!114 &960813754
223 | MonoBehaviour:
224 | m_ObjectHideFlags: 0
225 | m_PrefabParentObject: {fileID: 0}
226 | m_PrefabInternal: {fileID: 0}
227 | m_GameObject: {fileID: 960813751}
228 | m_Enabled: 1
229 | m_EditorHideFlags: 0
230 | m_Script: {fileID: -619905303, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3}
231 | m_Name:
232 | m_EditorClassIdentifier:
233 | m_FirstSelected: {fileID: 0}
234 | m_sendNavigationEvents: 1
235 | m_DragThreshold: 5
236 | --- !u!4 &960813755
237 | Transform:
238 | m_ObjectHideFlags: 0
239 | m_PrefabParentObject: {fileID: 0}
240 | m_PrefabInternal: {fileID: 0}
241 | m_GameObject: {fileID: 960813751}
242 | m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
243 | m_LocalPosition: {x: 0, y: 0, z: 0}
244 | m_LocalScale: {x: 1, y: 1, z: 1}
245 | m_Children: []
246 | m_Father: {fileID: 0}
247 | m_RootOrder: 3
248 | --- !u!1 &1131302447
249 | GameObject:
250 | m_ObjectHideFlags: 0
251 | m_PrefabParentObject: {fileID: 0}
252 | m_PrefabInternal: {fileID: 0}
253 | serializedVersion: 4
254 | m_Component:
255 | - 224: {fileID: 1131302448}
256 | - 222: {fileID: 1131302450}
257 | - 114: {fileID: 1131302449}
258 | m_Layer: 5
259 | m_Name: Percentage Indicator
260 | m_TagString: Untagged
261 | m_Icon: {fileID: 0}
262 | m_NavMeshLayer: 0
263 | m_StaticEditorFlags: 0
264 | m_IsActive: 1
265 | --- !u!224 &1131302448
266 | RectTransform:
267 | m_ObjectHideFlags: 0
268 | m_PrefabParentObject: {fileID: 0}
269 | m_PrefabInternal: {fileID: 0}
270 | m_GameObject: {fileID: 1131302447}
271 | m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
272 | m_LocalPosition: {x: 0, y: 0, z: 0}
273 | m_LocalScale: {x: 1, y: 1, z: 1}
274 | m_Children: []
275 | m_Father: {fileID: 1971663105}
276 | m_RootOrder: 1
277 | m_AnchorMin: {x: 0, y: 0}
278 | m_AnchorMax: {x: 0, y: 0}
279 | m_AnchoredPosition: {x: 0, y: 0}
280 | m_SizeDelta: {x: 0, y: 0}
281 | m_Pivot: {x: .5, y: .5}
282 | --- !u!114 &1131302449
283 | MonoBehaviour:
284 | m_ObjectHideFlags: 0
285 | m_PrefabParentObject: {fileID: 0}
286 | m_PrefabInternal: {fileID: 0}
287 | m_GameObject: {fileID: 1131302447}
288 | m_Enabled: 1
289 | m_EditorHideFlags: 0
290 | m_Script: {fileID: 708705254, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3}
291 | m_Name:
292 | m_EditorClassIdentifier:
293 | m_Material: {fileID: 0}
294 | m_Color: {r: .196078435, g: .196078435, b: .196078435, a: 1}
295 | m_RaycastTarget: 1
296 | m_OnCullStateChanged:
297 | m_PersistentCalls:
298 | m_Calls: []
299 | m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI,
300 | Version=1.0.0.0, Culture=neutral, PublicKeyToken=null
301 | m_FontData:
302 | m_Font: {fileID: 10102, guid: 0000000000000000e000000000000000, type: 0}
303 | m_FontSize: 14
304 | m_FontStyle: 0
305 | m_BestFit: 0
306 | m_MinSize: 10
307 | m_MaxSize: 40
308 | m_Alignment: 1
309 | m_RichText: 1
310 | m_HorizontalOverflow: 0
311 | m_VerticalOverflow: 0
312 | m_LineSpacing: 1
313 | m_Text: 50%
314 | --- !u!222 &1131302450
315 | CanvasRenderer:
316 | m_ObjectHideFlags: 0
317 | m_PrefabParentObject: {fileID: 0}
318 | m_PrefabInternal: {fileID: 0}
319 | m_GameObject: {fileID: 1131302447}
320 | --- !u!1 &1549837942
321 | GameObject:
322 | m_ObjectHideFlags: 0
323 | m_PrefabParentObject: {fileID: 0}
324 | m_PrefabInternal: {fileID: 0}
325 | serializedVersion: 4
326 | m_Component:
327 | - 224: {fileID: 1549837943}
328 | - 222: {fileID: 1549837945}
329 | - 114: {fileID: 1549837944}
330 | m_Layer: 5
331 | m_Name: Battery Icon
332 | m_TagString: Untagged
333 | m_Icon: {fileID: 0}
334 | m_NavMeshLayer: 0
335 | m_StaticEditorFlags: 0
336 | m_IsActive: 1
337 | --- !u!224 &1549837943
338 | RectTransform:
339 | m_ObjectHideFlags: 0
340 | m_PrefabParentObject: {fileID: 0}
341 | m_PrefabInternal: {fileID: 0}
342 | m_GameObject: {fileID: 1549837942}
343 | m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
344 | m_LocalPosition: {x: 0, y: 0, z: 0}
345 | m_LocalScale: {x: 1, y: 1, z: 1}
346 | m_Children: []
347 | m_Father: {fileID: 1971663105}
348 | m_RootOrder: 0
349 | m_AnchorMin: {x: 0, y: 0}
350 | m_AnchorMax: {x: 0, y: 0}
351 | m_AnchoredPosition: {x: 0, y: 0}
352 | m_SizeDelta: {x: 0, y: 0}
353 | m_Pivot: {x: .5, y: .5}
354 | --- !u!114 &1549837944
355 | MonoBehaviour:
356 | m_ObjectHideFlags: 0
357 | m_PrefabParentObject: {fileID: 0}
358 | m_PrefabInternal: {fileID: 0}
359 | m_GameObject: {fileID: 1549837942}
360 | m_Enabled: 1
361 | m_EditorHideFlags: 0
362 | m_Script: {fileID: 708705254, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3}
363 | m_Name:
364 | m_EditorClassIdentifier:
365 | m_Material: {fileID: 0}
366 | m_Color: {r: .196078435, g: .196078435, b: .196078435, a: 1}
367 | m_RaycastTarget: 1
368 | m_OnCullStateChanged:
369 | m_PersistentCalls:
370 | m_Calls: []
371 | m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI,
372 | Version=1.0.0.0, Culture=neutral, PublicKeyToken=null
373 | m_FontData:
374 | m_Font: {fileID: 12800000, guid: dc9513c44ff88ed4a84d128248f2eafa, type: 3}
375 | m_FontSize: 100
376 | m_FontStyle: 0
377 | m_BestFit: 0
378 | m_MinSize: 10
379 | m_MaxSize: 40
380 | m_Alignment: 1
381 | m_RichText: 1
382 | m_HorizontalOverflow: 0
383 | m_VerticalOverflow: 0
384 | m_LineSpacing: 1
385 | m_Text: "\uF242"
386 | --- !u!222 &1549837945
387 | CanvasRenderer:
388 | m_ObjectHideFlags: 0
389 | m_PrefabParentObject: {fileID: 0}
390 | m_PrefabInternal: {fileID: 0}
391 | m_GameObject: {fileID: 1549837942}
392 | --- !u!1 &1823908232
393 | GameObject:
394 | m_ObjectHideFlags: 0
395 | m_PrefabParentObject: {fileID: 0}
396 | m_PrefabInternal: {fileID: 0}
397 | serializedVersion: 4
398 | m_Component:
399 | - 4: {fileID: 1823908234}
400 | - 108: {fileID: 1823908233}
401 | m_Layer: 0
402 | m_Name: Directional Light
403 | m_TagString: Untagged
404 | m_Icon: {fileID: 0}
405 | m_NavMeshLayer: 0
406 | m_StaticEditorFlags: 0
407 | m_IsActive: 1
408 | --- !u!108 &1823908233
409 | Light:
410 | m_ObjectHideFlags: 0
411 | m_PrefabParentObject: {fileID: 0}
412 | m_PrefabInternal: {fileID: 0}
413 | m_GameObject: {fileID: 1823908232}
414 | m_Enabled: 1
415 | serializedVersion: 6
416 | m_Type: 1
417 | m_Color: {r: 1, g: .956862748, b: .839215696, a: 1}
418 | m_Intensity: 1
419 | m_Range: 10
420 | m_SpotAngle: 30
421 | m_CookieSize: 10
422 | m_Shadows:
423 | m_Type: 2
424 | m_Resolution: -1
425 | m_Strength: 1
426 | m_Bias: .0500000007
427 | m_NormalBias: .400000006
428 | m_Cookie: {fileID: 0}
429 | m_DrawHalo: 0
430 | m_Flare: {fileID: 0}
431 | m_RenderMode: 0
432 | m_CullingMask:
433 | serializedVersion: 2
434 | m_Bits: 4294967295
435 | m_Lightmapping: 4
436 | m_BounceIntensity: 1
437 | m_ShadowRadius: 0
438 | m_ShadowAngle: 0
439 | m_AreaSize: {x: 1, y: 1}
440 | --- !u!4 &1823908234
441 | Transform:
442 | m_ObjectHideFlags: 0
443 | m_PrefabParentObject: {fileID: 0}
444 | m_PrefabInternal: {fileID: 0}
445 | m_GameObject: {fileID: 1823908232}
446 | m_LocalRotation: {x: .408217937, y: -.234569728, z: .109381676, w: .875426054}
447 | m_LocalPosition: {x: 0, y: 3, z: 0}
448 | m_LocalScale: {x: 1, y: 1, z: 1}
449 | m_Children: []
450 | m_Father: {fileID: 0}
451 | m_RootOrder: 1
452 | --- !u!1 &1971663104
453 | GameObject:
454 | m_ObjectHideFlags: 0
455 | m_PrefabParentObject: {fileID: 0}
456 | m_PrefabInternal: {fileID: 0}
457 | serializedVersion: 4
458 | m_Component:
459 | - 224: {fileID: 1971663105}
460 | - 222: {fileID: 1971663108}
461 | - 114: {fileID: 1971663107}
462 | - 114: {fileID: 1971663106}
463 | m_Layer: 5
464 | m_Name: Panel
465 | m_TagString: Untagged
466 | m_Icon: {fileID: 0}
467 | m_NavMeshLayer: 0
468 | m_StaticEditorFlags: 0
469 | m_IsActive: 1
470 | --- !u!224 &1971663105
471 | RectTransform:
472 | m_ObjectHideFlags: 0
473 | m_PrefabParentObject: {fileID: 0}
474 | m_PrefabInternal: {fileID: 0}
475 | m_GameObject: {fileID: 1971663104}
476 | m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
477 | m_LocalPosition: {x: 0, y: 0, z: 0}
478 | m_LocalScale: {x: 1, y: 1, z: 1}
479 | m_Children:
480 | - {fileID: 1549837943}
481 | - {fileID: 1131302448}
482 | m_Father: {fileID: 2099402934}
483 | m_RootOrder: 0
484 | m_AnchorMin: {x: 0, y: 0}
485 | m_AnchorMax: {x: 1, y: 1}
486 | m_AnchoredPosition: {x: 0, y: 0}
487 | m_SizeDelta: {x: 0, y: 0}
488 | m_Pivot: {x: .5, y: .5}
489 | --- !u!114 &1971663106
490 | MonoBehaviour:
491 | m_ObjectHideFlags: 0
492 | m_PrefabParentObject: {fileID: 0}
493 | m_PrefabInternal: {fileID: 0}
494 | m_GameObject: {fileID: 1971663104}
495 | m_Enabled: 1
496 | m_EditorHideFlags: 0
497 | m_Script: {fileID: 1297475563, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3}
498 | m_Name:
499 | m_EditorClassIdentifier:
500 | m_Padding:
501 | m_Left: 0
502 | m_Right: 0
503 | m_Top: 0
504 | m_Bottom: 0
505 | m_ChildAlignment: 4
506 | m_Spacing: 0
507 | m_ChildForceExpandWidth: 1
508 | m_ChildForceExpandHeight: 0
509 | --- !u!114 &1971663107
510 | MonoBehaviour:
511 | m_ObjectHideFlags: 0
512 | m_PrefabParentObject: {fileID: 0}
513 | m_PrefabInternal: {fileID: 0}
514 | m_GameObject: {fileID: 1971663104}
515 | m_Enabled: 1
516 | m_EditorHideFlags: 0
517 | m_Script: {fileID: -765806418, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3}
518 | m_Name:
519 | m_EditorClassIdentifier:
520 | m_Material: {fileID: 0}
521 | m_Color: {r: 1, g: 1, b: 1, a: 1}
522 | m_RaycastTarget: 1
523 | m_OnCullStateChanged:
524 | m_PersistentCalls:
525 | m_Calls: []
526 | m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI,
527 | Version=1.0.0.0, Culture=neutral, PublicKeyToken=null
528 | m_Sprite: {fileID: 0}
529 | m_Type: 1
530 | m_PreserveAspect: 0
531 | m_FillCenter: 1
532 | m_FillMethod: 4
533 | m_FillAmount: 1
534 | m_FillClockwise: 1
535 | m_FillOrigin: 0
536 | --- !u!222 &1971663108
537 | CanvasRenderer:
538 | m_ObjectHideFlags: 0
539 | m_PrefabParentObject: {fileID: 0}
540 | m_PrefabInternal: {fileID: 0}
541 | m_GameObject: {fileID: 1971663104}
542 | --- !u!1 &2099402930
543 | GameObject:
544 | m_ObjectHideFlags: 0
545 | m_PrefabParentObject: {fileID: 0}
546 | m_PrefabInternal: {fileID: 0}
547 | serializedVersion: 4
548 | m_Component:
549 | - 224: {fileID: 2099402934}
550 | - 223: {fileID: 2099402933}
551 | - 114: {fileID: 2099402932}
552 | - 114: {fileID: 2099402931}
553 | - 114: {fileID: 2099402935}
554 | m_Layer: 5
555 | m_Name: Canvas
556 | m_TagString: Untagged
557 | m_Icon: {fileID: 0}
558 | m_NavMeshLayer: 0
559 | m_StaticEditorFlags: 0
560 | m_IsActive: 1
561 | --- !u!114 &2099402931
562 | MonoBehaviour:
563 | m_ObjectHideFlags: 0
564 | m_PrefabParentObject: {fileID: 0}
565 | m_PrefabInternal: {fileID: 0}
566 | m_GameObject: {fileID: 2099402930}
567 | m_Enabled: 1
568 | m_EditorHideFlags: 0
569 | m_Script: {fileID: 1301386320, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3}
570 | m_Name:
571 | m_EditorClassIdentifier:
572 | m_IgnoreReversedGraphics: 1
573 | m_BlockingObjects: 0
574 | m_BlockingMask:
575 | serializedVersion: 2
576 | m_Bits: 4294967295
577 | --- !u!114 &2099402932
578 | MonoBehaviour:
579 | m_ObjectHideFlags: 0
580 | m_PrefabParentObject: {fileID: 0}
581 | m_PrefabInternal: {fileID: 0}
582 | m_GameObject: {fileID: 2099402930}
583 | m_Enabled: 1
584 | m_EditorHideFlags: 0
585 | m_Script: {fileID: 1980459831, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3}
586 | m_Name:
587 | m_EditorClassIdentifier:
588 | m_UiScaleMode: 0
589 | m_ReferencePixelsPerUnit: 100
590 | m_ScaleFactor: 1
591 | m_ReferenceResolution: {x: 800, y: 600}
592 | m_ScreenMatchMode: 0
593 | m_MatchWidthOrHeight: 0
594 | m_PhysicalUnit: 3
595 | m_FallbackScreenDPI: 96
596 | m_DefaultSpriteDPI: 96
597 | m_DynamicPixelsPerUnit: 1
598 | --- !u!223 &2099402933
599 | Canvas:
600 | m_ObjectHideFlags: 0
601 | m_PrefabParentObject: {fileID: 0}
602 | m_PrefabInternal: {fileID: 0}
603 | m_GameObject: {fileID: 2099402930}
604 | m_Enabled: 1
605 | serializedVersion: 2
606 | m_RenderMode: 0
607 | m_Camera: {fileID: 0}
608 | m_PlaneDistance: 100
609 | m_PixelPerfect: 0
610 | m_ReceivesEvents: 1
611 | m_OverrideSorting: 0
612 | m_OverridePixelPerfect: 0
613 | m_SortingLayerID: 0
614 | m_SortingOrder: 0
615 | --- !u!224 &2099402934
616 | RectTransform:
617 | m_ObjectHideFlags: 0
618 | m_PrefabParentObject: {fileID: 0}
619 | m_PrefabInternal: {fileID: 0}
620 | m_GameObject: {fileID: 2099402930}
621 | m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
622 | m_LocalPosition: {x: 0, y: 0, z: 0}
623 | m_LocalScale: {x: 0, y: 0, z: 0}
624 | m_Children:
625 | - {fileID: 1971663105}
626 | m_Father: {fileID: 0}
627 | m_RootOrder: 2
628 | m_AnchorMin: {x: 0, y: 0}
629 | m_AnchorMax: {x: 0, y: 0}
630 | m_AnchoredPosition: {x: 0, y: 0}
631 | m_SizeDelta: {x: 0, y: 0}
632 | m_Pivot: {x: 0, y: 0}
633 | --- !u!114 &2099402935
634 | MonoBehaviour:
635 | m_ObjectHideFlags: 0
636 | m_PrefabParentObject: {fileID: 0}
637 | m_PrefabInternal: {fileID: 0}
638 | m_GameObject: {fileID: 2099402930}
639 | m_Enabled: 1
640 | m_EditorHideFlags: 0
641 | m_Script: {fileID: 11500000, guid: 7e6d9620e8092074099aa92c3575bc04, type: 3}
642 | m_Name:
643 | m_EditorClassIdentifier:
644 | batteryLevelText: {fileID: 1131302449}
645 | batteryLevelIcon: {fileID: 1549837944}
646 |
--------------------------------------------------------------------------------