I have created a Unity Match 3 game, which I want to export to Android. It works on the web, it works when you run it on Windows, but as soon as I export it on Android it doesn't work anymore. I have all the scenes loaded, so that can't be the problem. Here you can see it working in the simulator (left) but not on mobile (right, screen mirror): Video I am loading the Scene via the SceneManager Load Scene Method:
public void OnButtonPress(string levelName)
{
Debug.Log("Loading Scene: " + levelName);
SceneManager.LoadScene(levelName, LoadSceneMode.Single);
}
Can anyone give me any information on what i could be doing wrong?
Unity Version: 2022.2.21f1(also tried Version 2021.3.24f1) Phone: OnePlusNord2 5G(DN2103) Android Version 12
Here is the Debug Output, maybe someone can find an error here, i already debugged it via Android Debugging, but either do not understand the error or i can simply find no error:
2023-05-30 15:33:03.286 29685-30436 Unity com.daltonlima.com.Match3 I Loading Scene: Level04 UnityEngine.DebugLogHandler:LogFormat(LogType, Object, String, Object[]) UnityEngine.Logger:Log(LogType, Object) UnityEngine.Debug:Log(Object) Match3.LevelSelect:OnButtonPress(String) (at C:\Schule\bachelor_flutter_crush\projekt_flutter_crush\unity\Match3\Assets\Scripts\LevelSelect.cs:36) UnityEngine.Events.InvokableCall
1:Invoke(String) (at \home\bokken\build\output\unity\unity\Runtime\Export\UnityEvent\UnityEvent.cs:219) UnityEngine.Events.CachedInvokableCall
1:Invoke(Object[]) (at \home\bokken\build\output\unity\unity\Runtime\Export\UnityEvent\UnityEvent.cs:357) UnityEngine.Events.UnityEvent:Invoke() (at \home\bokken\build\output\unity\unity\artifacts\generated\UnityEvent\UnityEvent_0.cs:69) UnityEngine.UI.Button:Press() (at .\Library\PackageCache\[email protected]\Runtime\UI\Core\Button.cs:70) UnityEngine.UI.Button:OnPointerClick(PointerEventData) (at .\Library\PackageCache\[email protected]\Runtime\UI\Core\Button.cs:114) UnityEngine.EventSystems.ExecuteEvents:Execute(IPointe 2023-05-30 15:33:03.301 29685-30529 Unity com.daltonlima.com.Match3 D Unloading 5 Unused Serialized files (Serialized files now loaded: 0) 2023-05-30 15:33:03.361 29685-30436 Unity com.daltonlima.com.Match3 D UnloadTime: 5.955692 ms 2023-05-30 15:33:03.387 29685-30436 Unity com.daltonlima.com.Match3 D Unloading 20 unused Assets / (25.1 KB). Loaded Objects now: 1291. Memory consumption went from 73.2 MB to 73.1 MB. 2023-05-30 15:33:03.387 29685-30436 Unity com.daltonlima.com.Match3 D Total: 4.805923 ms (FindLiveObjects: 0.179923 ms CreateObjectMapping: 0.054385 ms MarkObjects: 4.314769 ms DeleteObjects: 0.255308 ms) 2023-05-30 15:33:03.390 29685-30436 Unity com.daltonlima.com.Match3 I Started LevelColors UnityEngine.DebugLogHandler:LogFormat(LogType, Object, String, Object[]) UnityEngine.Logger:Log(LogType, Object) UnityEngine.Debug:Log(Object) Match3.LevelColors:Start() (at C:\Schule\bachelor_flutter_crush\projekt_flutter_crush\unity\Match3\Assets\Scripts\LevelColors.cs:26)
Somehow i managed to make it work, by simply changing the m_ShowUnitySplashScreen = 0
to m_ShowUnitySplashScreen = 1
I do not fully understand why it is working now, but it somehow does. Thanks anyway for your input. Appreciate it