├── .gitignore ├── .project ├── .settings └── org.eclipse.buildship.core.prefs ├── README.md ├── UnityPlayerActivityListenersExample ├── .gitignore ├── Assets │ ├── Demo.unity │ ├── Demo.unity.meta │ ├── Plugins.meta │ └── Plugins │ │ ├── Android.meta │ │ └── Android │ │ ├── AndroidManifest.xml │ │ ├── AndroidManifest.xml.meta │ │ ├── com.unity.extended.aar │ │ ├── com.unity.extended.aar.meta │ │ ├── com.unity.myhelloworld-plugin.aar │ │ └── com.unity.myhelloworld-plugin.aar.meta ├── ProjectSettings │ ├── AudioManager.asset │ ├── ClusterInputManager.asset │ ├── DynamicsManager.asset │ ├── EditorBuildSettings.asset │ ├── EditorSettings.asset │ ├── GraphicsSettings.asset │ ├── InputManager.asset │ ├── NavMeshAreas.asset │ ├── NetworkManager.asset │ ├── Physics2DSettings.asset │ ├── ProjectSettings.asset │ ├── ProjectVersion.txt │ ├── QualitySettings.asset │ ├── TagManager.asset │ ├── TimeManager.asset │ └── UnityConnectSettings.asset ├── UnityActivityPlayerExtension.apk └── UnityPackageManager │ └── manifest.json ├── badexample ├── .gitignore ├── build.gradle ├── libs │ └── UnityClasses-2017.4.1f1.jar ├── proguard-rules.pro ├── release │ └── com.me.myhelloworld-plugin.aar └── src │ └── main │ ├── AndroidManifest.xml │ ├── java │ └── martingonzalez │ │ └── com │ │ └── badexample │ │ └── MyCustomUnityPlayerActivity.java │ └── res │ └── values │ └── strings.xml ├── build.gradle ├── gradle.properties ├── gradle └── wrapper │ ├── gradle-wrapper.jar │ └── gradle-wrapper.properties ├── gradlew ├── gradlew.bat ├── myhelloworldplugin ├── .classpath ├── .gitignore ├── .project ├── .settings │ └── org.eclipse.buildship.core.prefs ├── build.gradle ├── proguard-rules.pro ├── release │ └── com.unity.myhelloworld-plugin.aar └── src │ └── main │ ├── AndroidManifest.xml │ ├── java │ └── com │ │ └── unity │ │ └── myhelloworldplugin │ │ └── MyHelloWorldActivityListener.java │ └── res │ └── values │ └── strings.xml ├── settings.gradle ├── unityActivityListener.unitypackage └── unityplayeractivityextension ├── .classpath ├── .gitignore ├── .project ├── .settings └── org.eclipse.buildship.core.prefs ├── build.gradle ├── libs └── UnityClasses-2017.4.1f1.jar ├── proguard-rules.pro ├── release └── com.unity.extended.aar └── src └── main ├── AndroidManifest.xml ├── java └── martingonzalez │ └── com │ └── unityplayeractivityextension │ ├── UnityActivityListener.java │ ├── UnityActivityListenersLoader.java │ ├── UnityActivityListenersNotifier.java │ └── UnityPlayerActivityExtension.java └── res └── values └── strings.xml /.gitignore: -------------------------------------------------------------------------------- 1 | *.iml 2 | .gradle 3 | /local.properties 4 | /.idea/libraries 5 | /.idea/modules.xml 6 | /.idea/workspace.xml 7 | .DS_Store 8 | /build 9 | /.idea 10 | /captures 11 | .externalNativeBuild 12 | 13 | UnityPlayerActivityListenersExample/Library/ 14 | UnityPlayerActivityListenersExample/.idea/ 15 | UnityPlayerActivityListenersExample/UnityActivityListenersDemo.sln 16 | -------------------------------------------------------------------------------- /.project: -------------------------------------------------------------------------------- 1 | 2 | 3 | UnityPlayerActivityListener 4 | Project UnityPlayerActivityListener created by Buildship. 5 | 6 | 7 | 8 | 9 | org.eclipse.buildship.core.gradleprojectbuilder 10 | 11 | 12 | 13 | 14 | 15 | org.eclipse.buildship.core.gradleprojectnature 16 | 17 | 18 | -------------------------------------------------------------------------------- /.settings/org.eclipse.buildship.core.prefs: -------------------------------------------------------------------------------- 1 | #Sun Apr 15 10:50:25 ART 2018 2 | connection.project.dir= 3 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # UnityPlayerActivity Extension 2 | 3 | The solution to Android plugins collision. 4 | 5 | # Support this project for Unity to implement 6 | 7 | Vote here: [Unity Feedback Ticket](https://feedback.unity3d.com/suggestions/provide-unityplayeractivity-events-for-unity-android) 8 | 9 | Watch it here: [Unity Community Post](https://forum.unity.com/threads/no-more-extending-unityplayeractivity-feature-request-storytelling.526834/) 10 | 11 | 12 | # Description 13 | 14 | When we want to create a `Unity android plugin` that will use any method of the `Activity` class we are forced to extend `UnityPlayerActivity` class. 15 | 16 | That is not a problem for us, it's possible and simple. Following Unity [documentation](https://docs.unity3d.com/Manual/AndroidUnityPlayerActivity.html) to extend this class and implement it in our project should take us 10-20 minutes to have a simple plugin in our project running. 17 | 18 | But what happen when we want to create antoher plugin that also will need to listen `Activity` methods. Well nevermind, we can `merge` two plugins into one right? Messy but works... 19 | 20 | But the real problem comes when `3rd party plugins` also extend from `UnityPlayerActivity` and merging our plugins and others it would be unsustainable and a problem for us. Imagine that every time a plugin provider release a new version that changes something of it class extending from UnityPlayerActivity, we will have to: 21 | 22 | * Find plugin source code (if it's open source). 23 | * Create our UnityActivityPlayer. 24 | * Merge plugin codes with our UnityPlayerActivity custom class. 25 | * Build our `.aar` 26 | * Modify the AndroidManifest.xml 27 | * Test that all lives in harmony 28 | 29 | **Really tedious right?** 30 | 31 | And if you don't know anything about Android or Java or exporting .aar files you will be in a bigger problem. 32 | 33 | # What this project do? 34 | 35 | This project solves this problem. But to really work it must be a standard, and what better way to be a standard than to implement Unity itself. 36 | 37 | To give you a summary of what this project does, it provide the way to listen an Activity lifecycle method `without extending from UnityPlayerActivity`. 38 | 39 | ## Bad Example 40 | 41 | Imagine you want to create your first android plugin for Unity, let's call it MyHelloWorldPlugin. It will be an awesome plugin that will `Log` every Activity method that is executed. 42 | 43 | Since we need to know about Activity events, following Unity [documentation](https://docs.unity3d.com/Manual/AndroidUnityPlayerActivity.html) tells us to extend UnityPlayerActivity to have interaction with Android OS and Unity Application 44 | 45 | 46 | When developing a Unity Android application, it is possible to extend the standard UnityPlayerActivity class (the primary Java class for the Unity Player on Android, similar to AppController.mm on Unity iOS) by using plug-ins. An application can override any and all of the basic interaction between the Android OS and the Unity Android application. 47 | 48 | So we extend from UnityPlayerActivity, let's call this class `MyCustomUnityPlayerActivity`, and we log every Activity method with cool mesages. 49 | 50 | So when the Activity `onCreate` method is executed we will log 51 | 52 | ```bash 53 | onCreate: Wow! I've been created from MyHelloWorldPlugin! 54 | onStart: Nice! Now we can start doing things! 55 | . 56 | . 57 | . 58 | onDestroy: Ou! We are been destroyed! Bye World! 59 | ``` 60 | 61 | Cool right? 62 | 63 | We build our `.aar` (Android library) file containing our new `MyCustomUnityPlayerActivity`, we place it under `Assets/Plugins/Android` and now we have to tell Android to use our custom Activity instead of Unity Activity. So we create an AndroidManifest.xml `Plugins/Android` folder. 64 | 65 | ```xml 66 | 67 | 68 | 69 | 70 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | ``` 81 | 82 | We build the `.apk` file, watch the logs and everything is working fine. So now we published to the world! 83 | 84 | Let's imagine that Ed, a developer who is just starting using Unity, saw your awesome plugin and wants to integrate it. He will have to: 85 | 86 | * Import your plugin 87 | * Change his AndroidManifest.xml main Activity to yours. 88 | 89 | But imagine Ed already has another plugin that also need to be the main activity. Ed doesn't know how to merge those plugins so he spend weeks learning how to create a Android project, how to extend from UnityPlayerActivity, being in forums asking for help etc. 90 | 91 | Time wasted...poor Ed. 92 | 93 | ## The Happy Path 94 | 95 | Imagine Unity provides us this project feature, to listen the Main Activity events. Let's create the same `MyHelloWorldPlugin` but now instead of extending UnityPlayerActivity i will do the following steps: 96 | 97 | Create what should be my "CustomUnityPlayerActivity" but instead i will create a "MyHelloWorldActivityListener" and will extend from a class that "Unity provide us" called `UnityActivityListener` that will facilitate the methods of an activity. Lets see a code example 98 | 99 | ```java 100 | package com.unity.myhelloworldplugin; 101 | 102 | import android.content.Intent; 103 | import android.os.Bundle; 104 | import android.util.Log; 105 | 106 | import martingonzalez.com.unityplayeractivityextension.UnityActivityListener; 107 | 108 | public class MyHelloWorldActivityListener extends UnityActivityListener { 109 | private static final String MY_PLUGIN_TAG = "MyPluginTag"; 110 | 111 | @Override 112 | public void onCreate(Bundle savedInstanceState) { 113 | Log.d(MY_PLUGIN_TAG, "Hello World from onCreate Method!"); 114 | } 115 | 116 | @Override 117 | public void onNewIntent(Intent intent) { 118 | Log.d(MY_PLUGIN_TAG, "Hello World from onNewIntent Method! Yes im listening this too! Awesome!"); 119 | } 120 | 121 | @Override 122 | public void onStop() { 123 | Log.d(MY_PLUGIN_TAG, "Ow! The app was stopped so Bye World!"); 124 | } 125 | 126 | @Override 127 | public void onResume() { 128 | Log.d(MY_PLUGIN_TAG, "OHH! We are back! HELLO AGAIN!"); 129 | } 130 | } 131 | ``` 132 | 133 | Here we are lying to our plugin, telling him it will be like an activity, but it is not, it is `listening` to the Main Activity. 134 | 135 | After doing this i will add something to my plugin `AndroidManifest.xml` so when Unity merges every AndroidManifests of the project, we will be sure that this `meta-data` is on it. 136 | 137 | ```xml 138 | 140 | 141 | 142 | 143 | 144 | ``` 145 | 146 | See how i created a `meta-data` node where it has: 147 | 148 | key: `com.unity.activity.listener.MyHelloWorld` 149 | 150 | value: `com.unity.myhelloworldplugin.MyHelloWorldActivityListener` 151 | 152 | What "Unity will do" _(remember Unity does not have this project feature)_ in its activity is to find all the keys of its metadata that contain the prefix `com.unity.activity.listener` following by an identifier for your plugin. In this case our plugin id is `.MyHelloWorld` and create an instance of the class that we are setting as a value in the meta-data. In this case Unity will create an instance of our `com.unity.myhelloworldplugin.MyHelloWorldActivityListener` class. 153 | 154 | Nice! Now we can create our `.aar` file and import it into Unity under 'Assets/Plugins/Android' without touching the project AndroidManifest.xml and even we are not forcing to set any Main Activity! 155 | 156 | Imagine everybody following this rule, there will be no collision between plugins! 157 | 158 | 159 | ## Usage 160 | 161 | Since Unity does not have this feature implemented we will need to override the UnityPlayerActivity, but this time for a good reason. 162 | 163 | You can use the `unityActivityListener.package` to import the `.aar` file in your project or 164 | find a `.aar` file in the [UnityExampleAndroidPlugin](https://github.com/MartinGonzalez/UnityPlayerActivityListener/tree/master/UnityPlayerActivityListenersExample/Assets/Plugins/Android) folder called `com.unity.extended.aar`, that will be our MainActivity now, 165 | 166 | Let's check the `AndroidManifest.xml` file also in that folder. 167 | 168 | 169 | ```xml 170 | 171 | 174 | 175 | 176 | 177 | 178 | 179 | 180 | 181 | 182 | 183 | 184 | ``` 185 | 186 | I know, it's not cool the path `martingonzalez.com.unityplayeractivityextension.UnityPlayerActivityExtension` but imagine if Unity integrate this in it's own `UnityPlayerActivity`, we don't even have to create an AndroidManifest in `Plugins/Android`. 187 | 188 | Importing this into your projects you can manage several plugins that require listening to an activity. 189 | 190 | But since this is not a `standard` if you are using a plugin that extends from UnityPlayerActivity you will need to modify the plugin Activity. Yes, it's not right but thats why i rise a ticket asking for this feature. 191 | 192 | # From Extending UnityPlayerActivity to Listen Activity events 193 | 194 | Let's create a real example how to transform a plugin that is extending from UntiyPlayerActivity and add it into our project without changing anything. 195 | 196 | Clone this repository. 197 | 198 | You will find a folder called `badexample`. Inside has a small plugin project that is extending from UnityPlayerActivity. 199 | 200 | ```java 201 | package martingonzalez.com.badexample; 202 | 203 | import android.os.Bundle; 204 | import android.util.Log; 205 | 206 | import com.unity3d.player.UnityPlayerActivity; 207 | 208 | public class MyCustomUnityPlayerActivity extends UnityPlayerActivity { 209 | private static final String MY_BAD_TAG = "BadTag"; 210 | 211 | @Override 212 | protected void onCreate(Bundle bundle) { 213 | super.onCreate(bundle); 214 | 215 | Log.d(MY_BAD_TAG, "I've override onCreate! Nice!"); 216 | } 217 | } 218 | ``` 219 | 220 | If we want to use this plugin we would need to change our AndroidManifest.xml in our project saying that the MAIN Activity will be `martingonzalez.com.badexample.MyCustomUnityPlayerActivity` but we don't want that! So... 221 | 222 | Using AndroidStudio i will open this project and do the following steps: 223 | 224 | - Go to badexample/build.gradle file and change 225 | 226 | this: 227 | 228 | ```gradle 229 | dependencies { 230 | implementation fileTree(include: ['*.jar'], excludes: ['UnityClasses-2017.4.1f1.jar'], dir: 'libs') 231 | implementation 'com.android.support:appcompat-v7:27.1.1' 232 | compileOnly files('libs/UnityClasses-2017.4.1f1.jar') 233 | } 234 | ``` 235 | 236 | to: 237 | 238 | ```gradle 239 | dependencies { 240 | implementation fileTree(include: ['*.jar'], excludes: ['UnityClasses-2017.4.1f1.jar'], dir: 'libs') 241 | implementation 'com.android.support:appcompat-v7:27.1.1' 242 | compileOnly project(path: ':unityplayeractivityextension') 243 | } 244 | ``` 245 | 246 | We are changing the dependency of which library we have to use. In this case we need to have a reference to `unityplayeractivityextension` project, but if Unity would provide us this feature we would only need to integrate Unity `classes.jar` in our plugin libs folder as a library. 247 | 248 | Then we need to take out the UnityPlayerActivity extension from our `MyCustomUnityPlayerActivity.java` and instead we are going to extend from 'UnityActivityListener' 249 | 250 | So our java class now would be like this: 251 | 252 | ```java 253 | package martingonzalez.com.badexample; 254 | 255 | import android.os.Bundle; 256 | import android.util.Log; 257 | 258 | import martingonzalez.com.unityplayeractivityextension.UnityActivityListener; 259 | 260 | public class MyCustomUnityPlayerActivity extends UnityActivityListener { 261 | private static final String MY_BAD_TAG = "BadTag"; 262 | 263 | @Override 264 | public void onCreate(Bundle bundle) { 265 | Log.d(MY_BAD_TAG, "I've override onCreate! Nice!"); 266 | } 267 | } 268 | ``` 269 | 270 | And one las step is to add the prefix `com.unity.activity.listener` into our plugin AndroidManifest.xml. 271 | 272 | So go to `badexample/src/main/AndroidManifest.xml` and configure it like this: 273 | 274 | ```xml 275 | 277 | 278 | 279 | 282 | 283 | 284 | 285 | ``` 286 | 287 | That's all! 288 | 289 | Now hit on Gradle at the right side of the editor, expand _:badexample -> Tasks -> Build -> Double click on build task_ and after build suceed you can find `.aar` file on `badexample/build/outputs/aar/com.me.myhelloworld-plugin.aar` 290 | 291 | Take that `.aar` file and import it into `UnityPlayerActivityListenersExample/Assets/Plugins/Android`. (Project was made with *Unity 2014.1f1*) 292 | 293 | Build the `.apk` and run it on a device or emulator and you will see this in the logcat 294 | 295 | ```bash 296 | 04-15 16:04:15.702 1622-3564/? I/ActivityManager: START u0 {act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] flg=0x10200000 cmp=com.martingonzalez.unityplayeractivityextension/martingonzalez.com.unityplayeractivityextension.UnityPlayerActivityExtension} from uid 2000 297 | 04-15 16:04:15.729 1622-2247/? I/ActivityManager: Start proc 23683:com.martingonzalez.unityplayeractivityextension/u0a91 for activity com.martingonzalez.unityplayeractivityextension/martingonzalez.com.unityplayeractivityextension.UnityPlayerActivityExtension 298 | 04-15 16:04:15.813 23683-23683/? D/Unity: #### onCreate from UnityPlayerActivityExtension 299 | #### Creating Activity Listeners 300 | 04-15 16:04:15.815 23683-23683/? D/Unity: #### Activity Listener Found: 301 | #### 302 | #### |_: martingonzalez.com.badexample.MyCustomUnityPlayerActivity 303 | #### |_: com.unity.myhelloworldplugin.MyHelloWorldActivityListener 304 | ############################## 305 | 04-15 16:04:15.816 23683-23683/? D/Unity: #### onStart from UnityPlayerActivityExtension 306 | 04-15 16:04:15.818 23683-23683/? D/Unity: #### onResume from UnityPlayerActivityExtension 307 | 04-15 16:04:16.079 23683-23683/? D/Unity: #### onWindowFocusChanged from UnityPlayerActivityExtension 308 | ``` 309 | 310 | See how our UnityPlayerActivityExtension found `martingonzalez.com.badexample.MyCustomUnityPlayerActivity` 311 | 312 | And if we filter the log with out plugin tag that is "BadTag" we will see this: 313 | 314 | ```bash 315 | 04-15 16:04:15.815 23683-23683/? D/BadTag: I've override onCreate! Nice! 316 | ``` 317 | 318 | That's all! 319 | 320 | Remember to vote the [Unity Feedback Ticket](https://feedback.unity3d.com/suggestions/provide-unityplayeractivity-events-for-unity-android) so this can be part of Unity itself. 321 | -------------------------------------------------------------------------------- /UnityPlayerActivityListenersExample/.gitignore: -------------------------------------------------------------------------------- 1 | Library/ 2 | Temp/ 3 | obj/ 4 | .vs/ 5 | .vscode/ 6 | .idea/ 7 | 8 | **/.DS_Store 9 | *.sln 10 | *.csproj 11 | *.log 12 | *.tgz" 13 | *.mobileprovision 14 | *.DotSettings -------------------------------------------------------------------------------- /UnityPlayerActivityListenersExample/Assets/Demo.unity: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!29 &1 4 | OcclusionCullingSettings: 5 | m_ObjectHideFlags: 0 6 | serializedVersion: 2 7 | m_OcclusionBakeSettings: 8 | smallestOccluder: 5 9 | smallestHole: 0.25 10 | backfaceThreshold: 100 11 | m_SceneGUID: 00000000000000000000000000000000 12 | m_OcclusionCullingData: {fileID: 0} 13 | --- !u!104 &2 14 | RenderSettings: 15 | m_ObjectHideFlags: 0 16 | serializedVersion: 8 17 | m_Fog: 0 18 | m_FogColor: {r: 0.5, g: 0.5, b: 0.5, a: 1} 19 | m_FogMode: 3 20 | m_FogDensity: 0.01 21 | m_LinearFogStart: 0 22 | m_LinearFogEnd: 300 23 | m_AmbientSkyColor: {r: 0.212, g: 0.227, b: 0.259, a: 1} 24 | m_AmbientEquatorColor: {r: 0.114, g: 0.125, b: 0.133, a: 1} 25 | m_AmbientGroundColor: {r: 0.047, g: 0.043, b: 0.035, a: 1} 26 | m_AmbientIntensity: 1 27 | m_AmbientMode: 0 28 | m_SubtractiveShadowColor: {r: 0.42, g: 0.478, b: 0.627, a: 1} 29 | m_SkyboxMaterial: {fileID: 10304, guid: 0000000000000000f000000000000000, type: 0} 30 | m_HaloStrength: 0.5 31 | m_FlareStrength: 1 32 | m_FlareFadeSpeed: 3 33 | m_HaloTexture: {fileID: 0} 34 | m_SpotCookie: {fileID: 10001, guid: 0000000000000000e000000000000000, type: 0} 35 | m_DefaultReflectionMode: 0 36 | m_DefaultReflectionResolution: 128 37 | m_ReflectionBounces: 1 38 | m_ReflectionIntensity: 1 39 | m_CustomReflection: {fileID: 0} 40 | m_Sun: {fileID: 0} 41 | m_IndirectSpecularColor: {r: 0.4465785, g: 0.49641252, b: 0.574817, a: 1} 42 | --- !u!157 &3 43 | LightmapSettings: 44 | m_ObjectHideFlags: 0 45 | serializedVersion: 11 46 | m_GIWorkflowMode: 0 47 | m_GISettings: 48 | serializedVersion: 2 49 | m_BounceScale: 1 50 | m_IndirectOutputScale: 1 51 | m_AlbedoBoost: 1 52 | m_TemporalCoherenceThreshold: 1 53 | m_EnvironmentLightingMode: 0 54 | m_EnableBakedLightmaps: 1 55 | m_EnableRealtimeLightmaps: 1 56 | m_LightmapEditorSettings: 57 | serializedVersion: 9 58 | m_Resolution: 2 59 | m_BakeResolution: 40 60 | m_TextureWidth: 1024 61 | m_TextureHeight: 1024 62 | m_AO: 0 63 | m_AOMaxDistance: 1 64 | m_CompAOExponent: 1 65 | m_CompAOExponentDirect: 0 66 | m_Padding: 2 67 | m_LightmapParameters: {fileID: 0} 68 | m_LightmapsBakeMode: 1 69 | m_TextureCompression: 1 70 | m_FinalGather: 0 71 | m_FinalGatherFiltering: 1 72 | m_FinalGatherRayCount: 256 73 | m_ReflectionCompression: 2 74 | m_MixedBakeMode: 2 75 | m_BakeBackend: 0 76 | m_PVRSampling: 1 77 | m_PVRDirectSampleCount: 32 78 | m_PVRSampleCount: 500 79 | m_PVRBounces: 2 80 | m_PVRFilterTypeDirect: 0 81 | m_PVRFilterTypeIndirect: 0 82 | m_PVRFilterTypeAO: 0 83 | m_PVRFilteringMode: 1 84 | m_PVRCulling: 1 85 | m_PVRFilteringGaussRadiusDirect: 1 86 | m_PVRFilteringGaussRadiusIndirect: 5 87 | m_PVRFilteringGaussRadiusAO: 2 88 | m_PVRFilteringAtrousPositionSigmaDirect: 0.5 89 | m_PVRFilteringAtrousPositionSigmaIndirect: 2 90 | m_PVRFilteringAtrousPositionSigmaAO: 1 91 | m_ShowResolutionOverlay: 1 92 | m_LightingDataAsset: {fileID: 0} 93 | m_UseShadowmask: 1 94 | --- !u!196 &4 95 | NavMeshSettings: 96 | serializedVersion: 2 97 | m_ObjectHideFlags: 0 98 | m_BuildSettings: 99 | serializedVersion: 2 100 | agentTypeID: 0 101 | agentRadius: 0.5 102 | agentHeight: 2 103 | agentSlope: 45 104 | agentClimb: 0.4 105 | ledgeDropHeight: 0 106 | maxJumpAcrossDistance: 0 107 | minRegionArea: 2 108 | manualCellSize: 0 109 | cellSize: 0.16666667 110 | manualTileSize: 0 111 | tileSize: 256 112 | accuratePlacement: 0 113 | debug: 114 | m_Flags: 0 115 | m_NavMeshData: {fileID: 0} 116 | --- !u!1 &665108879 117 | GameObject: 118 | m_ObjectHideFlags: 0 119 | m_PrefabParentObject: {fileID: 0} 120 | m_PrefabInternal: {fileID: 0} 121 | serializedVersion: 5 122 | m_Component: 123 | - component: {fileID: 665108883} 124 | - component: {fileID: 665108882} 125 | - component: {fileID: 665108881} 126 | - component: {fileID: 665108880} 127 | m_Layer: 5 128 | m_Name: Canvas 129 | m_TagString: Untagged 130 | m_Icon: {fileID: 0} 131 | m_NavMeshLayer: 0 132 | m_StaticEditorFlags: 0 133 | m_IsActive: 1 134 | --- !u!114 &665108880 135 | MonoBehaviour: 136 | m_ObjectHideFlags: 0 137 | m_PrefabParentObject: {fileID: 0} 138 | m_PrefabInternal: {fileID: 0} 139 | m_GameObject: {fileID: 665108879} 140 | m_Enabled: 1 141 | m_EditorHideFlags: 0 142 | m_Script: {fileID: 1301386320, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} 143 | m_Name: 144 | m_EditorClassIdentifier: 145 | m_IgnoreReversedGraphics: 1 146 | m_BlockingObjects: 0 147 | m_BlockingMask: 148 | serializedVersion: 2 149 | m_Bits: 4294967295 150 | --- !u!114 &665108881 151 | MonoBehaviour: 152 | m_ObjectHideFlags: 0 153 | m_PrefabParentObject: {fileID: 0} 154 | m_PrefabInternal: {fileID: 0} 155 | m_GameObject: {fileID: 665108879} 156 | m_Enabled: 1 157 | m_EditorHideFlags: 0 158 | m_Script: {fileID: 1980459831, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} 159 | m_Name: 160 | m_EditorClassIdentifier: 161 | m_UiScaleMode: 0 162 | m_ReferencePixelsPerUnit: 100 163 | m_ScaleFactor: 1 164 | m_ReferenceResolution: {x: 800, y: 600} 165 | m_ScreenMatchMode: 0 166 | m_MatchWidthOrHeight: 0 167 | m_PhysicalUnit: 3 168 | m_FallbackScreenDPI: 96 169 | m_DefaultSpriteDPI: 96 170 | m_DynamicPixelsPerUnit: 1 171 | --- !u!223 &665108882 172 | Canvas: 173 | m_ObjectHideFlags: 0 174 | m_PrefabParentObject: {fileID: 0} 175 | m_PrefabInternal: {fileID: 0} 176 | m_GameObject: {fileID: 665108879} 177 | m_Enabled: 1 178 | serializedVersion: 3 179 | m_RenderMode: 0 180 | m_Camera: {fileID: 0} 181 | m_PlaneDistance: 100 182 | m_PixelPerfect: 0 183 | m_ReceivesEvents: 1 184 | m_OverrideSorting: 0 185 | m_OverridePixelPerfect: 0 186 | m_SortingBucketNormalizedSize: 0 187 | m_AdditionalShaderChannelsFlag: 0 188 | m_SortingLayerID: 0 189 | m_SortingOrder: 0 190 | m_TargetDisplay: 0 191 | --- !u!224 &665108883 192 | RectTransform: 193 | m_ObjectHideFlags: 0 194 | m_PrefabParentObject: {fileID: 0} 195 | m_PrefabInternal: {fileID: 0} 196 | m_GameObject: {fileID: 665108879} 197 | m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} 198 | m_LocalPosition: {x: 0, y: 0, z: 0} 199 | m_LocalScale: {x: 0, y: 0, z: 0} 200 | m_Children: 201 | - {fileID: 1764194042} 202 | m_Father: {fileID: 0} 203 | m_RootOrder: 2 204 | m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} 205 | m_AnchorMin: {x: 0, y: 0} 206 | m_AnchorMax: {x: 0, y: 0} 207 | m_AnchoredPosition: {x: 0, y: 0} 208 | m_SizeDelta: {x: 0, y: 0} 209 | m_Pivot: {x: 0, y: 0} 210 | --- !u!1 &762564918 211 | GameObject: 212 | m_ObjectHideFlags: 0 213 | m_PrefabParentObject: {fileID: 0} 214 | m_PrefabInternal: {fileID: 0} 215 | serializedVersion: 5 216 | m_Component: 217 | - component: {fileID: 762564921} 218 | - component: {fileID: 762564920} 219 | - component: {fileID: 762564919} 220 | m_Layer: 0 221 | m_Name: EventSystem 222 | m_TagString: Untagged 223 | m_Icon: {fileID: 0} 224 | m_NavMeshLayer: 0 225 | m_StaticEditorFlags: 0 226 | m_IsActive: 1 227 | --- !u!114 &762564919 228 | MonoBehaviour: 229 | m_ObjectHideFlags: 0 230 | m_PrefabParentObject: {fileID: 0} 231 | m_PrefabInternal: {fileID: 0} 232 | m_GameObject: {fileID: 762564918} 233 | m_Enabled: 1 234 | m_EditorHideFlags: 0 235 | m_Script: {fileID: 1077351063, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} 236 | m_Name: 237 | m_EditorClassIdentifier: 238 | m_HorizontalAxis: Horizontal 239 | m_VerticalAxis: Vertical 240 | m_SubmitButton: Submit 241 | m_CancelButton: Cancel 242 | m_InputActionsPerSecond: 10 243 | m_RepeatDelay: 0.5 244 | m_ForceModuleActive: 0 245 | --- !u!114 &762564920 246 | MonoBehaviour: 247 | m_ObjectHideFlags: 0 248 | m_PrefabParentObject: {fileID: 0} 249 | m_PrefabInternal: {fileID: 0} 250 | m_GameObject: {fileID: 762564918} 251 | m_Enabled: 1 252 | m_EditorHideFlags: 0 253 | m_Script: {fileID: -619905303, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} 254 | m_Name: 255 | m_EditorClassIdentifier: 256 | m_FirstSelected: {fileID: 0} 257 | m_sendNavigationEvents: 1 258 | m_DragThreshold: 5 259 | --- !u!4 &762564921 260 | Transform: 261 | m_ObjectHideFlags: 0 262 | m_PrefabParentObject: {fileID: 0} 263 | m_PrefabInternal: {fileID: 0} 264 | m_GameObject: {fileID: 762564918} 265 | m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} 266 | m_LocalPosition: {x: 0, y: 0, z: 0} 267 | m_LocalScale: {x: 1, y: 1, z: 1} 268 | m_Children: [] 269 | m_Father: {fileID: 0} 270 | m_RootOrder: 3 271 | m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} 272 | --- !u!1 &1152922701 273 | GameObject: 274 | m_ObjectHideFlags: 0 275 | m_PrefabParentObject: {fileID: 0} 276 | m_PrefabInternal: {fileID: 0} 277 | serializedVersion: 5 278 | m_Component: 279 | - component: {fileID: 1152922703} 280 | - component: {fileID: 1152922702} 281 | m_Layer: 0 282 | m_Name: Directional Light 283 | m_TagString: Untagged 284 | m_Icon: {fileID: 0} 285 | m_NavMeshLayer: 0 286 | m_StaticEditorFlags: 0 287 | m_IsActive: 1 288 | --- !u!108 &1152922702 289 | Light: 290 | m_ObjectHideFlags: 0 291 | m_PrefabParentObject: {fileID: 0} 292 | m_PrefabInternal: {fileID: 0} 293 | m_GameObject: {fileID: 1152922701} 294 | m_Enabled: 1 295 | serializedVersion: 8 296 | m_Type: 1 297 | m_Color: {r: 1, g: 0.95686275, b: 0.8392157, a: 1} 298 | m_Intensity: 1 299 | m_Range: 10 300 | m_SpotAngle: 30 301 | m_CookieSize: 10 302 | m_Shadows: 303 | m_Type: 2 304 | m_Resolution: -1 305 | m_CustomResolution: -1 306 | m_Strength: 1 307 | m_Bias: 0.05 308 | m_NormalBias: 0.4 309 | m_NearPlane: 0.2 310 | m_Cookie: {fileID: 0} 311 | m_DrawHalo: 0 312 | m_Flare: {fileID: 0} 313 | m_RenderMode: 0 314 | m_CullingMask: 315 | serializedVersion: 2 316 | m_Bits: 4294967295 317 | m_Lightmapping: 4 318 | m_AreaSize: {x: 1, y: 1} 319 | m_BounceIntensity: 1 320 | m_ColorTemperature: 6570 321 | m_UseColorTemperature: 0 322 | m_ShadowRadius: 0 323 | m_ShadowAngle: 0 324 | --- !u!4 &1152922703 325 | Transform: 326 | m_ObjectHideFlags: 0 327 | m_PrefabParentObject: {fileID: 0} 328 | m_PrefabInternal: {fileID: 0} 329 | m_GameObject: {fileID: 1152922701} 330 | m_LocalRotation: {x: 0.40821788, y: -0.23456968, z: 0.10938163, w: 0.8754261} 331 | m_LocalPosition: {x: 0, y: 3, z: 0} 332 | m_LocalScale: {x: 1, y: 1, z: 1} 333 | m_Children: [] 334 | m_Father: {fileID: 0} 335 | m_RootOrder: 1 336 | m_LocalEulerAnglesHint: {x: 50, y: -30, z: 0} 337 | --- !u!1 &1764194041 338 | GameObject: 339 | m_ObjectHideFlags: 0 340 | m_PrefabParentObject: {fileID: 0} 341 | m_PrefabInternal: {fileID: 0} 342 | serializedVersion: 5 343 | m_Component: 344 | - component: {fileID: 1764194042} 345 | - component: {fileID: 1764194044} 346 | - component: {fileID: 1764194043} 347 | m_Layer: 5 348 | m_Name: Text 349 | m_TagString: Untagged 350 | m_Icon: {fileID: 0} 351 | m_NavMeshLayer: 0 352 | m_StaticEditorFlags: 0 353 | m_IsActive: 1 354 | --- !u!224 &1764194042 355 | RectTransform: 356 | m_ObjectHideFlags: 0 357 | m_PrefabParentObject: {fileID: 0} 358 | m_PrefabInternal: {fileID: 0} 359 | m_GameObject: {fileID: 1764194041} 360 | m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} 361 | m_LocalPosition: {x: 0, y: 0, z: 0} 362 | m_LocalScale: {x: 1, y: 1, z: 1} 363 | m_Children: [] 364 | m_Father: {fileID: 665108883} 365 | m_RootOrder: 0 366 | m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} 367 | m_AnchorMin: {x: 0, y: 0} 368 | m_AnchorMax: {x: 1, y: 1} 369 | m_AnchoredPosition: {x: 0, y: 0.014923096} 370 | m_SizeDelta: {x: 0, y: 0} 371 | m_Pivot: {x: 0.5, y: 0.5} 372 | --- !u!114 &1764194043 373 | MonoBehaviour: 374 | m_ObjectHideFlags: 0 375 | m_PrefabParentObject: {fileID: 0} 376 | m_PrefabInternal: {fileID: 0} 377 | m_GameObject: {fileID: 1764194041} 378 | m_Enabled: 1 379 | m_EditorHideFlags: 0 380 | m_Script: {fileID: 708705254, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} 381 | m_Name: 382 | m_EditorClassIdentifier: 383 | m_Material: {fileID: 0} 384 | m_Color: {r: 0.19607843, g: 0.19607843, b: 0.19607843, a: 1} 385 | m_RaycastTarget: 1 386 | m_OnCullStateChanged: 387 | m_PersistentCalls: 388 | m_Calls: [] 389 | m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI, 390 | Version=1.0.0.0, Culture=neutral, PublicKeyToken=null 391 | m_FontData: 392 | m_Font: {fileID: 10102, guid: 0000000000000000e000000000000000, type: 0} 393 | m_FontSize: 51 394 | m_FontStyle: 0 395 | m_BestFit: 0 396 | m_MinSize: 10 397 | m_MaxSize: 59 398 | m_Alignment: 4 399 | m_AlignByGeometry: 0 400 | m_RichText: 1 401 | m_HorizontalOverflow: 0 402 | m_VerticalOverflow: 0 403 | m_LineSpacing: 1 404 | m_Text: Everything is COOL! 405 | --- !u!222 &1764194044 406 | CanvasRenderer: 407 | m_ObjectHideFlags: 0 408 | m_PrefabParentObject: {fileID: 0} 409 | m_PrefabInternal: {fileID: 0} 410 | m_GameObject: {fileID: 1764194041} 411 | --- !u!1 &2012325773 412 | GameObject: 413 | m_ObjectHideFlags: 0 414 | m_PrefabParentObject: {fileID: 0} 415 | m_PrefabInternal: {fileID: 0} 416 | serializedVersion: 5 417 | m_Component: 418 | - component: {fileID: 2012325777} 419 | - component: {fileID: 2012325776} 420 | - component: {fileID: 2012325775} 421 | - component: {fileID: 2012325774} 422 | m_Layer: 0 423 | m_Name: Main Camera 424 | m_TagString: MainCamera 425 | m_Icon: {fileID: 0} 426 | m_NavMeshLayer: 0 427 | m_StaticEditorFlags: 0 428 | m_IsActive: 1 429 | --- !u!81 &2012325774 430 | AudioListener: 431 | m_ObjectHideFlags: 0 432 | m_PrefabParentObject: {fileID: 0} 433 | m_PrefabInternal: {fileID: 0} 434 | m_GameObject: {fileID: 2012325773} 435 | m_Enabled: 1 436 | --- !u!124 &2012325775 437 | Behaviour: 438 | m_ObjectHideFlags: 0 439 | m_PrefabParentObject: {fileID: 0} 440 | m_PrefabInternal: {fileID: 0} 441 | m_GameObject: {fileID: 2012325773} 442 | m_Enabled: 1 443 | --- !u!20 &2012325776 444 | Camera: 445 | m_ObjectHideFlags: 0 446 | m_PrefabParentObject: {fileID: 0} 447 | m_PrefabInternal: {fileID: 0} 448 | m_GameObject: {fileID: 2012325773} 449 | m_Enabled: 1 450 | serializedVersion: 2 451 | m_ClearFlags: 1 452 | m_BackGroundColor: {r: 0.19215687, g: 0.3019608, b: 0.4745098, a: 0} 453 | m_NormalizedViewPortRect: 454 | serializedVersion: 2 455 | x: 0 456 | y: 0 457 | width: 1 458 | height: 1 459 | near clip plane: 0.3 460 | far clip plane: 1000 461 | field of view: 60 462 | orthographic: 0 463 | orthographic size: 5 464 | m_Depth: -1 465 | m_CullingMask: 466 | serializedVersion: 2 467 | m_Bits: 4294967295 468 | m_RenderingPath: -1 469 | m_TargetTexture: {fileID: 0} 470 | m_TargetDisplay: 0 471 | m_TargetEye: 3 472 | m_HDR: 1 473 | m_AllowMSAA: 1 474 | m_AllowDynamicResolution: 0 475 | m_ForceIntoRT: 0 476 | m_OcclusionCulling: 1 477 | m_StereoConvergence: 10 478 | m_StereoSeparation: 0.022 479 | --- !u!4 &2012325777 480 | Transform: 481 | m_ObjectHideFlags: 0 482 | m_PrefabParentObject: {fileID: 0} 483 | m_PrefabInternal: {fileID: 0} 484 | m_GameObject: {fileID: 2012325773} 485 | m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} 486 | m_LocalPosition: {x: 0, y: 1, z: -10} 487 | m_LocalScale: {x: 1, y: 1, z: 1} 488 | m_Children: [] 489 | m_Father: {fileID: 0} 490 | m_RootOrder: 0 491 | m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} 492 | -------------------------------------------------------------------------------- /UnityPlayerActivityListenersExample/Assets/Demo.unity.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: f9a15500d1a16470cbb599fd59dacfed 3 | timeCreated: 1523764871 4 | licenseType: Free 5 | DefaultImporter: 6 | externalObjects: {} 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /UnityPlayerActivityListenersExample/Assets/Plugins.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 13a2630a7feb14c23871351932b7f032 3 | folderAsset: yes 4 | timeCreated: 1523764631 5 | licenseType: Free 6 | DefaultImporter: 7 | externalObjects: {} 8 | userData: 9 | assetBundleName: 10 | assetBundleVariant: 11 | -------------------------------------------------------------------------------- /UnityPlayerActivityListenersExample/Assets/Plugins/Android.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 0df43b1bda2e14d20a8156cefb5788ad 3 | folderAsset: yes 4 | timeCreated: 1523764636 5 | licenseType: Free 6 | DefaultImporter: 7 | externalObjects: {} 8 | userData: 9 | assetBundleName: 10 | assetBundleVariant: 11 | -------------------------------------------------------------------------------- /UnityPlayerActivityListenersExample/Assets/Plugins/Android/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /UnityPlayerActivityListenersExample/Assets/Plugins/Android/AndroidManifest.xml.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: bbef7817c6f2f472fa95f37bf4d55576 3 | timeCreated: 1523764653 4 | licenseType: Free 5 | TextScriptImporter: 6 | externalObjects: {} 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /UnityPlayerActivityListenersExample/Assets/Plugins/Android/com.unity.extended.aar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MartinGonzalez/UnityPlayerActivityListener/c6dc846cfbdf2559e96e6fe097af3add94943278/UnityPlayerActivityListenersExample/Assets/Plugins/Android/com.unity.extended.aar -------------------------------------------------------------------------------- /UnityPlayerActivityListenersExample/Assets/Plugins/Android/com.unity.extended.aar.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 8de9e9510298f4c96962575ab97d371c 3 | timeCreated: 1533249072 4 | licenseType: Free 5 | PluginImporter: 6 | externalObjects: {} 7 | serializedVersion: 2 8 | iconMap: {} 9 | executionOrder: {} 10 | isPreloaded: 0 11 | isOverridable: 0 12 | platformData: 13 | - first: 14 | Android: Android 15 | second: 16 | enabled: 1 17 | settings: {} 18 | - first: 19 | Any: 20 | second: 21 | enabled: 0 22 | settings: {} 23 | - first: 24 | Editor: Editor 25 | second: 26 | enabled: 0 27 | settings: 28 | DefaultValueInitialized: true 29 | userData: 30 | assetBundleName: 31 | assetBundleVariant: 32 | -------------------------------------------------------------------------------- /UnityPlayerActivityListenersExample/Assets/Plugins/Android/com.unity.myhelloworld-plugin.aar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MartinGonzalez/UnityPlayerActivityListener/c6dc846cfbdf2559e96e6fe097af3add94943278/UnityPlayerActivityListenersExample/Assets/Plugins/Android/com.unity.myhelloworld-plugin.aar -------------------------------------------------------------------------------- /UnityPlayerActivityListenersExample/Assets/Plugins/Android/com.unity.myhelloworld-plugin.aar.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: d32a86fe8bd5c4b1bbf7a33f574523d5 3 | timeCreated: 1533249180 4 | licenseType: Free 5 | PluginImporter: 6 | externalObjects: {} 7 | serializedVersion: 2 8 | iconMap: {} 9 | executionOrder: {} 10 | isPreloaded: 0 11 | isOverridable: 0 12 | platformData: 13 | - first: 14 | Android: Android 15 | second: 16 | enabled: 1 17 | settings: {} 18 | - first: 19 | Any: 20 | second: 21 | enabled: 0 22 | settings: {} 23 | - first: 24 | Editor: Editor 25 | second: 26 | enabled: 0 27 | settings: 28 | DefaultValueInitialized: true 29 | userData: 30 | assetBundleName: 31 | assetBundleVariant: 32 | -------------------------------------------------------------------------------- /UnityPlayerActivityListenersExample/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_AmbisonicDecoderPlugin: 16 | m_DisableAudio: 0 17 | m_VirtualizeEffects: 1 18 | -------------------------------------------------------------------------------- /UnityPlayerActivityListenersExample/ProjectSettings/ClusterInputManager.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!236 &1 4 | ClusterInputManager: 5 | m_ObjectHideFlags: 0 6 | m_Inputs: [] 7 | -------------------------------------------------------------------------------- /UnityPlayerActivityListenersExample/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: 7 7 | m_Gravity: {x: 0, y: -9.81, z: 0} 8 | m_DefaultMaterial: {fileID: 0} 9 | m_BounceThreshold: 2 10 | m_SleepThreshold: 0.005 11 | m_DefaultContactOffset: 0.01 12 | m_DefaultSolverIterations: 6 13 | m_DefaultSolverVelocityIterations: 1 14 | m_QueriesHitBackfaces: 0 15 | m_QueriesHitTriggers: 1 16 | m_EnableAdaptiveForce: 0 17 | m_ClothInterCollisionDistance: 0 18 | m_ClothInterCollisionStiffness: 0 19 | m_ContactsGeneration: 1 20 | m_LayerCollisionMatrix: ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff 21 | m_AutoSimulation: 1 22 | m_AutoSyncTransforms: 1 23 | m_ClothInterCollisionSettingsToggle: 0 24 | m_ContactPairsMode: 0 25 | m_BroadphaseType: 0 26 | m_WorldBounds: 27 | m_Center: {x: 0, y: 0, z: 0} 28 | m_Extent: {x: 250, y: 250, z: 250} 29 | m_WorldSubdivisions: 8 30 | -------------------------------------------------------------------------------- /UnityPlayerActivityListenersExample/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 | -------------------------------------------------------------------------------- /UnityPlayerActivityListenersExample/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: 7 7 | m_ExternalVersionControlSupport: Hidden Meta Files 8 | m_SerializationMode: 2 9 | m_LineEndingsForNewScripts: 1 10 | m_DefaultBehaviorMode: 0 11 | m_SpritePackerMode: 0 12 | m_SpritePackerPaddingPower: 1 13 | m_EtcTextureCompressorBehavior: 1 14 | m_EtcTextureFastCompressor: 1 15 | m_EtcTextureNormalCompressor: 2 16 | m_EtcTextureBestCompressor: 4 17 | m_ProjectGenerationIncludedExtensions: txt;xml;fnt;cd;asmdef;rsp 18 | m_ProjectGenerationRootNamespace: 19 | m_UserGeneratedProjectSuffix: 20 | m_CollabEditorSettings: 21 | inProgressEnabled: 1 22 | -------------------------------------------------------------------------------- /UnityPlayerActivityListenersExample/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: 12 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_ScreenSpaceShadows: 14 | m_Mode: 1 15 | m_Shader: {fileID: 64, guid: 0000000000000000f000000000000000, type: 0} 16 | m_LegacyDeferred: 17 | m_Mode: 1 18 | m_Shader: {fileID: 63, guid: 0000000000000000f000000000000000, type: 0} 19 | m_DepthNormals: 20 | m_Mode: 1 21 | m_Shader: {fileID: 62, guid: 0000000000000000f000000000000000, type: 0} 22 | m_MotionVectors: 23 | m_Mode: 1 24 | m_Shader: {fileID: 75, guid: 0000000000000000f000000000000000, type: 0} 25 | m_LightHalo: 26 | m_Mode: 1 27 | m_Shader: {fileID: 105, guid: 0000000000000000f000000000000000, type: 0} 28 | m_LensFlare: 29 | m_Mode: 1 30 | m_Shader: {fileID: 102, guid: 0000000000000000f000000000000000, type: 0} 31 | m_AlwaysIncludedShaders: 32 | - {fileID: 7, guid: 0000000000000000f000000000000000, type: 0} 33 | - {fileID: 15104, guid: 0000000000000000f000000000000000, type: 0} 34 | - {fileID: 15105, guid: 0000000000000000f000000000000000, type: 0} 35 | - {fileID: 15106, guid: 0000000000000000f000000000000000, type: 0} 36 | - {fileID: 10753, guid: 0000000000000000f000000000000000, type: 0} 37 | - {fileID: 10770, guid: 0000000000000000f000000000000000, type: 0} 38 | - {fileID: 17000, guid: 0000000000000000f000000000000000, type: 0} 39 | - {fileID: 16000, guid: 0000000000000000f000000000000000, type: 0} 40 | - {fileID: 16002, guid: 0000000000000000f000000000000000, type: 0} 41 | m_PreloadedShaders: [] 42 | m_SpritesDefaultMaterial: {fileID: 10754, guid: 0000000000000000f000000000000000, 43 | type: 0} 44 | m_CustomRenderPipeline: {fileID: 0} 45 | m_TransparencySortMode: 0 46 | m_TransparencySortAxis: {x: 0, y: 0, z: 1} 47 | m_DefaultRenderingPath: 1 48 | m_DefaultMobileRenderingPath: 1 49 | m_TierSettings: [] 50 | m_LightmapStripping: 0 51 | m_FogStripping: 0 52 | m_InstancingStripping: 0 53 | m_LightmapKeepPlain: 1 54 | m_LightmapKeepDirCombined: 1 55 | m_LightmapKeepDynamicPlain: 1 56 | m_LightmapKeepDynamicDirCombined: 1 57 | m_LightmapKeepShadowMask: 1 58 | m_LightmapKeepSubtractive: 1 59 | m_FogKeepLinear: 1 60 | m_FogKeepExp: 1 61 | m_FogKeepExp2: 1 62 | m_AlbedoSwatchInfos: [] 63 | m_LightsUseLinearIntensity: 0 64 | m_LightsUseColorTemperature: 0 65 | -------------------------------------------------------------------------------- /UnityPlayerActivityListenersExample/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: 0.001 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: 0.001 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: 0.001 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: 0.001 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: 0.001 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: 0.001 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: 0.1 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: 0.1 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: 0.1 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: 0.19 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: 0.19 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: 0.001 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: 0.001 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: 0.001 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: 0.001 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: 0.001 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: 0.001 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: 0.001 290 | sensitivity: 1000 291 | snap: 0 292 | invert: 0 293 | type: 0 294 | axis: 0 295 | joyNum: 0 296 | -------------------------------------------------------------------------------- /UnityPlayerActivityListenersExample/ProjectSettings/NavMeshAreas.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!126 &1 4 | NavMeshProjectSettings: 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 | m_LastAgentTypeID: -887442657 73 | m_Settings: 74 | - serializedVersion: 2 75 | agentTypeID: 0 76 | agentRadius: 0.5 77 | agentHeight: 2 78 | agentSlope: 45 79 | agentClimb: 0.75 80 | ledgeDropHeight: 0 81 | maxJumpAcrossDistance: 0 82 | minRegionArea: 2 83 | manualCellSize: 0 84 | cellSize: 0.16666667 85 | manualTileSize: 0 86 | tileSize: 256 87 | accuratePlacement: 0 88 | debug: 89 | m_Flags: 0 90 | m_SettingNames: 91 | - Humanoid 92 | -------------------------------------------------------------------------------- /UnityPlayerActivityListenersExample/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 | -------------------------------------------------------------------------------- /UnityPlayerActivityListenersExample/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: 3 7 | m_Gravity: {x: 0, y: -9.81} 8 | m_DefaultMaterial: {fileID: 0} 9 | m_VelocityIterations: 8 10 | m_PositionIterations: 3 11 | m_VelocityThreshold: 1 12 | m_MaxLinearCorrection: 0.2 13 | m_MaxAngularCorrection: 8 14 | m_MaxTranslationSpeed: 100 15 | m_MaxRotationSpeed: 360 16 | m_BaumgarteScale: 0.2 17 | m_BaumgarteTimeOfImpactScale: 0.75 18 | m_TimeToSleep: 0.5 19 | m_LinearSleepTolerance: 0.01 20 | m_AngularSleepTolerance: 2 21 | m_DefaultContactOffset: 0.01 22 | m_AutoSimulation: 1 23 | m_QueriesHitTriggers: 1 24 | m_QueriesStartInColliders: 1 25 | m_ChangeStopsCallbacks: 0 26 | m_CallbacksOnDisable: 1 27 | m_AutoSyncTransforms: 1 28 | m_AlwaysShowColliders: 0 29 | m_ShowColliderSleep: 1 30 | m_ShowColliderContacts: 0 31 | m_ShowColliderAABB: 0 32 | m_ContactArrowScale: 0.2 33 | m_ColliderAwakeColor: {r: 0.5686275, g: 0.95686275, b: 0.54509807, a: 0.7529412} 34 | m_ColliderAsleepColor: {r: 0.5686275, g: 0.95686275, b: 0.54509807, a: 0.36078432} 35 | m_ColliderContactColor: {r: 1, g: 0, b: 1, a: 0.6862745} 36 | m_ColliderAABBColor: {r: 1, g: 1, b: 0, a: 0.2509804} 37 | m_LayerCollisionMatrix: ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff 38 | -------------------------------------------------------------------------------- /UnityPlayerActivityListenersExample/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: 14 7 | productGUID: 11c479a29c63f4a408de283fbb0ba90c 8 | AndroidProfiler: 0 9 | AndroidFilterTouchesWhenObscured: 0 10 | defaultScreenOrientation: 4 11 | targetDevice: 2 12 | useOnDemandResources: 0 13 | accelerometerFrequency: 60 14 | companyName: Martin Gonzalez 15 | productName: UnityActivityListenersDemo 16 | defaultCursor: {fileID: 0} 17 | cursorHotspot: {x: 0, y: 0} 18 | m_SplashScreenBackgroundColor: {r: 0.13725491, g: 0.12156863, b: 0.1254902, a: 1} 19 | m_ShowUnitySplashScreen: 1 20 | m_ShowUnitySplashLogo: 1 21 | m_SplashScreenOverlayOpacity: 1 22 | m_SplashScreenAnimation: 1 23 | m_SplashScreenLogoStyle: 1 24 | m_SplashScreenDrawMode: 0 25 | m_SplashScreenBackgroundAnimationZoom: 1 26 | m_SplashScreenLogoAnimationZoom: 1 27 | m_SplashScreenBackgroundLandscapeAspect: 1 28 | m_SplashScreenBackgroundPortraitAspect: 1 29 | m_SplashScreenBackgroundLandscapeUvs: 30 | serializedVersion: 2 31 | x: 0 32 | y: 0 33 | width: 1 34 | height: 1 35 | m_SplashScreenBackgroundPortraitUvs: 36 | serializedVersion: 2 37 | x: 0 38 | y: 0 39 | width: 1 40 | height: 1 41 | m_SplashScreenLogos: [] 42 | m_VirtualRealitySplashScreen: {fileID: 0} 43 | m_HolographicTrackingLossScreen: {fileID: 0} 44 | defaultScreenWidth: 1024 45 | defaultScreenHeight: 768 46 | defaultScreenWidthWeb: 960 47 | defaultScreenHeightWeb: 600 48 | m_StereoRenderingPath: 0 49 | m_ActiveColorSpace: 0 50 | m_MTRendering: 1 51 | m_StackTraceTypes: 010000000100000001000000010000000100000001000000 52 | iosShowActivityIndicatorOnLoading: -1 53 | androidShowActivityIndicatorOnLoading: -1 54 | tizenShowActivityIndicatorOnLoading: -1 55 | iosAppInBackgroundBehavior: 0 56 | displayResolutionDialog: 1 57 | iosAllowHTTPDownload: 1 58 | allowedAutorotateToPortrait: 1 59 | allowedAutorotateToPortraitUpsideDown: 1 60 | allowedAutorotateToLandscapeRight: 1 61 | allowedAutorotateToLandscapeLeft: 1 62 | useOSAutorotation: 1 63 | use32BitDisplayBuffer: 1 64 | preserveFramebufferAlpha: 0 65 | disableDepthAndStencilBuffers: 0 66 | androidBlitType: 0 67 | defaultIsFullScreen: 1 68 | defaultIsNativeResolution: 1 69 | macRetinaSupport: 1 70 | runInBackground: 0 71 | captureSingleScreen: 0 72 | muteOtherAudioSources: 0 73 | Prepare IOS For Recording: 0 74 | Force IOS Speakers When Recording: 0 75 | deferSystemGesturesMode: 0 76 | hideHomeButton: 0 77 | submitAnalytics: 1 78 | usePlayerLog: 1 79 | bakeCollisionMeshes: 0 80 | forceSingleInstance: 0 81 | resizableWindow: 0 82 | useMacAppStoreValidation: 0 83 | macAppStoreCategory: public.app-category.games 84 | gpuSkinning: 0 85 | graphicsJobs: 0 86 | xboxPIXTextureCapture: 0 87 | xboxEnableAvatar: 0 88 | xboxEnableKinect: 0 89 | xboxEnableKinectAutoTracking: 0 90 | xboxEnableFitness: 0 91 | visibleInBackground: 1 92 | allowFullscreenSwitch: 1 93 | graphicsJobMode: 0 94 | macFullscreenMode: 2 95 | d3d11FullscreenMode: 1 96 | xboxSpeechDB: 0 97 | xboxEnableHeadOrientation: 0 98 | xboxEnableGuest: 0 99 | xboxEnablePIXSampling: 0 100 | metalFramebufferOnly: 0 101 | n3dsDisableStereoscopicView: 0 102 | n3dsEnableSharedListOpt: 1 103 | n3dsEnableVSync: 0 104 | xboxOneResolution: 0 105 | xboxOneSResolution: 0 106 | xboxOneXResolution: 3 107 | xboxOneMonoLoggingLevel: 0 108 | xboxOneLoggingLevel: 1 109 | xboxOneDisableEsram: 0 110 | xboxOnePresentImmediateThreshold: 0 111 | videoMemoryForVertexBuffers: 0 112 | psp2PowerMode: 0 113 | psp2AcquireBGM: 1 114 | wiiUTVResolution: 0 115 | wiiUGamePadMSAA: 1 116 | wiiUSupportsNunchuk: 0 117 | wiiUSupportsClassicController: 0 118 | wiiUSupportsBalanceBoard: 0 119 | wiiUSupportsMotionPlus: 0 120 | wiiUSupportsProController: 0 121 | wiiUAllowScreenCapture: 1 122 | wiiUControllerCount: 0 123 | m_SupportedAspectRatios: 124 | 4:3: 1 125 | 5:4: 1 126 | 16:10: 1 127 | 16:9: 1 128 | Others: 1 129 | bundleVersion: 1.0 130 | preloadedAssets: [] 131 | metroInputSource: 0 132 | wsaTransparentSwapchain: 0 133 | m_HolographicPauseOnTrackingLoss: 1 134 | xboxOneDisableKinectGpuReservation: 0 135 | xboxOneEnable7thCore: 0 136 | vrSettings: 137 | cardboard: 138 | depthFormat: 0 139 | enableTransitionView: 0 140 | daydream: 141 | depthFormat: 0 142 | useSustainedPerformanceMode: 0 143 | enableVideoLayer: 0 144 | useProtectedVideoMemory: 0 145 | minimumSupportedHeadTracking: 0 146 | maximumSupportedHeadTracking: 1 147 | hololens: 148 | depthFormat: 1 149 | depthBufferSharingEnabled: 0 150 | oculus: 151 | sharedDepthBuffer: 0 152 | dashSupport: 0 153 | protectGraphicsMemory: 0 154 | useHDRDisplay: 0 155 | m_ColorGamuts: 00000000 156 | targetPixelDensity: 30 157 | resolutionScalingMode: 0 158 | androidSupportedAspectRatio: 1 159 | androidMaxAspectRatio: 2.1 160 | applicationIdentifier: 161 | Android: com.martingonzalez.unityplayeractivityextension 162 | Standalone: com.martingonzalez.unityplayeractivityextension 163 | buildNumber: {} 164 | AndroidBundleVersionCode: 1 165 | AndroidMinSdkVersion: 16 166 | AndroidTargetSdkVersion: 0 167 | AndroidPreferredInstallLocation: 1 168 | aotOptions: 169 | stripEngineCode: 1 170 | iPhoneStrippingLevel: 0 171 | iPhoneScriptCallOptimization: 0 172 | ForceInternetPermission: 0 173 | ForceSDCardPermission: 0 174 | CreateWallpaper: 0 175 | APKExpansionFiles: 0 176 | keepLoadedShadersAlive: 0 177 | StripUnusedMeshComponents: 0 178 | VertexChannelCompressionMask: 179 | serializedVersion: 2 180 | m_Bits: 238 181 | iPhoneSdkVersion: 988 182 | iOSTargetOSVersionString: 7.0 183 | tvOSSdkVersion: 0 184 | tvOSRequireExtendedGameController: 0 185 | tvOSTargetOSVersionString: 9.0 186 | uIPrerenderedIcon: 0 187 | uIRequiresPersistentWiFi: 0 188 | uIRequiresFullScreen: 1 189 | uIStatusBarHidden: 1 190 | uIExitOnSuspend: 0 191 | uIStatusBarStyle: 0 192 | iPhoneSplashScreen: {fileID: 0} 193 | iPhoneHighResSplashScreen: {fileID: 0} 194 | iPhoneTallHighResSplashScreen: {fileID: 0} 195 | iPhone47inSplashScreen: {fileID: 0} 196 | iPhone55inPortraitSplashScreen: {fileID: 0} 197 | iPhone55inLandscapeSplashScreen: {fileID: 0} 198 | iPhone58inPortraitSplashScreen: {fileID: 0} 199 | iPhone58inLandscapeSplashScreen: {fileID: 0} 200 | iPadPortraitSplashScreen: {fileID: 0} 201 | iPadHighResPortraitSplashScreen: {fileID: 0} 202 | iPadLandscapeSplashScreen: {fileID: 0} 203 | iPadHighResLandscapeSplashScreen: {fileID: 0} 204 | appleTVSplashScreen: {fileID: 0} 205 | appleTVSplashScreen2x: {fileID: 0} 206 | tvOSSmallIconLayers: [] 207 | tvOSSmallIconLayers2x: [] 208 | tvOSLargeIconLayers: [] 209 | tvOSTopShelfImageLayers: [] 210 | tvOSTopShelfImageLayers2x: [] 211 | tvOSTopShelfImageWideLayers: [] 212 | tvOSTopShelfImageWideLayers2x: [] 213 | iOSLaunchScreenType: 0 214 | iOSLaunchScreenPortrait: {fileID: 0} 215 | iOSLaunchScreenLandscape: {fileID: 0} 216 | iOSLaunchScreenBackgroundColor: 217 | serializedVersion: 2 218 | rgba: 0 219 | iOSLaunchScreenFillPct: 100 220 | iOSLaunchScreenSize: 100 221 | iOSLaunchScreenCustomXibPath: 222 | iOSLaunchScreeniPadType: 0 223 | iOSLaunchScreeniPadImage: {fileID: 0} 224 | iOSLaunchScreeniPadBackgroundColor: 225 | serializedVersion: 2 226 | rgba: 0 227 | iOSLaunchScreeniPadFillPct: 100 228 | iOSLaunchScreeniPadSize: 100 229 | iOSLaunchScreeniPadCustomXibPath: 230 | iOSUseLaunchScreenStoryboard: 0 231 | iOSLaunchScreenCustomStoryboardPath: 232 | iOSDeviceRequirements: [] 233 | iOSURLSchemes: [] 234 | iOSBackgroundModes: 0 235 | iOSMetalForceHardShadows: 0 236 | metalEditorSupport: 0 237 | metalAPIValidation: 1 238 | iOSRenderExtraFrameOnPause: 0 239 | appleDeveloperTeamID: 240 | iOSManualSigningProvisioningProfileID: 241 | tvOSManualSigningProvisioningProfileID: 242 | appleEnableAutomaticSigning: 0 243 | clonedFromGUID: 00000000000000000000000000000000 244 | AndroidTargetDevice: 0 245 | AndroidSplashScreenScale: 0 246 | androidSplashScreen: {fileID: 0} 247 | AndroidKeystoreName: 248 | AndroidKeyaliasName: 249 | AndroidTVCompatibility: 1 250 | AndroidIsGame: 1 251 | AndroidEnableTango: 0 252 | androidEnableBanner: 1 253 | androidUseLowAccuracyLocation: 0 254 | m_AndroidBanners: 255 | - width: 320 256 | height: 180 257 | banner: {fileID: 0} 258 | androidGamepadSupportLevel: 0 259 | resolutionDialogBanner: {fileID: 0} 260 | m_BuildTargetIcons: [] 261 | m_BuildTargetBatching: [] 262 | m_BuildTargetGraphicsAPIs: [] 263 | m_BuildTargetVRSettings: [] 264 | m_BuildTargetEnableVuforiaSettings: [] 265 | openGLRequireES31: 0 266 | openGLRequireES31AEP: 0 267 | m_TemplateCustomTags: {} 268 | mobileMTRendering: 269 | Android: 1 270 | iPhone: 1 271 | tvOS: 1 272 | m_BuildTargetGroupLightmapEncodingQuality: [] 273 | wiiUTitleID: 0005000011000000 274 | wiiUGroupID: 00010000 275 | wiiUCommonSaveSize: 4096 276 | wiiUAccountSaveSize: 2048 277 | wiiUOlvAccessKey: 0 278 | wiiUTinCode: 0 279 | wiiUJoinGameId: 0 280 | wiiUJoinGameModeMask: 0000000000000000 281 | wiiUCommonBossSize: 0 282 | wiiUAccountBossSize: 0 283 | wiiUAddOnUniqueIDs: [] 284 | wiiUMainThreadStackSize: 3072 285 | wiiULoaderThreadStackSize: 1024 286 | wiiUSystemHeapSize: 128 287 | wiiUTVStartupScreen: {fileID: 0} 288 | wiiUGamePadStartupScreen: {fileID: 0} 289 | wiiUDrcBufferDisabled: 0 290 | wiiUProfilerLibPath: 291 | playModeTestRunnerEnabled: 0 292 | actionOnDotNetUnhandledException: 1 293 | enableInternalProfiler: 0 294 | logObjCUncaughtExceptions: 1 295 | enableCrashReportAPI: 0 296 | cameraUsageDescription: 297 | locationUsageDescription: 298 | microphoneUsageDescription: 299 | switchNetLibKey: 300 | switchSocketMemoryPoolSize: 6144 301 | switchSocketAllocatorPoolSize: 128 302 | switchSocketConcurrencyLimit: 14 303 | switchScreenResolutionBehavior: 2 304 | switchUseCPUProfiler: 0 305 | switchApplicationID: 0x01004b9000490000 306 | switchNSODependencies: 307 | switchTitleNames_0: 308 | switchTitleNames_1: 309 | switchTitleNames_2: 310 | switchTitleNames_3: 311 | switchTitleNames_4: 312 | switchTitleNames_5: 313 | switchTitleNames_6: 314 | switchTitleNames_7: 315 | switchTitleNames_8: 316 | switchTitleNames_9: 317 | switchTitleNames_10: 318 | switchTitleNames_11: 319 | switchTitleNames_12: 320 | switchTitleNames_13: 321 | switchTitleNames_14: 322 | switchPublisherNames_0: 323 | switchPublisherNames_1: 324 | switchPublisherNames_2: 325 | switchPublisherNames_3: 326 | switchPublisherNames_4: 327 | switchPublisherNames_5: 328 | switchPublisherNames_6: 329 | switchPublisherNames_7: 330 | switchPublisherNames_8: 331 | switchPublisherNames_9: 332 | switchPublisherNames_10: 333 | switchPublisherNames_11: 334 | switchPublisherNames_12: 335 | switchPublisherNames_13: 336 | switchPublisherNames_14: 337 | switchIcons_0: {fileID: 0} 338 | switchIcons_1: {fileID: 0} 339 | switchIcons_2: {fileID: 0} 340 | switchIcons_3: {fileID: 0} 341 | switchIcons_4: {fileID: 0} 342 | switchIcons_5: {fileID: 0} 343 | switchIcons_6: {fileID: 0} 344 | switchIcons_7: {fileID: 0} 345 | switchIcons_8: {fileID: 0} 346 | switchIcons_9: {fileID: 0} 347 | switchIcons_10: {fileID: 0} 348 | switchIcons_11: {fileID: 0} 349 | switchIcons_12: {fileID: 0} 350 | switchIcons_13: {fileID: 0} 351 | switchIcons_14: {fileID: 0} 352 | switchSmallIcons_0: {fileID: 0} 353 | switchSmallIcons_1: {fileID: 0} 354 | switchSmallIcons_2: {fileID: 0} 355 | switchSmallIcons_3: {fileID: 0} 356 | switchSmallIcons_4: {fileID: 0} 357 | switchSmallIcons_5: {fileID: 0} 358 | switchSmallIcons_6: {fileID: 0} 359 | switchSmallIcons_7: {fileID: 0} 360 | switchSmallIcons_8: {fileID: 0} 361 | switchSmallIcons_9: {fileID: 0} 362 | switchSmallIcons_10: {fileID: 0} 363 | switchSmallIcons_11: {fileID: 0} 364 | switchSmallIcons_12: {fileID: 0} 365 | switchSmallIcons_13: {fileID: 0} 366 | switchSmallIcons_14: {fileID: 0} 367 | switchManualHTML: 368 | switchAccessibleURLs: 369 | switchLegalInformation: 370 | switchMainThreadStackSize: 1048576 371 | switchPresenceGroupId: 372 | switchLogoHandling: 0 373 | switchReleaseVersion: 0 374 | switchDisplayVersion: 1.0.0 375 | switchStartupUserAccount: 0 376 | switchTouchScreenUsage: 0 377 | switchSupportedLanguagesMask: 0 378 | switchLogoType: 0 379 | switchApplicationErrorCodeCategory: 380 | switchUserAccountSaveDataSize: 0 381 | switchUserAccountSaveDataJournalSize: 0 382 | switchApplicationAttribute: 0 383 | switchCardSpecSize: -1 384 | switchCardSpecClock: -1 385 | switchRatingsMask: 0 386 | switchRatingsInt_0: 0 387 | switchRatingsInt_1: 0 388 | switchRatingsInt_2: 0 389 | switchRatingsInt_3: 0 390 | switchRatingsInt_4: 0 391 | switchRatingsInt_5: 0 392 | switchRatingsInt_6: 0 393 | switchRatingsInt_7: 0 394 | switchRatingsInt_8: 0 395 | switchRatingsInt_9: 0 396 | switchRatingsInt_10: 0 397 | switchRatingsInt_11: 0 398 | switchLocalCommunicationIds_0: 399 | switchLocalCommunicationIds_1: 400 | switchLocalCommunicationIds_2: 401 | switchLocalCommunicationIds_3: 402 | switchLocalCommunicationIds_4: 403 | switchLocalCommunicationIds_5: 404 | switchLocalCommunicationIds_6: 405 | switchLocalCommunicationIds_7: 406 | switchParentalControl: 0 407 | switchAllowsScreenshot: 1 408 | switchAllowsVideoCapturing: 1 409 | switchAllowsRuntimeAddOnContentInstall: 0 410 | switchDataLossConfirmation: 0 411 | switchSupportedNpadStyles: 3 412 | switchSocketConfigEnabled: 0 413 | switchTcpInitialSendBufferSize: 32 414 | switchTcpInitialReceiveBufferSize: 64 415 | switchTcpAutoSendBufferSizeMax: 256 416 | switchTcpAutoReceiveBufferSizeMax: 256 417 | switchUdpSendBufferSize: 9 418 | switchUdpReceiveBufferSize: 42 419 | switchSocketBufferEfficiency: 4 420 | switchSocketInitializeEnabled: 1 421 | switchNetworkInterfaceManagerInitializeEnabled: 1 422 | switchPlayerConnectionEnabled: 1 423 | ps4NPAgeRating: 12 424 | ps4NPTitleSecret: 425 | ps4NPTrophyPackPath: 426 | ps4ParentalLevel: 11 427 | ps4ContentID: ED1633-NPXX51362_00-0000000000000000 428 | ps4Category: 0 429 | ps4MasterVersion: 01.00 430 | ps4AppVersion: 01.00 431 | ps4AppType: 0 432 | ps4ParamSfxPath: 433 | ps4VideoOutPixelFormat: 0 434 | ps4VideoOutInitialWidth: 1920 435 | ps4VideoOutBaseModeInitialWidth: 1920 436 | ps4VideoOutReprojectionRate: 60 437 | ps4PronunciationXMLPath: 438 | ps4PronunciationSIGPath: 439 | ps4BackgroundImagePath: 440 | ps4StartupImagePath: 441 | ps4StartupImagesFolder: 442 | ps4IconImagesFolder: 443 | ps4SaveDataImagePath: 444 | ps4SdkOverride: 445 | ps4BGMPath: 446 | ps4ShareFilePath: 447 | ps4ShareOverlayImagePath: 448 | ps4PrivacyGuardImagePath: 449 | ps4NPtitleDatPath: 450 | ps4RemotePlayKeyAssignment: -1 451 | ps4RemotePlayKeyMappingDir: 452 | ps4PlayTogetherPlayerCount: 0 453 | ps4EnterButtonAssignment: 1 454 | ps4ApplicationParam1: 0 455 | ps4ApplicationParam2: 0 456 | ps4ApplicationParam3: 0 457 | ps4ApplicationParam4: 0 458 | ps4DownloadDataSize: 0 459 | ps4GarlicHeapSize: 2048 460 | ps4ProGarlicHeapSize: 2560 461 | ps4Passcode: 5PN2qmWqBlQ9wQj99nsQzldVI5ZuGXbE 462 | ps4pnSessions: 1 463 | ps4pnPresence: 1 464 | ps4pnFriends: 1 465 | ps4pnGameCustomData: 1 466 | playerPrefsSupport: 0 467 | restrictedAudioUsageRights: 0 468 | ps4UseResolutionFallback: 0 469 | ps4ReprojectionSupport: 0 470 | ps4UseAudio3dBackend: 0 471 | ps4SocialScreenEnabled: 0 472 | ps4ScriptOptimizationLevel: 0 473 | ps4Audio3dVirtualSpeakerCount: 14 474 | ps4attribCpuUsage: 0 475 | ps4PatchPkgPath: 476 | ps4PatchLatestPkgPath: 477 | ps4PatchChangeinfoPath: 478 | ps4PatchDayOne: 0 479 | ps4attribUserManagement: 0 480 | ps4attribMoveSupport: 0 481 | ps4attrib3DSupport: 0 482 | ps4attribShareSupport: 0 483 | ps4attribExclusiveVR: 0 484 | ps4disableAutoHideSplash: 0 485 | ps4videoRecordingFeaturesUsed: 0 486 | ps4contentSearchFeaturesUsed: 0 487 | ps4attribEyeToEyeDistanceSettingVR: 0 488 | ps4IncludedModules: [] 489 | monoEnv: 490 | psp2Splashimage: {fileID: 0} 491 | psp2NPTrophyPackPath: 492 | psp2NPSupportGBMorGJP: 0 493 | psp2NPAgeRating: 12 494 | psp2NPTitleDatPath: 495 | psp2NPCommsID: 496 | psp2NPCommunicationsID: 497 | psp2NPCommsPassphrase: 498 | psp2NPCommsSig: 499 | psp2ParamSfxPath: 500 | psp2ManualPath: 501 | psp2LiveAreaGatePath: 502 | psp2LiveAreaBackroundPath: 503 | psp2LiveAreaPath: 504 | psp2LiveAreaTrialPath: 505 | psp2PatchChangeInfoPath: 506 | psp2PatchOriginalPackage: 507 | psp2PackagePassword: WRK5RhRXdCdG5nG5azdNMK66MuCV6GXi 508 | psp2KeystoneFile: 509 | psp2MemoryExpansionMode: 0 510 | psp2DRMType: 0 511 | psp2StorageType: 0 512 | psp2MediaCapacity: 0 513 | psp2DLCConfigPath: 514 | psp2ThumbnailPath: 515 | psp2BackgroundPath: 516 | psp2SoundPath: 517 | psp2TrophyCommId: 518 | psp2TrophyPackagePath: 519 | psp2PackagedResourcesPath: 520 | psp2SaveDataQuota: 10240 521 | psp2ParentalLevel: 1 522 | psp2ShortTitle: Not Set 523 | psp2ContentID: IV0000-ABCD12345_00-0123456789ABCDEF 524 | psp2Category: 0 525 | psp2MasterVersion: 01.00 526 | psp2AppVersion: 01.00 527 | psp2TVBootMode: 0 528 | psp2EnterButtonAssignment: 2 529 | psp2TVDisableEmu: 0 530 | psp2AllowTwitterDialog: 1 531 | psp2Upgradable: 0 532 | psp2HealthWarning: 0 533 | psp2UseLibLocation: 0 534 | psp2InfoBarOnStartup: 0 535 | psp2InfoBarColor: 0 536 | psp2ScriptOptimizationLevel: 0 537 | psmSplashimage: {fileID: 0} 538 | splashScreenBackgroundSourceLandscape: {fileID: 0} 539 | splashScreenBackgroundSourcePortrait: {fileID: 0} 540 | spritePackerPolicy: 541 | webGLMemorySize: 256 542 | webGLExceptionSupport: 1 543 | webGLNameFilesAsHashes: 0 544 | webGLDataCaching: 0 545 | webGLDebugSymbols: 0 546 | webGLEmscriptenArgs: 547 | webGLModulesDirectory: 548 | webGLTemplate: APPLICATION:Default 549 | webGLAnalyzeBuildSize: 0 550 | webGLUseEmbeddedResources: 0 551 | webGLUseWasm: 0 552 | webGLCompressionFormat: 1 553 | scriptingDefineSymbols: {} 554 | platformArchitecture: {} 555 | scriptingBackend: {} 556 | incrementalIl2cppBuild: {} 557 | additionalIl2CppArgs: 558 | scriptingRuntimeVersion: 0 559 | apiCompatibilityLevelPerPlatform: {} 560 | m_RenderingPath: 1 561 | m_MobileRenderingPath: 1 562 | metroPackageName: UnityActivityListenersDemo 563 | metroPackageVersion: 564 | metroCertificatePath: 565 | metroCertificatePassword: 566 | metroCertificateSubject: 567 | metroCertificateIssuer: 568 | metroCertificateNotAfter: 0000000000000000 569 | metroApplicationDescription: UnityActivityListenersDemo 570 | wsaImages: {} 571 | metroTileShortName: 572 | metroCommandLineArgsFile: 573 | metroTileShowName: 0 574 | metroMediumTileShowName: 0 575 | metroLargeTileShowName: 0 576 | metroWideTileShowName: 0 577 | metroDefaultTileSize: 1 578 | metroTileForegroundText: 2 579 | metroTileBackgroundColor: {r: 0.13333334, g: 0.17254902, b: 0.21568628, a: 0} 580 | metroSplashScreenBackgroundColor: {r: 0.12941177, g: 0.17254902, b: 0.21568628, 581 | a: 1} 582 | metroSplashScreenUseBackgroundColor: 0 583 | platformCapabilities: {} 584 | metroFTAName: 585 | metroFTAFileTypes: [] 586 | metroProtocolName: 587 | metroCompilationOverrides: 1 588 | tizenProductDescription: 589 | tizenProductURL: 590 | tizenSigningProfileName: 591 | tizenGPSPermissions: 0 592 | tizenMicrophonePermissions: 0 593 | tizenDeploymentTarget: 594 | tizenDeploymentTargetType: -1 595 | tizenMinOSVersion: 1 596 | n3dsUseExtSaveData: 0 597 | n3dsCompressStaticMem: 1 598 | n3dsExtSaveDataNumber: 0x12345 599 | n3dsStackSize: 131072 600 | n3dsTargetPlatform: 2 601 | n3dsRegion: 7 602 | n3dsMediaSize: 0 603 | n3dsLogoStyle: 3 604 | n3dsTitle: GameName 605 | n3dsProductCode: 606 | n3dsApplicationId: 0xFF3FF 607 | XboxOneProductId: 608 | XboxOneUpdateKey: 609 | XboxOneSandboxId: 610 | XboxOneContentId: 611 | XboxOneTitleId: 612 | XboxOneSCId: 613 | XboxOneGameOsOverridePath: 614 | XboxOnePackagingOverridePath: 615 | XboxOneAppManifestOverridePath: 616 | XboxOnePackageEncryption: 0 617 | XboxOnePackageUpdateGranularity: 2 618 | XboxOneDescription: 619 | XboxOneLanguage: 620 | - enus 621 | XboxOneCapability: [] 622 | XboxOneGameRating: {} 623 | XboxOneIsContentPackage: 0 624 | XboxOneEnableGPUVariability: 0 625 | XboxOneSockets: {} 626 | XboxOneSplashScreen: {fileID: 0} 627 | XboxOneAllowedProductIds: [] 628 | XboxOnePersistentLocalStorageSize: 0 629 | XboxOneXTitleMemory: 8 630 | xboxOneScriptCompiler: 0 631 | vrEditorSettings: 632 | daydream: 633 | daydreamIconForeground: {fileID: 0} 634 | daydreamIconBackground: {fileID: 0} 635 | cloudServicesEnabled: {} 636 | facebookSdkVersion: 7.9.4 637 | apiCompatibilityLevel: 2 638 | cloudProjectId: 639 | projectName: 640 | organizationId: 641 | cloudEnabled: 0 642 | enableNativePlatformBackendsForNewInputSystem: 0 643 | disableOldInputManagerSupport: 0 644 | -------------------------------------------------------------------------------- /UnityPlayerActivityListenersExample/ProjectSettings/ProjectVersion.txt: -------------------------------------------------------------------------------- 1 | m_EditorVersion: 2017.4.5f1 2 | -------------------------------------------------------------------------------- /UnityPlayerActivityListenersExample/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: Very Low 11 | pixelLightCount: 0 12 | shadows: 0 13 | shadowResolution: 0 14 | shadowProjection: 1 15 | shadowCascades: 1 16 | shadowDistance: 15 17 | shadowNearPlaneOffset: 3 18 | shadowCascade2Split: 0.33333334 19 | shadowCascade4Split: {x: 0.06666667, y: 0.2, z: 0.46666667} 20 | shadowmaskMode: 0 21 | blendWeights: 1 22 | textureQuality: 1 23 | anisotropicTextures: 0 24 | antiAliasing: 0 25 | softParticles: 0 26 | softVegetation: 0 27 | realtimeReflectionProbes: 0 28 | billboardsFaceCameraPosition: 0 29 | vSyncCount: 0 30 | lodBias: 0.3 31 | maximumLODLevel: 0 32 | particleRaycastBudget: 4 33 | asyncUploadTimeSlice: 2 34 | asyncUploadBufferSize: 4 35 | resolutionScalingFixedDPIFactor: 1 36 | excludedTargetPlatforms: [] 37 | - serializedVersion: 2 38 | name: Low 39 | pixelLightCount: 0 40 | shadows: 0 41 | shadowResolution: 0 42 | shadowProjection: 1 43 | shadowCascades: 1 44 | shadowDistance: 20 45 | shadowNearPlaneOffset: 3 46 | shadowCascade2Split: 0.33333334 47 | shadowCascade4Split: {x: 0.06666667, y: 0.2, z: 0.46666667} 48 | shadowmaskMode: 0 49 | blendWeights: 2 50 | textureQuality: 0 51 | anisotropicTextures: 0 52 | antiAliasing: 0 53 | softParticles: 0 54 | softVegetation: 0 55 | realtimeReflectionProbes: 0 56 | billboardsFaceCameraPosition: 0 57 | vSyncCount: 0 58 | lodBias: 0.4 59 | maximumLODLevel: 0 60 | particleRaycastBudget: 16 61 | asyncUploadTimeSlice: 2 62 | asyncUploadBufferSize: 4 63 | resolutionScalingFixedDPIFactor: 1 64 | excludedTargetPlatforms: [] 65 | - serializedVersion: 2 66 | name: Medium 67 | pixelLightCount: 1 68 | shadows: 1 69 | shadowResolution: 0 70 | shadowProjection: 1 71 | shadowCascades: 1 72 | shadowDistance: 20 73 | shadowNearPlaneOffset: 3 74 | shadowCascade2Split: 0.33333334 75 | shadowCascade4Split: {x: 0.06666667, y: 0.2, z: 0.46666667} 76 | shadowmaskMode: 0 77 | blendWeights: 2 78 | textureQuality: 0 79 | anisotropicTextures: 1 80 | antiAliasing: 0 81 | softParticles: 0 82 | softVegetation: 0 83 | realtimeReflectionProbes: 0 84 | billboardsFaceCameraPosition: 0 85 | vSyncCount: 1 86 | lodBias: 0.7 87 | maximumLODLevel: 0 88 | particleRaycastBudget: 64 89 | asyncUploadTimeSlice: 2 90 | asyncUploadBufferSize: 4 91 | resolutionScalingFixedDPIFactor: 1 92 | excludedTargetPlatforms: [] 93 | - serializedVersion: 2 94 | name: High 95 | pixelLightCount: 2 96 | shadows: 2 97 | shadowResolution: 1 98 | shadowProjection: 1 99 | shadowCascades: 2 100 | shadowDistance: 40 101 | shadowNearPlaneOffset: 3 102 | shadowCascade2Split: 0.33333334 103 | shadowCascade4Split: {x: 0.06666667, y: 0.2, z: 0.46666667} 104 | shadowmaskMode: 1 105 | blendWeights: 2 106 | textureQuality: 0 107 | anisotropicTextures: 1 108 | antiAliasing: 0 109 | softParticles: 0 110 | softVegetation: 1 111 | realtimeReflectionProbes: 1 112 | billboardsFaceCameraPosition: 1 113 | vSyncCount: 1 114 | lodBias: 1 115 | maximumLODLevel: 0 116 | particleRaycastBudget: 256 117 | asyncUploadTimeSlice: 2 118 | asyncUploadBufferSize: 4 119 | resolutionScalingFixedDPIFactor: 1 120 | excludedTargetPlatforms: [] 121 | - serializedVersion: 2 122 | name: Very High 123 | pixelLightCount: 3 124 | shadows: 2 125 | shadowResolution: 2 126 | shadowProjection: 1 127 | shadowCascades: 2 128 | shadowDistance: 70 129 | shadowNearPlaneOffset: 3 130 | shadowCascade2Split: 0.33333334 131 | shadowCascade4Split: {x: 0.06666667, y: 0.2, z: 0.46666667} 132 | shadowmaskMode: 1 133 | blendWeights: 4 134 | textureQuality: 0 135 | anisotropicTextures: 2 136 | antiAliasing: 2 137 | softParticles: 1 138 | softVegetation: 1 139 | realtimeReflectionProbes: 1 140 | billboardsFaceCameraPosition: 1 141 | vSyncCount: 1 142 | lodBias: 1.5 143 | maximumLODLevel: 0 144 | particleRaycastBudget: 1024 145 | asyncUploadTimeSlice: 2 146 | asyncUploadBufferSize: 4 147 | resolutionScalingFixedDPIFactor: 1 148 | excludedTargetPlatforms: [] 149 | - serializedVersion: 2 150 | name: Ultra 151 | pixelLightCount: 4 152 | shadows: 2 153 | shadowResolution: 2 154 | shadowProjection: 1 155 | shadowCascades: 4 156 | shadowDistance: 150 157 | shadowNearPlaneOffset: 3 158 | shadowCascade2Split: 0.33333334 159 | shadowCascade4Split: {x: 0.06666667, y: 0.2, z: 0.46666667} 160 | shadowmaskMode: 1 161 | blendWeights: 4 162 | textureQuality: 0 163 | anisotropicTextures: 2 164 | antiAliasing: 2 165 | softParticles: 1 166 | softVegetation: 1 167 | realtimeReflectionProbes: 1 168 | billboardsFaceCameraPosition: 1 169 | vSyncCount: 1 170 | lodBias: 2 171 | maximumLODLevel: 0 172 | particleRaycastBudget: 4096 173 | asyncUploadTimeSlice: 2 174 | asyncUploadBufferSize: 4 175 | resolutionScalingFixedDPIFactor: 1 176 | excludedTargetPlatforms: [] 177 | m_PerPlatformDefaultQuality: 178 | Android: 2 179 | Nintendo 3DS: 5 180 | Nintendo Switch: 5 181 | PS4: 5 182 | PSM: 5 183 | PSP2: 2 184 | Standalone: 5 185 | Tizen: 2 186 | WebGL: 3 187 | WiiU: 5 188 | Windows Store Apps: 5 189 | XboxOne: 5 190 | iPhone: 2 191 | tvOS: 2 192 | -------------------------------------------------------------------------------- /UnityPlayerActivityListenersExample/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 | -------------------------------------------------------------------------------- /UnityPlayerActivityListenersExample/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: 0.02 7 | Maximum Allowed Timestep: 0.33333334 8 | m_TimeScale: 1 9 | Maximum Particle Timestep: 0.03 10 | -------------------------------------------------------------------------------- /UnityPlayerActivityListenersExample/ProjectSettings/UnityConnectSettings.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!310 &1 4 | UnityConnectSettings: 5 | m_ObjectHideFlags: 0 6 | m_Enabled: 0 7 | m_TestMode: 0 8 | m_TestEventUrl: 9 | m_TestConfigUrl: 10 | m_TestInitMode: 0 11 | CrashReportingSettings: 12 | m_EventUrl: https://perf-events.cloud.unity3d.com/api/events/crashes 13 | m_NativeEventUrl: https://perf-events.cloud.unity3d.com/symbolicate 14 | m_Enabled: 0 15 | m_CaptureEditorExceptions: 1 16 | UnityPurchasingSettings: 17 | m_Enabled: 0 18 | m_TestMode: 0 19 | UnityAnalyticsSettings: 20 | m_Enabled: 0 21 | m_InitializeOnStartup: 1 22 | m_TestMode: 0 23 | m_TestEventUrl: 24 | m_TestConfigUrl: 25 | UnityAdsSettings: 26 | m_Enabled: 0 27 | m_InitializeOnStartup: 1 28 | m_TestMode: 0 29 | m_IosGameId: 30 | m_AndroidGameId: 31 | m_GameIds: {} 32 | m_GameId: 33 | PerformanceReportingSettings: 34 | m_Enabled: 0 35 | -------------------------------------------------------------------------------- /UnityPlayerActivityListenersExample/UnityActivityPlayerExtension.apk: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MartinGonzalez/UnityPlayerActivityListener/c6dc846cfbdf2559e96e6fe097af3add94943278/UnityPlayerActivityListenersExample/UnityActivityPlayerExtension.apk -------------------------------------------------------------------------------- /UnityPlayerActivityListenersExample/UnityPackageManager/manifest.json: -------------------------------------------------------------------------------- 1 | { 2 | "dependencies": { 3 | } 4 | } 5 | -------------------------------------------------------------------------------- /badexample/.gitignore: -------------------------------------------------------------------------------- 1 | /build 2 | -------------------------------------------------------------------------------- /badexample/build.gradle: -------------------------------------------------------------------------------- 1 | apply plugin: 'com.android.library' 2 | 3 | android { 4 | compileSdkVersion 27 5 | 6 | 7 | 8 | defaultConfig { 9 | minSdkVersion 16 10 | targetSdkVersion 27 11 | versionCode 1 12 | versionName "1.0" 13 | } 14 | 15 | libraryVariants.all { variant -> 16 | variant.outputs.all { output -> 17 | if (outputFile != null && outputFileName.endsWith('.aar')) { 18 | outputFileName = "com.me.myhelloworld-plugin.aar" 19 | } 20 | } 21 | } 22 | 23 | buildTypes { 24 | release { 25 | minifyEnabled false 26 | proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' 27 | } 28 | } 29 | 30 | } 31 | 32 | dependencies { 33 | implementation fileTree(include: ['*.jar'], excludes: ['UnityClasses-2017.4.1f1.jar'], dir: 'libs') 34 | implementation 'com.android.support:appcompat-v7:27.1.1' 35 | compileOnly files('libs/UnityClasses-2017.4.1f1.jar') 36 | } 37 | -------------------------------------------------------------------------------- /badexample/libs/UnityClasses-2017.4.1f1.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MartinGonzalez/UnityPlayerActivityListener/c6dc846cfbdf2559e96e6fe097af3add94943278/badexample/libs/UnityClasses-2017.4.1f1.jar -------------------------------------------------------------------------------- /badexample/proguard-rules.pro: -------------------------------------------------------------------------------- 1 | # Add project specific ProGuard rules here. 2 | # You can control the set of applied configuration files using the 3 | # proguardFiles setting in build.gradle. 4 | # 5 | # For more details, see 6 | # http://developer.android.com/guide/developing/tools/proguard.html 7 | 8 | # If your project uses WebView with JS, uncomment the following 9 | # and specify the fully qualified class name to the JavaScript interface 10 | # class: 11 | #-keepclassmembers class fqcn.of.javascript.interface.for.webview { 12 | # public *; 13 | #} 14 | 15 | # Uncomment this to preserve the line number information for 16 | # debugging stack traces. 17 | #-keepattributes SourceFile,LineNumberTable 18 | 19 | # If you keep the line number information, uncomment this to 20 | # hide the original source file name. 21 | #-renamesourcefileattribute SourceFile 22 | -------------------------------------------------------------------------------- /badexample/release/com.me.myhelloworld-plugin.aar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MartinGonzalez/UnityPlayerActivityListener/c6dc846cfbdf2559e96e6fe097af3add94943278/badexample/release/com.me.myhelloworld-plugin.aar -------------------------------------------------------------------------------- /badexample/src/main/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 3 | -------------------------------------------------------------------------------- /badexample/src/main/java/martingonzalez/com/badexample/MyCustomUnityPlayerActivity.java: -------------------------------------------------------------------------------- 1 | package martingonzalez.com.badexample; 2 | 3 | import android.os.Bundle; 4 | import android.util.Log; 5 | 6 | import com.unity3d.player.UnityPlayerActivity; 7 | 8 | public class MyCustomUnityPlayerActivity extends UnityPlayerActivity { 9 | private static final String MY_BAD_TAG = "BadTag"; 10 | 11 | @Override 12 | protected void onCreate(Bundle bundle) { 13 | super.onCreate(bundle); 14 | 15 | Log.d(MY_BAD_TAG, "I've override onCreate! Nice!"); 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /badexample/src/main/res/values/strings.xml: -------------------------------------------------------------------------------- 1 | 2 | Bad Example 3 | 4 | -------------------------------------------------------------------------------- /build.gradle: -------------------------------------------------------------------------------- 1 | // Top-level build file where you can add configuration options common to all sub-projects/modules. 2 | 3 | buildscript { 4 | 5 | repositories { 6 | google() 7 | jcenter() 8 | } 9 | dependencies { 10 | classpath 'com.android.tools.build:gradle:3.1.1' 11 | 12 | 13 | // NOTE: Do not place your application dependencies here; they belong 14 | // in the individual module build.gradle files 15 | } 16 | } 17 | 18 | allprojects { 19 | repositories { 20 | google() 21 | jcenter() 22 | } 23 | } 24 | 25 | task clean(type: Delete) { 26 | delete rootProject.buildDir 27 | } 28 | -------------------------------------------------------------------------------- /gradle.properties: -------------------------------------------------------------------------------- 1 | # Project-wide Gradle settings. 2 | # IDE (e.g. Android Studio) users: 3 | # Gradle settings configured through the IDE *will override* 4 | # any settings specified in this file. 5 | # For more details on how to configure your build environment visit 6 | # http://www.gradle.org/docs/current/userguide/build_environment.html 7 | # Specifies the JVM arguments used for the daemon process. 8 | # The setting is particularly useful for tweaking memory settings. 9 | org.gradle.jvmargs=-Xmx1536m 10 | # When configured, Gradle will run in incubating parallel mode. 11 | # This option should only be used with decoupled projects. More details, visit 12 | # http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects 13 | # org.gradle.parallel=true 14 | -------------------------------------------------------------------------------- /gradle/wrapper/gradle-wrapper.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MartinGonzalez/UnityPlayerActivityListener/c6dc846cfbdf2559e96e6fe097af3add94943278/gradle/wrapper/gradle-wrapper.jar -------------------------------------------------------------------------------- /gradle/wrapper/gradle-wrapper.properties: -------------------------------------------------------------------------------- 1 | #Sun Apr 15 00:43:10 ART 2018 2 | distributionBase=GRADLE_USER_HOME 3 | distributionPath=wrapper/dists 4 | zipStoreBase=GRADLE_USER_HOME 5 | zipStorePath=wrapper/dists 6 | distributionUrl=https\://services.gradle.org/distributions/gradle-4.4-all.zip 7 | -------------------------------------------------------------------------------- /gradlew: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env sh 2 | 3 | ############################################################################## 4 | ## 5 | ## Gradle start up script for UN*X 6 | ## 7 | ############################################################################## 8 | 9 | # Attempt to set APP_HOME 10 | # Resolve links: $0 may be a link 11 | PRG="$0" 12 | # Need this for relative symlinks. 13 | while [ -h "$PRG" ] ; do 14 | ls=`ls -ld "$PRG"` 15 | link=`expr "$ls" : '.*-> \(.*\)$'` 16 | if expr "$link" : '/.*' > /dev/null; then 17 | PRG="$link" 18 | else 19 | PRG=`dirname "$PRG"`"/$link" 20 | fi 21 | done 22 | SAVED="`pwd`" 23 | cd "`dirname \"$PRG\"`/" >/dev/null 24 | APP_HOME="`pwd -P`" 25 | cd "$SAVED" >/dev/null 26 | 27 | APP_NAME="Gradle" 28 | APP_BASE_NAME=`basename "$0"` 29 | 30 | # Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. 31 | DEFAULT_JVM_OPTS="" 32 | 33 | # Use the maximum available, or set MAX_FD != -1 to use that value. 34 | MAX_FD="maximum" 35 | 36 | warn () { 37 | echo "$*" 38 | } 39 | 40 | die () { 41 | echo 42 | echo "$*" 43 | echo 44 | exit 1 45 | } 46 | 47 | # OS specific support (must be 'true' or 'false'). 48 | cygwin=false 49 | msys=false 50 | darwin=false 51 | nonstop=false 52 | case "`uname`" in 53 | CYGWIN* ) 54 | cygwin=true 55 | ;; 56 | Darwin* ) 57 | darwin=true 58 | ;; 59 | MINGW* ) 60 | msys=true 61 | ;; 62 | NONSTOP* ) 63 | nonstop=true 64 | ;; 65 | esac 66 | 67 | CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar 68 | 69 | # Determine the Java command to use to start the JVM. 70 | if [ -n "$JAVA_HOME" ] ; then 71 | if [ -x "$JAVA_HOME/jre/sh/java" ] ; then 72 | # IBM's JDK on AIX uses strange locations for the executables 73 | JAVACMD="$JAVA_HOME/jre/sh/java" 74 | else 75 | JAVACMD="$JAVA_HOME/bin/java" 76 | fi 77 | if [ ! -x "$JAVACMD" ] ; then 78 | die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME 79 | 80 | Please set the JAVA_HOME variable in your environment to match the 81 | location of your Java installation." 82 | fi 83 | else 84 | JAVACMD="java" 85 | which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. 86 | 87 | Please set the JAVA_HOME variable in your environment to match the 88 | location of your Java installation." 89 | fi 90 | 91 | # Increase the maximum file descriptors if we can. 92 | if [ "$cygwin" = "false" -a "$darwin" = "false" -a "$nonstop" = "false" ] ; then 93 | MAX_FD_LIMIT=`ulimit -H -n` 94 | if [ $? -eq 0 ] ; then 95 | if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then 96 | MAX_FD="$MAX_FD_LIMIT" 97 | fi 98 | ulimit -n $MAX_FD 99 | if [ $? -ne 0 ] ; then 100 | warn "Could not set maximum file descriptor limit: $MAX_FD" 101 | fi 102 | else 103 | warn "Could not query maximum file descriptor limit: $MAX_FD_LIMIT" 104 | fi 105 | fi 106 | 107 | # For Darwin, add options to specify how the application appears in the dock 108 | if $darwin; then 109 | GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\"" 110 | fi 111 | 112 | # For Cygwin, switch paths to Windows format before running java 113 | if $cygwin ; then 114 | APP_HOME=`cygpath --path --mixed "$APP_HOME"` 115 | CLASSPATH=`cygpath --path --mixed "$CLASSPATH"` 116 | JAVACMD=`cygpath --unix "$JAVACMD"` 117 | 118 | # We build the pattern for arguments to be converted via cygpath 119 | ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null` 120 | SEP="" 121 | for dir in $ROOTDIRSRAW ; do 122 | ROOTDIRS="$ROOTDIRS$SEP$dir" 123 | SEP="|" 124 | done 125 | OURCYGPATTERN="(^($ROOTDIRS))" 126 | # Add a user-defined pattern to the cygpath arguments 127 | if [ "$GRADLE_CYGPATTERN" != "" ] ; then 128 | OURCYGPATTERN="$OURCYGPATTERN|($GRADLE_CYGPATTERN)" 129 | fi 130 | # Now convert the arguments - kludge to limit ourselves to /bin/sh 131 | i=0 132 | for arg in "$@" ; do 133 | CHECK=`echo "$arg"|egrep -c "$OURCYGPATTERN" -` 134 | CHECK2=`echo "$arg"|egrep -c "^-"` ### Determine if an option 135 | 136 | if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then ### Added a condition 137 | eval `echo args$i`=`cygpath --path --ignore --mixed "$arg"` 138 | else 139 | eval `echo args$i`="\"$arg\"" 140 | fi 141 | i=$((i+1)) 142 | done 143 | case $i in 144 | (0) set -- ;; 145 | (1) set -- "$args0" ;; 146 | (2) set -- "$args0" "$args1" ;; 147 | (3) set -- "$args0" "$args1" "$args2" ;; 148 | (4) set -- "$args0" "$args1" "$args2" "$args3" ;; 149 | (5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;; 150 | (6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;; 151 | (7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;; 152 | (8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;; 153 | (9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;; 154 | esac 155 | fi 156 | 157 | # Escape application args 158 | save () { 159 | for i do printf %s\\n "$i" | sed "s/'/'\\\\''/g;1s/^/'/;\$s/\$/' \\\\/" ; done 160 | echo " " 161 | } 162 | APP_ARGS=$(save "$@") 163 | 164 | # Collect all arguments for the java command, following the shell quoting and substitution rules 165 | eval set -- $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS "\"-Dorg.gradle.appname=$APP_BASE_NAME\"" -classpath "\"$CLASSPATH\"" org.gradle.wrapper.GradleWrapperMain "$APP_ARGS" 166 | 167 | # by default we should be in the correct project dir, but when run from Finder on Mac, the cwd is wrong 168 | if [ "$(uname)" = "Darwin" ] && [ "$HOME" = "$PWD" ]; then 169 | cd "$(dirname "$0")" 170 | fi 171 | 172 | exec "$JAVACMD" "$@" 173 | -------------------------------------------------------------------------------- /gradlew.bat: -------------------------------------------------------------------------------- 1 | @if "%DEBUG%" == "" @echo off 2 | @rem ########################################################################## 3 | @rem 4 | @rem Gradle startup script for Windows 5 | @rem 6 | @rem ########################################################################## 7 | 8 | @rem Set local scope for the variables with windows NT shell 9 | if "%OS%"=="Windows_NT" setlocal 10 | 11 | set DIRNAME=%~dp0 12 | if "%DIRNAME%" == "" set DIRNAME=. 13 | set APP_BASE_NAME=%~n0 14 | set APP_HOME=%DIRNAME% 15 | 16 | @rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. 17 | set DEFAULT_JVM_OPTS= 18 | 19 | @rem Find java.exe 20 | if defined JAVA_HOME goto findJavaFromJavaHome 21 | 22 | set JAVA_EXE=java.exe 23 | %JAVA_EXE% -version >NUL 2>&1 24 | if "%ERRORLEVEL%" == "0" goto init 25 | 26 | echo. 27 | echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. 28 | echo. 29 | echo Please set the JAVA_HOME variable in your environment to match the 30 | echo location of your Java installation. 31 | 32 | goto fail 33 | 34 | :findJavaFromJavaHome 35 | set JAVA_HOME=%JAVA_HOME:"=% 36 | set JAVA_EXE=%JAVA_HOME%/bin/java.exe 37 | 38 | if exist "%JAVA_EXE%" goto init 39 | 40 | echo. 41 | echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% 42 | echo. 43 | echo Please set the JAVA_HOME variable in your environment to match the 44 | echo location of your Java installation. 45 | 46 | goto fail 47 | 48 | :init 49 | @rem Get command-line arguments, handling Windows variants 50 | 51 | if not "%OS%" == "Windows_NT" goto win9xME_args 52 | 53 | :win9xME_args 54 | @rem Slurp the command line arguments. 55 | set CMD_LINE_ARGS= 56 | set _SKIP=2 57 | 58 | :win9xME_args_slurp 59 | if "x%~1" == "x" goto execute 60 | 61 | set CMD_LINE_ARGS=%* 62 | 63 | :execute 64 | @rem Setup the command line 65 | 66 | set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar 67 | 68 | @rem Execute Gradle 69 | "%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS% 70 | 71 | :end 72 | @rem End local scope for the variables with windows NT shell 73 | if "%ERRORLEVEL%"=="0" goto mainEnd 74 | 75 | :fail 76 | rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of 77 | rem the _cmd.exe /c_ return code! 78 | if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1 79 | exit /b 1 80 | 81 | :mainEnd 82 | if "%OS%"=="Windows_NT" endlocal 83 | 84 | :omega 85 | -------------------------------------------------------------------------------- /myhelloworldplugin/.classpath: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /myhelloworldplugin/.gitignore: -------------------------------------------------------------------------------- 1 | /build 2 | -------------------------------------------------------------------------------- /myhelloworldplugin/.project: -------------------------------------------------------------------------------- 1 | 2 | 3 | myhelloworldplugin 4 | Project myhelloworldplugin created by Buildship. 5 | 6 | 7 | 8 | 9 | org.eclipse.jdt.core.javabuilder 10 | 11 | 12 | 13 | 14 | org.eclipse.buildship.core.gradleprojectbuilder 15 | 16 | 17 | 18 | 19 | 20 | org.eclipse.jdt.core.javanature 21 | org.eclipse.buildship.core.gradleprojectnature 22 | 23 | 24 | -------------------------------------------------------------------------------- /myhelloworldplugin/.settings/org.eclipse.buildship.core.prefs: -------------------------------------------------------------------------------- 1 | #Sun Apr 15 10:50:26 ART 2018 2 | connection.project.dir=.. 3 | -------------------------------------------------------------------------------- /myhelloworldplugin/build.gradle: -------------------------------------------------------------------------------- 1 | apply plugin: 'com.android.library' 2 | 3 | android { 4 | compileSdkVersion 27 5 | 6 | defaultConfig { 7 | minSdkVersion 16 8 | targetSdkVersion 27 9 | versionCode 1 10 | versionName "1.0" 11 | 12 | testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner" 13 | 14 | } 15 | 16 | libraryVariants.all { variant -> 17 | variant.outputs.all { output -> 18 | if (outputFile != null && outputFileName.endsWith('.aar')) { 19 | outputFileName = "com.unity.myhelloworld-plugin.aar" 20 | } 21 | } 22 | } 23 | 24 | buildTypes { 25 | release { 26 | minifyEnabled false 27 | proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' 28 | } 29 | } 30 | 31 | } 32 | 33 | dependencies { 34 | implementation fileTree(dir: 'libs', include: ['*.jar']) 35 | 36 | implementation 'com.android.support:appcompat-v7:27.1.1' 37 | compileOnly project(path: ':unityplayeractivityextension') 38 | } 39 | -------------------------------------------------------------------------------- /myhelloworldplugin/proguard-rules.pro: -------------------------------------------------------------------------------- 1 | # Add project specific ProGuard rules here. 2 | # You can control the set of applied configuration files using the 3 | # proguardFiles setting in build.gradle. 4 | # 5 | # For more details, see 6 | # http://developer.android.com/guide/developing/tools/proguard.html 7 | 8 | # If your project uses WebView with JS, uncomment the following 9 | # and specify the fully qualified class name to the JavaScript interface 10 | # class: 11 | #-keepclassmembers class fqcn.of.javascript.interface.for.webview { 12 | # public *; 13 | #} 14 | 15 | # Uncomment this to preserve the line number information for 16 | # debugging stack traces. 17 | #-keepattributes SourceFile,LineNumberTable 18 | 19 | # If you keep the line number information, uncomment this to 20 | # hide the original source file name. 21 | #-renamesourcefileattribute SourceFile 22 | -------------------------------------------------------------------------------- /myhelloworldplugin/release/com.unity.myhelloworld-plugin.aar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MartinGonzalez/UnityPlayerActivityListener/c6dc846cfbdf2559e96e6fe097af3add94943278/myhelloworldplugin/release/com.unity.myhelloworld-plugin.aar -------------------------------------------------------------------------------- /myhelloworldplugin/src/main/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 3 | 4 | 5 | 8 | 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /myhelloworldplugin/src/main/java/com/unity/myhelloworldplugin/MyHelloWorldActivityListener.java: -------------------------------------------------------------------------------- 1 | package com.unity.myhelloworldplugin; 2 | 3 | import android.content.Intent; 4 | import android.os.Bundle; 5 | import android.util.Log; 6 | 7 | import martingonzalez.com.unityplayeractivityextension.UnityActivityListener; 8 | 9 | public class MyHelloWorldActivityListener extends UnityActivityListener { 10 | private static final String MY_PLUGIN_TAG = "MyPluginTag"; 11 | 12 | @Override 13 | public void onCreate(Bundle savedInstanceState) { 14 | Log.d(MY_PLUGIN_TAG, "Hello World from onCreate Method!"); 15 | } 16 | 17 | @Override 18 | public void onNewIntent(Intent intent) { 19 | Log.d(MY_PLUGIN_TAG, "Hello World from onNewIntent Method! Yes im listening this too! Awesome!"); 20 | } 21 | 22 | @Override 23 | public void onStop() { 24 | Log.d(MY_PLUGIN_TAG, "Ow! The app was stopped so Bye World!"); 25 | } 26 | 27 | @Override 28 | public void onResume() { 29 | Log.d(MY_PLUGIN_TAG, "OHH! We are back! HELLO AGAIN!"); 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /myhelloworldplugin/src/main/res/values/strings.xml: -------------------------------------------------------------------------------- 1 | 2 | MyHelloWorldPlugin 3 | 4 | -------------------------------------------------------------------------------- /settings.gradle: -------------------------------------------------------------------------------- 1 | include ':unityplayeractivityextension', ':myhelloworldplugin', ':badexample' 2 | -------------------------------------------------------------------------------- /unityActivityListener.unitypackage: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MartinGonzalez/UnityPlayerActivityListener/c6dc846cfbdf2559e96e6fe097af3add94943278/unityActivityListener.unitypackage -------------------------------------------------------------------------------- /unityplayeractivityextension/.classpath: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /unityplayeractivityextension/.gitignore: -------------------------------------------------------------------------------- 1 | /build 2 | -------------------------------------------------------------------------------- /unityplayeractivityextension/.project: -------------------------------------------------------------------------------- 1 | 2 | 3 | unityplayeractivityextension 4 | Project unityplayeractivityextension created by Buildship. 5 | 6 | 7 | 8 | 9 | org.eclipse.jdt.core.javabuilder 10 | 11 | 12 | 13 | 14 | org.eclipse.buildship.core.gradleprojectbuilder 15 | 16 | 17 | 18 | 19 | 20 | org.eclipse.jdt.core.javanature 21 | org.eclipse.buildship.core.gradleprojectnature 22 | 23 | 24 | -------------------------------------------------------------------------------- /unityplayeractivityextension/.settings/org.eclipse.buildship.core.prefs: -------------------------------------------------------------------------------- 1 | #Sun Apr 15 10:50:26 ART 2018 2 | connection.project.dir=.. 3 | -------------------------------------------------------------------------------- /unityplayeractivityextension/build.gradle: -------------------------------------------------------------------------------- 1 | apply plugin: 'com.android.library' 2 | 3 | android { 4 | compileSdkVersion 27 5 | 6 | defaultConfig { 7 | minSdkVersion 16 8 | targetSdkVersion 27 9 | versionCode 1 10 | versionName "1.0" 11 | 12 | testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner" 13 | 14 | } 15 | 16 | libraryVariants.all { variant -> 17 | variant.outputs.all { output -> 18 | if (outputFile != null && outputFileName.endsWith('.aar')) { 19 | outputFileName = "com.unity.extended.aar" 20 | } 21 | } 22 | } 23 | 24 | buildTypes { 25 | release { 26 | minifyEnabled false 27 | proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' 28 | } 29 | } 30 | 31 | compileOptions { 32 | } 33 | } 34 | 35 | dependencies { 36 | implementation fileTree(include: ['*.jar'], excludes: ['UnityClasses-2017.4.1f1.jar'], dir: 'libs') 37 | implementation 'com.android.support:appcompat-v7:27.1.1' 38 | compileOnly files('libs/UnityClasses-2017.4.1f1.jar') 39 | } 40 | -------------------------------------------------------------------------------- /unityplayeractivityextension/libs/UnityClasses-2017.4.1f1.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MartinGonzalez/UnityPlayerActivityListener/c6dc846cfbdf2559e96e6fe097af3add94943278/unityplayeractivityextension/libs/UnityClasses-2017.4.1f1.jar -------------------------------------------------------------------------------- /unityplayeractivityextension/proguard-rules.pro: -------------------------------------------------------------------------------- 1 | # Add project specific ProGuard rules here. 2 | # You can control the set of applied configuration files using the 3 | # proguardFiles setting in build.gradle. 4 | # 5 | # For more details, see 6 | # http://developer.android.com/guide/developing/tools/proguard.html 7 | 8 | # If your project uses WebView with JS, uncomment the following 9 | # and specify the fully qualified class name to the JavaScript interface 10 | # class: 11 | #-keepclassmembers class fqcn.of.javascript.interface.for.webview { 12 | # public *; 13 | #} 14 | 15 | # Uncomment this to preserve the line number information for 16 | # debugging stack traces. 17 | #-keepattributes SourceFile,LineNumberTable 18 | 19 | # If you keep the line number information, uncomment this to 20 | # hide the original source file name. 21 | #-renamesourcefileattribute SourceFile 22 | -------------------------------------------------------------------------------- /unityplayeractivityextension/release/com.unity.extended.aar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MartinGonzalez/UnityPlayerActivityListener/c6dc846cfbdf2559e96e6fe097af3add94943278/unityplayeractivityextension/release/com.unity.extended.aar -------------------------------------------------------------------------------- /unityplayeractivityextension/src/main/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 3 | -------------------------------------------------------------------------------- /unityplayeractivityextension/src/main/java/martingonzalez/com/unityplayeractivityextension/UnityActivityListener.java: -------------------------------------------------------------------------------- 1 | package martingonzalez.com.unityplayeractivityextension; 2 | 3 | import android.content.Intent; 4 | import android.content.res.Configuration; 5 | import android.os.Bundle; 6 | 7 | public class UnityActivityListener { 8 | public void onCreate(Bundle savedInstanceState) { 9 | } 10 | 11 | public void onResume() { 12 | } 13 | 14 | public void onNewIntent(Intent intent) { 15 | } 16 | 17 | public void onActivityResult(int requestCode, int resultCode, Intent data) { 18 | } 19 | 20 | public void onRequestPermissionsResult(int requestCode, String[] permissions, int[] grantResults) { 21 | } 22 | 23 | public void onStart() { 24 | } 25 | 26 | public void onStop() { 27 | } 28 | 29 | public void onDestroy() { 30 | } 31 | 32 | public void onRestart() { 33 | } 34 | 35 | public void onPause() { 36 | } 37 | 38 | public void onBackPressed() { 39 | } 40 | 41 | public void onSaveInstanceState(Bundle savedInstanceState) { 42 | } 43 | 44 | public void onRestoreInstanceState(Bundle savedInstanceState) { 45 | } 46 | 47 | public void onConfigurationChanged(Configuration newConfig) { 48 | } 49 | 50 | public void onTrimMemory(int level) { 51 | } 52 | 53 | public void onLowMemory() { 54 | } 55 | 56 | public void onWindowFocusChanged(boolean b) { 57 | } 58 | } 59 | -------------------------------------------------------------------------------- /unityplayeractivityextension/src/main/java/martingonzalez/com/unityplayeractivityextension/UnityActivityListenersLoader.java: -------------------------------------------------------------------------------- 1 | package martingonzalez.com.unityplayeractivityextension; 2 | 3 | import android.annotation.SuppressLint; 4 | import android.content.Context; 5 | import android.content.pm.ApplicationInfo; 6 | import android.content.pm.PackageManager; 7 | import android.os.Bundle; 8 | import android.util.Log; 9 | 10 | import java.util.ArrayList; 11 | import java.util.List; 12 | 13 | import static android.content.pm.ApplicationInfo.FLAG_UPDATED_SYSTEM_APP; 14 | 15 | class UnityActivityListenersLoader { 16 | 17 | public static final String ACTIVITY_LISTENER_PREFIX = "com.unity.activity.listener"; 18 | 19 | public List getActivityListenersFrom(Context context) { 20 | logDebug("\n#### Creating Activity Listeners"); 21 | List listeners = new ArrayList<>(); 22 | try { 23 | @SuppressLint("WrongConstant") ApplicationInfo applicationInfo = context 24 | .getPackageManager() 25 | .getApplicationInfo(context.getPackageName(), FLAG_UPDATED_SYSTEM_APP); 26 | Bundle bundle = applicationInfo.metaData; 27 | List listenersClassName = getListenersClassName(bundle); 28 | listeners = getListenerClassesFrom(listenersClassName); 29 | } catch (PackageManager.NameNotFoundException e) { 30 | logError(e.getMessage()); 31 | } 32 | return listeners; 33 | } 34 | 35 | private List getListenersClassName(Bundle bundle) { 36 | List classesNames = new ArrayList<>(); 37 | for (String key : bundle.keySet()) { 38 | Object value = bundle.get(key); 39 | if (isString(value) && startsWithListenerPrefix(key)) { 40 | classesNames.add((String) value); 41 | } 42 | } 43 | return classesNames; 44 | } 45 | 46 | private boolean isString(Object value) { 47 | return value instanceof String; 48 | } 49 | 50 | private boolean startsWithListenerPrefix(String key) { 51 | return key.startsWith(ACTIVITY_LISTENER_PREFIX); 52 | } 53 | 54 | private List getListenerClassesFrom(List listenerClassesName) { 55 | List listenersClasses = new ArrayList<>(); 56 | logDebug("\n#### Activity Listener Found: "); 57 | logDebug("\n#### "); 58 | for (String className : listenerClassesName) { 59 | try { 60 | Class listenerClass = Class.forName(className); 61 | if (isListenerClass(listenerClass)) { 62 | logDebug("\n#### |: " + listenerClass.getName()); 63 | listenersClasses.add((UnityActivityListener) listenerClass.newInstance()); 64 | } 65 | } catch (Exception e) { 66 | throw new RuntimeException( 67 | " \n ######## \n " + 68 | "# Error Cause: Class name [" + className + "] it is incorrectly configured. " + 69 | "# \n ########"); 70 | } 71 | } 72 | logDebug("\n##############################"); 73 | return listenersClasses; 74 | } 75 | 76 | private void logDebug(String message) { 77 | Log.d(UnityPlayerActivityExtension.UNITY_TAG, message); 78 | } 79 | 80 | private void logError(String message) { 81 | Log.e(UnityPlayerActivityExtension.UNITY_TAG, message); 82 | } 83 | 84 | private boolean isListenerClass(Class listenerClass) { 85 | return UnityActivityListener.class.isAssignableFrom(listenerClass); 86 | } 87 | } 88 | -------------------------------------------------------------------------------- /unityplayeractivityextension/src/main/java/martingonzalez/com/unityplayeractivityextension/UnityActivityListenersNotifier.java: -------------------------------------------------------------------------------- 1 | package martingonzalez.com.unityplayeractivityextension; 2 | 3 | import android.content.Intent; 4 | import android.content.res.Configuration; 5 | import android.os.Bundle; 6 | 7 | import java.util.List; 8 | 9 | class UnityActivityListenersNotifier { 10 | private List listeners; 11 | 12 | public UnityActivityListenersNotifier(List listeners) { 13 | this.listeners = listeners; 14 | } 15 | 16 | public void onCreate(Bundle bundle) { 17 | for (UnityActivityListener listenerClass : listeners) { 18 | listenerClass.onCreate(bundle); 19 | } 20 | } 21 | 22 | public void onStart() { 23 | for (UnityActivityListener listenerClass : listeners) { 24 | listenerClass.onStart(); 25 | } 26 | } 27 | 28 | public void onResume() { 29 | for (UnityActivityListener listenerClass : listeners) { 30 | listenerClass.onResume(); 31 | } 32 | } 33 | 34 | public void onNewIntent(Intent intent) { 35 | for (UnityActivityListener listenerClass : listeners) { 36 | listenerClass.onNewIntent(intent); 37 | } 38 | } 39 | 40 | public void onPause() { 41 | for (UnityActivityListener listenerClass : listeners) { 42 | listenerClass.onPause(); 43 | } 44 | } 45 | 46 | public void onDestroy() { 47 | for (UnityActivityListener listenerClass : listeners) { 48 | listenerClass.onDestroy(); 49 | } 50 | } 51 | 52 | public void onLowMemory() { 53 | for (UnityActivityListener listenerClass : listeners) { 54 | listenerClass.onLowMemory(); 55 | } 56 | } 57 | 58 | public void onTrimMemory(int i) { 59 | for (UnityActivityListener listenerClass : listeners) { 60 | listenerClass.onTrimMemory(i); 61 | } 62 | } 63 | 64 | public void onWindowFocusChanged(boolean b) { 65 | for (UnityActivityListener listenerClass : listeners) { 66 | listenerClass.onWindowFocusChanged(b); 67 | } 68 | } 69 | 70 | public void onStop() { 71 | for (UnityActivityListener listenerClass : listeners) { 72 | listenerClass.onStop(); 73 | } 74 | } 75 | 76 | public void onRestart() { 77 | for (UnityActivityListener listenerClass : listeners) { 78 | listenerClass.onRestart(); 79 | } 80 | } 81 | 82 | public void onBackPressed() { 83 | for (UnityActivityListener listenerClass : listeners) { 84 | listenerClass.onBackPressed(); 85 | } 86 | } 87 | 88 | public void onConfigurationChanged(Configuration configuration) { 89 | for (UnityActivityListener listenerClass : listeners) { 90 | listenerClass.onConfigurationChanged(configuration); 91 | } 92 | } 93 | 94 | public void onSaveInstanceState(Bundle outState) { 95 | for (UnityActivityListener listenerClass : listeners) { 96 | listenerClass.onSaveInstanceState(outState); 97 | } 98 | } 99 | 100 | public void onRestoreInstanceState(Bundle savedInstanceState) { 101 | for (UnityActivityListener listenerClass : listeners) { 102 | listenerClass.onRestoreInstanceState(savedInstanceState); 103 | } 104 | } 105 | 106 | public void onRequestPermissionsResult(int requestCode, String[] permissions, int[] grantResults) { 107 | for (UnityActivityListener listenerClass : listeners) { 108 | listenerClass.onRequestPermissionsResult(requestCode, permissions, grantResults); 109 | } 110 | } 111 | 112 | public void onActivityResult(int requestCode, int resultCode, Intent data) { 113 | for (UnityActivityListener listenerClass : listeners) { 114 | listenerClass.onActivityResult(requestCode, resultCode, data); 115 | } 116 | } 117 | } 118 | 119 | -------------------------------------------------------------------------------- /unityplayeractivityextension/src/main/java/martingonzalez/com/unityplayeractivityextension/UnityPlayerActivityExtension.java: -------------------------------------------------------------------------------- 1 | package martingonzalez.com.unityplayeractivityextension; 2 | 3 | import android.content.Intent; 4 | import android.content.res.Configuration; 5 | import android.os.Bundle; 6 | import android.support.annotation.NonNull; 7 | import android.util.Log; 8 | 9 | import com.unity3d.player.UnityPlayerActivity; 10 | 11 | import java.util.List; 12 | 13 | public class UnityPlayerActivityExtension extends UnityPlayerActivity { 14 | 15 | public static final String UNITY_TAG = "Unity"; 16 | private UnityActivityListenersNotifier notifier; 17 | 18 | @Override 19 | protected void onCreate(Bundle bundle) { 20 | 21 | super.onCreate(bundle); 22 | 23 | logOverrideMethod("onCreate"); 24 | UnityActivityListenersLoader listenersLoader = new UnityActivityListenersLoader(); 25 | List listeners = listenersLoader.getActivityListenersFrom(this); 26 | notifier = new UnityActivityListenersNotifier(listeners); 27 | notifier.onCreate(bundle); 28 | } 29 | 30 | @Override 31 | protected void onStart() { 32 | super.onStart(); 33 | logOverrideMethod("onStart"); 34 | notifier.onStart(); 35 | } 36 | 37 | @Override 38 | protected void onResume() { 39 | super.onResume(); 40 | logOverrideMethod("onResume"); 41 | notifier.onResume(); 42 | } 43 | 44 | @Override 45 | protected void onPause() { 46 | super.onPause(); 47 | logOverrideMethod("onPause"); 48 | notifier.onPause(); 49 | } 50 | 51 | @Override 52 | protected void onDestroy() { 53 | super.onDestroy(); 54 | logOverrideMethod("onDestroy"); 55 | notifier.onDestroy(); 56 | } 57 | 58 | @Override 59 | protected void onNewIntent(Intent intent) { 60 | super.onNewIntent(intent); 61 | logOverrideMethod("onNewIntent"); 62 | notifier.onNewIntent(intent); 63 | } 64 | 65 | @Override 66 | public void onLowMemory() { 67 | super.onLowMemory(); 68 | logOverrideMethod("onLowMemory"); 69 | notifier.onLowMemory(); 70 | } 71 | 72 | @Override 73 | public void onTrimMemory(int i) { 74 | super.onTrimMemory(i); 75 | logOverrideMethod("onTrimMemory"); 76 | notifier.onTrimMemory(i); 77 | } 78 | 79 | @Override 80 | public void onWindowFocusChanged(boolean b) { 81 | super.onWindowFocusChanged(b); 82 | logOverrideMethod("onWindowFocusChanged"); 83 | notifier.onWindowFocusChanged(b); 84 | } 85 | 86 | @Override 87 | protected void onStop() { 88 | super.onStop(); 89 | logOverrideMethod("onStop"); 90 | notifier.onStop(); 91 | } 92 | 93 | @Override 94 | protected void onRestart() { 95 | super.onRestart(); 96 | logOverrideMethod("onRestart"); 97 | notifier.onRestart(); 98 | } 99 | 100 | @Override 101 | public void onBackPressed() { 102 | super.onBackPressed(); 103 | logOverrideMethod("onBackPressed"); 104 | notifier.onBackPressed(); 105 | } 106 | 107 | @Override 108 | public void onConfigurationChanged(Configuration configuration) { 109 | super.onConfigurationChanged(configuration); 110 | logOverrideMethod("onConfigurationChanged"); 111 | notifier.onConfigurationChanged(configuration); 112 | } 113 | 114 | @Override 115 | protected void onSaveInstanceState(Bundle outState) { 116 | super.onSaveInstanceState(outState); 117 | logOverrideMethod("onSaveInstanceState"); 118 | notifier.onSaveInstanceState(outState); 119 | } 120 | 121 | @Override 122 | protected void onRestoreInstanceState(Bundle savedInstanceState) { 123 | super.onRestoreInstanceState(savedInstanceState); 124 | logOverrideMethod("onRestoreInstanceState"); 125 | notifier.onRestoreInstanceState(savedInstanceState); 126 | } 127 | 128 | @Override 129 | public void onRequestPermissionsResult(int requestCode, @NonNull String[] permissions, @NonNull int[] grantResults) { 130 | super.onRequestPermissionsResult(requestCode, permissions, grantResults); 131 | notifier.onRequestPermissionsResult(requestCode, permissions, grantResults); 132 | } 133 | 134 | @Override 135 | protected void onActivityResult(int requestCode, int resultCode, Intent data) { 136 | super.onActivityResult(requestCode, resultCode, data); 137 | notifier.onActivityResult(requestCode, resultCode, data); 138 | } 139 | 140 | private void logOverrideMethod(String methodName) { 141 | Log.d(UNITY_TAG, "#### " + methodName + " from UnityPlayerActivityExtension"); 142 | } 143 | } 144 | -------------------------------------------------------------------------------- /unityplayeractivityextension/src/main/res/values/strings.xml: -------------------------------------------------------------------------------- 1 | 2 | UnityPlayerActivityExtension 3 | 4 | --------------------------------------------------------------------------------