gfaraj
February 27, 2017, 6:57am
1
After the Unity logo disappears, the screen stays blank for about 3-4 seconds and then it loads my first scene. This didn’t happen before when I was using 5.4. I tried a new empty project with the same content as my first scene and it doesn’t have this delay. I tried disabling anything that might be causing a slow-down and nothing has helped. What are some tips to avoid this long delay?
in 5.5 we draw the splash screen whilst the first scene is being loaded in the background, this means that if you have a large first scene then it may still be loading once the splash screen has finished. Try using an empty scene and see if you still have the issue. If it is a large scene then breaking it into smaller sub scenes and loading them in asynchronously at the start may be a good way to reduce the delay.
gfaraj
February 27, 2017, 3:18pm
3
I actually disabled every script in the scene and the only thing that remains is my own company’s logo as a UI image on the scene. There’s nothing else there.
Here’s the logcat output. If you notice, there’s no output after 02-27 09:12:32.755 for about 6-7 seconds until it prints something about Unity Ads on 02-27 09:12:39.554. That is precisely the moment when the screen is blank. Could it be that Unity Ads is doing something that blocks execution?
02-27 09:12:31.096 1524-1757/? I/ActivityManager: START u0 {act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] flg=0x10200000 cmp=com.squadventure.ProjectRockets/com.unity3d.player.UnityPlayerActivity bnds=[576,476][864,846]} from uid 10049 on display 0
02-27 09:12:31.106 3743-3755/? V/SplitWindowPolicy: checkScreen => return. sourceIntent is null or not support SplitWindow component: ComponentInfo{co…/co…UnityPlayerActivity}, isSupportSplit ? false
02-27 09:12:31.211 3743-11691/? D/LGImageQualityEnhancementService: activityStarting: com.squadventure.ProjectRockets/com.unity3d.player.UnityPlayerActivity
02-27 09:12:31.254 1524-1756/? I/ActivityManager: Start proc 24252:com.squadventure.ProjectRockets/u0a311 for activity com.squadventure.ProjectRockets/com.unity3d.player.UnityPlayerActivity
02-27 09:12:31.255 3743-11691/? D/LGImageQualityEnhancementService: activityResuming: com.squadventure.ProjectRockets/com.unity3d.player.UnityPlayerActivity
02-27 09:12:31.277 3743-5701/? D/SplitWindowPolicy: topRunningActivity=ActivityInfo{f3dce53 co…UnityPlayerActivity}, taskId=15559, activityType=0, bIsSplit=false
02-27 09:12:32.098 1524-1757/? D/InputDispatcher: Focus entered window: Window{680f7eb u0 com.squadventure.ProjectRockets/com.unity3d.player.UnityPlayerActivity}
02-27 09:12:32.162 1524-1841/? I/ActivityManager: Displayed com.squadventure.ProjectRockets/com.unity3d.player.UnityPlayerActivity: +927ms (total +902ms)
02-27 09:12:32.165 24252-24252/? V/ViewRootImpl: Contents drawing finished : com.squadventure.ProjectRockets/com.unity3d.player.UnityPlayerActivity
02-27 09:12:32.654 24252-24283/? E/Unity: Unable to find AudioPluginMsHRTF
02-27 09:12:32.655 24252-24283/? E/Unity: Unable to find AudioPluginOculusSpatializer
02-27 09:12:32.751 1524-1815/? D/StatusBarManagerServiceEx: manageNaviBtnDisableList userId=0 what=0x0 pkg=Window{680f7eb u0 com.squadventure.ProjectRockets/com.unity3d.player.UnityPlayerActivity}
02-27 09:12:32.751 1524-1815/? I/SystemUI[Framework]: ==>disabledNaviBtn() what=0x0, token=android.os.Binder@8d55431, pkg=Window{680f7eb u0 com.squadventure.ProjectRockets/com.unity3d.player.UnityPlayerActivity}
02-27 09:12:32.755 24252-24283/? D/Unity: GL_OES_EGL_image GL_OES_EGL_image_external GL_OES_EGL_sync GL_OES_vertex_half_float GL_OES_framebuffer_object GL_OES_rgb8_rgba8 GL_OES_compressed_ETC1_RGB8_texture GL_AMD_compressed_ATC_texture GL_KHR_texture_compression_astc_ldr GL_OES_texture_npot GL_EXT_texture_filter_anisotropic GL_EXT_texture_format_BGRA8888 GL_OES_texture_3D GL_EXT_color_buffer_float GL_EXT_color_buffer_half_float GL_QCOM_alpha_test GL_OES_depth24 GL_OES_packed_depth_stencil GL_OES_depth_texture GL_OES_depth_texture_cube_map GL_EXT_sRGB GL_OES_texture_float GL_OES_texture_float_linear GL_OES_texture_half_float GL_OES_texture_half_float_linear GL_EXT_texture_type_2_10_10_10_REV GL_EXT_texture_sRGB_decode GL_OES_element_index_uint GL_EXT_copy_image GL_EXT_geometry_shader GL_EXT_tessellation_shader GL_OES_texture_stencil8 GL_EXT_shader_io_blocks GL_OES_shader_image_atomic GL_OES_sample_variables GL_EXT_texture_border_clamp GL_EXT_multisampled_render_to_texture GL_OES_shader_multisample_interpolation GL_EXT_texture_cube_map_array GL_EXT_d
02-27 09:12:32.755 24252-24283/? D/Unity: raw_buffers_indexed GL_EXT_gpu_shader5 GL_EXT_robustness GL_EXT_texture_buffer GL_OES_texture_storage_multisample_2d_array GL_OES_sample_shading GL_OES_get_program_binary GL_EXT_debug_label GL_KHR_blend_equation_advanced GL_KHR_blend_equation_advanced_coherent GL_QCOM_tiled_rendering GL_ANDROID_extension_pack_es31a GL_EXT_primitive_bounding_box GL_OES_standard_derivatives GL_OES_vertex_array_object GL_EXT_disjoint_timer_query GL_KHR_debug GL_EXT_YUV_target GL_EXT_sRGB_write_control GL_EXT_texture_norm16 GL_EXT_discard_framebuffer GL_OES_surfaceless_context GL_OVR_multiview GL_OVR_multiview2 GL_EXT_texture_sRGB_R8 GL_KHR_no_error GL_EXT_debug_marker GL_OVR_multiview_multisampled_render_to_texture GL_EXT_buffer_storage GL_EXT_blit_framebuffer_params
02-27 09:12:39.540 24252-24283/? D/UnityAds: com.unity3d.ads.cache.CacheDirectory.getCacheDirectory() (line:35) :: Unity Ads is using external cache directory: /storage/emulated/0/Android/data/com.squadventure.ProjectRockets/cache/UnityAdsCache
02-27 09:12:39.554 24252-24283/? D/UnityAds: com.unity3d.ads.misc.Utilities.writeFile() (line:101) :: Wrote file: /storage/emulated/0/Android/data/com.squadventure.ProjectRockets/cache/UnityAdsCache/UnityAdsStorage-public-data.json
02-27 09:12:39.559 24252-24283/? D/UnityAds: com.unity3d.ads.device.Storage.sendEvent() (line:216) :: Couldn’t send storage event to WebApp
02-27 09:12:39.562 24252-24283/? D/UnityAds: com.unity3d.ads.misc.Utilities.writeFile() (line:101) :: Wrote file: /storage/emulated/0/Android/data/com.squadventure.ProjectRockets/cache/UnityAdsCache/UnityAdsStorage-public-data.json
02-27 09:12:39.562 24252-24283/? D/UnityAds: com.unity3d.ads.device.Storage.sendEvent() (line:216) :: Couldn’t send storage event to WebApp
02-27 09:12:39.586 24252-24283/? D/UnityAds: com.unity3d.ads.UnityAds.initialize() (line:106) :: ENTERED METHOD
02-27 09:12:39.586 24252-24283/? I/UnityAds: com.unity3d.ads.UnityAds.initialize() (line:133) :: Initializing Unity Ads 2.0.6 (2006) with game id 1152670 in production mode
02-27 09:12:39.599 24252-24283/? I/UnityAds: com.unity3d.ads.UnityAds.initialize() (line:144) :: Unity Ads environment check OK
02-27 09:12:39.696 24252-24768/? I/UnityAds: com.unity3d.ads.configuration.InitializeThread$InitializeStateConfig.execute() (line:187) :: Unity Ads init: load configuration from https://config.unityads.unity3d.com/webview/2.0.6/release/config.json
02-27 09:12:39.803 24252-24768/? I/UnityAds: com.unity3d.ads.configuration.InitializeThread$InitializeStateLoadCache.execute() (line:240) :: Unity Ads init: webapp loaded from local cache
02-27 09:12:42.572 24252-25013/? I/UnityAds: com.unity3d.ads.api.Sdk.logInfo() (line:68) :: Requesting configuration from https://adserver.unityads.unity3d.com/games/1152670/configuration?bundleId=com.squadventure.ProjectRockets&encrypted=true&rooted=false&frameworkName=Unity&frameworkVersion=5.5.1f1&adapterName=Engine&adapterVersion=2.0.6
02-27 09:12:42.907 24252-25013/? I/UnityAds: com.unity3d.ads.api.Sdk.logInfo() (line:68) :: Received configuration with 2 placements
02-27 09:12:43.149 24252-25013/? I/UnityAds: com.unity3d.ads.api.Sdk.logInfo() (line:68) :: Requesting ad plan from https://adserver.unityads.unity3d.com/games/1152670/fill?advertisingTrackingId=40b59783-cbb7-42ca-8dfd-1cdab935663d&limitAdTracking=false&deviceMake=LGE&deviceModel=LG-H900&platform=android&screenDensity=640&screenWidth=1440&screenHeight=2392&sdkVersion=2006&screenSize=268435794&apiLevel=23&connectionType=wifi&networkType=13&gamerId=5686cb44fad090fc046b47d8
02-27 09:12:44.590 24252-25013/? I/UnityAds: com.unity3d.ads.api.Sdk.logInfo() (line:68) :: Unity Ads server returned game advertisement for AB Group 12
I’m afraid I dont know anything about Unity Ads. Can you disable it and re run to see if the delay goes away?
You could also ask about Unity Ads in the forum Unity Services - Unity Discussions or alternatively file a bug report.
I was having the same issue with our current game and 5.5.2f. The splash color would hang for addition 10 seconds or so after the logo disappeared. My solution was to disable the splash screen and instead create a (mostly) empty scene as a splash/loading screen while loading the main scene asynchronously. Creates a much nicer opening experience. Hope that helps.
1 Like
gfaraj
February 27, 2017, 8:20pm
6
Sorry, it looks like it was caused by a large music track getting loaded. I changed it from “Decompress On Load” to “Streaming” and it seems to be much, much better now. My bad! Thanks for the suggestions though.
3 Likes
gfaraj:
Sorry, it looks like it was caused by a large music track getting loaded. I changed it from “Decompress On Load” to “Streaming” and it seems to be much, much better now. My bad! Thanks for the suggestions though.
Great news. Glad to hear it was the scene size and not a bug
1 Like
Now that I think about it, I bet mine was the music track as well. Just optimized the import settings this morning and I noticed my loading scene was loading a bit faster.
1 Like
I know this is an old thread (sorry!), but how did you optimise those import settings if you still remember?
Baste
August 27, 2018, 3:53pm
10
It’s a setting on the sound file. Just click any sound in your project, there’s a “Load Type” dropdown. See what it does here .
Hi I know this is old but i’d like to thank this thread. I was able to resolve my issue.