打完广告后,声音在游戏中消失

Posted

技术标签:

【中文标题】打完广告后,声音在游戏中消失【英文标题】:After advertising, sound disappears in the game 【发布时间】:2020-10-15 15:51:51 【问题描述】:

我正在尝试创建一个完整的单元游戏。

我有以下问题:adMob 有声音广告后(这很重要),声音在游戏中完全消失了。场景重新加载、MobileAds.SetApplicationMuted (false) 和 audiosource.mute = false 无济于事。我测试过的所有安卓(大约 6 种不同型号)和 iPhone 6c 中的 iPhone 6 上都没有这个问题,这个问题只出现在 iPhone 11 上(我测试了两部手机)。

我已经尝试了很多解决方案,但都一无所获。目前最新的信息是来自 xCode 的 iPhine 11 的日志。

最有趣的错误是:

    veganrunner[4766:1537272] [Process] kill() 返回意外错误 1 veganrunner[4766:1537699] [avas] AVAudioSession.mm:997:-[AVAudioSession setActive:withOptions:error:]:停用正在运行 I/O 的音频会话。在停用音频会话之前,应停止或暂停所有 I/O。

来自 iPhone 11(完整版)的日志:

2020-10-15 17:31:46.369580+0300 veganrunner[4766:1537272] UnityIAP UnityEarlyTransactionObserver: Created
2020-10-15 17:31:46.369836+0300 veganrunner[4766:1537272] UnityIAP UnityEarlyTransactionObserver: Registered for lifecycle events
CrashReporter: initialized
2020-10-15 17:31:46.518872+0300 veganrunner[4766:1537272] Built from '2019.4/staging' branch, Version '2019.4.12f1 (225e826a680e)', Build type 'Release', Scripting Backend 'il2cpp'
-> applicationDidFinishLaunching()
2020-10-15 17:31:46.869608+0300 veganrunner[4766:1537272] UnityIAP UnityEarlyTransactionObserver: Added to the payment queue
-> applicationDidBecomeActive()
[Subsystems] Discovering subsystems at path /private/var/containers/Bundle/Application/2265ED33-8636-4536-870A-F3089C7C089B/veganrunner.app/Data/UnitySubsystems
GfxDevice: creating device client; threaded=1
Renderer: Apple A13 GPU
Vendor:   Apple Inc.
Version:  OpenGL ES 3.0 Metal - 66.6
GLES:     3
 GL_OES_standard_derivatives GL_KHR_texture_compression_astc_ldr GL_EXT_color_buffer_half_float GL_EXT_debug_label GL_EXT_debug_marker GL_EXT_pvrtc_sRGB GL_EXT_read_format_bgra GL_EXT_separate_shader_objects GL_EXT_shader_framebuffer_fetch GL_EXT_shader_texture_lod GL_EXT_shadow_samplers GL_EXT_texture_filter_anisotropic GL_APPLE_clip_distance GL_APPLE_color_buffer_packed_float GL_APPLE_copy_texture_levels GL_APPLE_rgb_422 GL_APPLE_texture_format_BGRA8888 GL_IMG_read_format GL_IMG_texture_compression_pvrtc
OPENGL LOG: Creating OpenGL ES 3.0 graphics device ; Context level  <OpenGL ES 3.0> ; Context handle -2141302080
OPENGL LOG: OpenGLES3 is deprecated on this platform
Initialize engine version: 2019.4.12f1 (225e826a680e)
2020-10-15 17:31:47.432886+0300 veganrunner[4766:1537461]  - <Google>[I-ACS025031] AdMob App ID changed. Original, new: (nil), ca-app-pub-8737631907101937~4117797731
2020-10-15 17:31:47.538109+0300 veganrunner[4766:1537461]  - <Google>[I-ACS023007] Analytics v.60802000 started
2020-10-15 17:31:47.541555+0300 veganrunner[4766:1537461]  - <Google>[I-ACS023008] To enable debug logging set the following application argument: -APMAnalyticsDebugEnabled
2020-10-15 17:31:47.552037+0300 veganrunner[4766:1537272] Unbalanced calls to begin/end appearance transitions for <UnityViewControllerStoryboard: 0x1032731d0>.
2020-10-15 17:31:47.555891+0300 veganrunner[4766:1537462]  - <Google>[I-ACS800023] No pending snapshot to activate. SDK name: app_measurement
2020-10-15 17:31:47.637293+0300 veganrunner[4766:1537455]  - <Google>[I-ACS800023] No pending snapshot to activate. SDK name: app_measurement
2020-10-15 17:31:47.682450+0300 veganrunner[4766:1537563]  - <Google>[I-ACS023012] Analytics collection enabled
ERROR: Shader Hidden/PostProcessing/MultiScaleVO shader is not supported on this GPU (none of subshaders/fallbacks are suitable)
ERROR: Shader Hidden/PostProcessing/Debug/Waveform shader is not supported on this GPU (none of subshaders/fallbacks are suitable)
ERROR: Shader Hidden/PostProcessing/Debug/Vectorscope shader is not supported on this GPU (none of subshaders/fallbacks are suitable)
ERROR: Shader Hidden/PostProcessing/Debug/LightMeter shader is not supported on this GPU (none of subshaders/fallbacks are suitable)
ERROR: Shader Hidden/PostProcessing/Debug/Histogram shader is not supported on this GPU (none of subshaders/fallbacks are suitable)
ERROR: Shader Hidden/PostProcessing/ScreenSpaceReflections shader is not supported on this GPU (none of subshaders/fallbacks are suitable)
UnloadTime: 7.325583 ms
Level loaded 
(Filename: ./Runtime/Export/Debug/Debug.bindings.h Line: 35)

Game loaded
GameManager:Awake()
 
(Filename: ./Runtime/Export/Debug/Debug.bindings.h Line: 35)

Game initialized 
(Filename: ./Runtime/Export/Debug/Debug.bindings.h Line: 35)

2020-10-15 17:31:52.526944+0300 veganrunner[4766:1537272] [YandexMobileMetrica] Set track location enabled 0
2020-10-15 17:31:52.532824+0300 veganrunner[4766:1537272] [YandexMobileMetrica] Activated. Version:3.11.1, Release build 18489
2020-10-15 17:31:52.532903+0300 veganrunner[4766:1537272] [YandexMobileMetrica] A debugger is attached. Most crashes will not be reported.
Save file not found in /var/mobile/Containers/Data/Application/8C6A0568-5AD1-4384-A1F9-7CB7B76236E6/Documents/iap.save
SaveManager:LoadIAPProfiler()
IAPManager:LoadData()
 
(Filename: ./Runtime/Export/Debug/Debug.bindings.h Line: 35)

IAP loaded 
(Filename: ./Runtime/Export/Debug/Debug.bindings.h Line: 35)

Market loaded
MarketManager:Awake()
 
(Filename: ./Runtime/Export/Debug/Debug.bindings.h Line: 35)

Market initialized 
(Filename: ./Runtime/Export/Debug/Debug.bindings.h Line: 35)

0 + -28 + 60 + 150 + 22.5 = 204.5 - finishZPos
LevelSpawner:SpawnLevel()
LevelSpawner:Start()
 
(Filename: ./Runtime/Export/Debug/Debug.bindings.h Line: 35)

UnityIAP Version: 2.0.0
UnityEngine.Purchasing.StandardPurchasingModule:Instance(AppStore)
IAPManager:InitializePurchasing()
 
(Filename: ./Runtime/Export/Debug/Debug.bindings.h Line: 35)

2020-10-15 17:31:52.624892+0300 veganrunner[4766:1537272] UnityIAP: Requesting 1 products
2020-10-15 17:31:52.777347+0300 veganrunner[4766:1537272] UnityIAP: Requesting product data...
2020-10-15 17:31:54.124755+0300 veganrunner[4766:1537455] UnityIAP: Received 1 products
2020-10-15 17:31:54.125848+0300 veganrunner[4766:1537455] UnityIAP: No App Receipt found
2020-10-15 17:31:54.135690+0300 veganrunner[4766:1537272] UnityIAP: No App Receipt found
OnInitialized: PASS
IAPManager:OnInitialized(IStoreController, IExtensionProvider)
UnityEngine.Purchasing.PurchasingManager:CheckForInitialization()
UnityEngine.Purchasing.PurchasingManager:OnProductsRetrieved(List`1)
UnityEngine.Purchasing.AppleStoreImpl:OnProductsRetrieved(String)
System.Action:Invoke()
UnityEngine.Purchasing.Extension.UnityUtil:Update()
 
(Filename: ./Runtime/Export/Debug/Debug.bindings.h Line: 35)

UnityIAP: Initialization complete with  1 items
UnityEngine.Purchasing.Promo:ProvideProductsToAds(HashSet`1, Boolean)
UnityEngine.Purchasing.AppleStoreImpl:OnProductsRetrieved(String)
System.Action:Invoke()
UnityEngine.Purchasing.Extension.UnityUtil:Update()
 
(Filename: ./Runtime/Export/Debug/Debug.bindings.h Line: 35)

2020-10-15 17:31:54.136238+0300 veganrunner[4766:1537272] UnityIAP: Add transaction observer
2020-10-15 17:31:54.136287+0300 veganrunner[4766:1537272] UnityIAP UnityEarlyTransactionObserver: Request to initiate queued payments
2020-10-15 17:32:01.288259+0300 veganrunner[4766:1537558] [YandexMobileMetrica] Client event is received: Игрок НЕ прошёл 4 уровень, он врезался в препятствие. (apiKey: 8eee54b7-xxxx-xxxx-xxxx-xxxxxxxx96bf).
2020-10-15 17:32:01.303594+0300 veganrunner[4766:1537563] [YandexMobileMetrica] Client event is saved to db: Игрок НЕ прошёл 4 уровень, он врезался в препятствие. (apiKey: 8eee54b7-xxxx-xxxx-xxxx-xxxxxxxx96bf).
Market saved
System.Action`1:Invoke(T)
Player:Crash(ObstacleChunkGroup)
Obstacle:Crashed(Player)
 
(Filename: ./Runtime/Export/Debug/Debug.bindings.h Line: 35)

haptics stoped (usually because they have finished playing)
System.Action:Invoke()
 
(Filename: ./Runtime/Export/Debug/Debug.bindings.h Line: 35)

2020-10-15 17:32:04.052005+0300 veganrunner[4766:1537563] [YandexMobileMetrica] Client event is received: Игрок решил посмотреть (продолжить уровень) рекламу. (apiKey: 8eee54b7-xxxx-xxxx-xxxx-xxxxxxxx96bf).
2020-10-15 17:32:04.056249+0300 veganrunner[4766:1537272] <Google> To get test ads on this device, set: GADMobileAds.sharedInstance.requestConfiguration.testDeviceIdentifiers = @[ @"a9016ed766687d5de9e32dfa87b64850" ];
2020-10-15 17:32:04.063667+0300 veganrunner[4766:1537563] [YandexMobileMetrica] Client event is saved to db: Игрок решил посмотреть (продолжить уровень) рекламу. (apiKey: 8eee54b7-xxxx-xxxx-xxxx-xxxxxxxx96bf).
2020-10-15 17:32:04.183464+0300 veganrunner[4766:1537272] [Process] kill() returned unexpected error 1
2020-10-15 17:32:04.183490+0300 veganrunner[4766:1537272] [Process] kill() returned unexpected error 1
2020-10-15 17:32:04.185149+0300 veganrunner[4766:1537272] [Process] kill() returned unexpected error 1
2020-10-15 17:32:04.188933+0300 veganrunner[4766:1537272] [Process] kill() returned unexpected error 1
2020-10-15 17:32:04.237736+0300 veganrunner[4766:1537272] [Process] kill() returned unexpected error 1
--//--
2020-10-15 17:32:06.352934+0300 veganrunner[4766:1537272] [Process] kill() returned unexpected error 1
2020-10-15 17:32:06.368974+0300 veganrunner[4766:1537272] [Process] kill() returned unexpected error 1
2020-10-15 17:32:06.407489+0300 veganrunner[4766:1537272] [Process] kill() returned unexpected error 1
2020-10-15 17:32:06.419925+0300 veganrunner[4766:1537272] [Process] kill() returned unexpected error 1
2020-10-15 17:32:07.410927+0300 veganrunner[4766:1537272] [Process] kill() returned unexpected error 1
2020-10-15 17:32:07.420268+0300 veganrunner[4766:1537272] [Process] kill() returned unexpected error 1
HandleRewardedAdLoaded event received
ADManager:HandleOnRewardVideoLoaded(Object, EventArgs)
System.EventHandler`1:Invoke(Object, TEventArgs)
System.EventHandler`1:Invoke(Object, TEventArgs)
 
(Filename: ./Runtime/Export/Debug/Debug.bindings.h Line: 35)

2020-10-15 17:32:07.434270+0300 veganrunner[4766:1537272] [Process] kill() returned unexpected error 1
2020-10-15 17:32:07.434365+0300 veganrunner[4766:1537272] [Process] kill() returned unexpected error 1
2020-10-15 17:32:07.521384+0300 veganrunner[4766:1537272] [Process] kill() returned unexpected error 1
2020-10-15 17:32:07.585163+0300 veganrunner[4766:1537272] [Process] kill() returned unexpected error 1
2020-10-15 17:32:07.785422+0300 veganrunner[4766:1537272] [Process] kill() returned unexpected error 1
2020-10-15 17:32:07.985719+0300 veganrunner[4766:1537272] [Process] kill() returned unexpected error 1
2020-10-15 17:32:08.024800+0300 veganrunner[4766:1537272] [Process] kill() returned unexpected error 1
--//--
2020-10-15 17:32:12.914277+0300 veganrunner[4766:1537272] [Process] kill() returned unexpected error 1
2020-10-15 17:32:12.928949+0300 veganrunner[4766:1537272] [Process] kill() returned unexpected error 1
2020-10-15 17:32:12.934322+0300 veganrunner[4766:1537272] [Process] kill() returned unexpected error 1
2020-10-15 17:32:12.985304+0300 veganrunner[4766:1537272] [Process] kill() returned unexpected error 1
2020-10-15 17:32:13.164361+0300 veganrunner[4766:1537272] [Process] kill() returned unexpected error 1
HandleRewardedAdRewarded event received for 10 coins
ADManager:HandleUserEarnedReward(Object, Reward)
System.EventHandler`1:Invoke(Object, TEventArgs)
System.EventHandler`1:Invoke(Object, TEventArgs)
 
(Filename: ./Runtime/Export/Debug/Debug.bindings.h Line: 35)

2020-10-15 17:32:13.173598+0300 veganrunner[4766:1537272] [Process] kill() returned unexpected error 1
2020-10-15 17:32:13.186839+0300 veganrunner[4766:1537272] [Process] kill() returned unexpected error 1
2020-10-15 17:32:13.200822+0300 veganrunner[4766:1537272] [Process] kill() returned unexpected error 1
2020-10-15 17:32:13.385369+0300 veganrunner[4766:1537272] [Process] kill() returned unexpected error 1
--//--
2020-10-15 17:32:15.185953+0300 veganrunner[4766:1537272] [Process] kill() returned unexpected error 1
2020-10-15 17:32:15.221110+0300 veganrunner[4766:1537272] [Process] kill() returned unexpected error 1
2020-10-15 17:32:15.221421+0300 veganrunner[4766:1537272] [Process] kill() returned unexpected error 1
2020-10-15 17:32:15.295343+0300 veganrunner[4766:1537272] [Process] kill() returned unexpected error 1
2020-10-15 17:32:15.341505+0300 veganrunner[4766:1537699] [general] Connection to daemon was invalidated
2020-10-15 17:32:15.342036+0300 veganrunner[4766:1537272] [Process] kill() returned unexpected error 1
2020-10-15 17:32:15.343568+0300 veganrunner[4766:1537272] [Process] kill() returned unexpected error 1
2020-10-15 17:32:15.363766+0300 veganrunner[4766:1537272] [Process] kill() returned unexpected error 1
2020-10-15 17:32:15.367103+0300 veganrunner[4766:1537272] [Process] kill() returned unexpected error 1
2020-10-15 17:32:15.367682+0300 veganrunner[4766:1537272] [Process] kill() returned unexpected error 1
2020-10-15 17:32:15.371294+0300 veganrunner[4766:1537272] [Process] kill() returned unexpected error 1
2020-10-15 17:32:15.371858+0300 veganrunner[4766:1537272] [Process] kill() returned unexpected error 1
2020-10-15 17:32:15.373798+0300 veganrunner[4766:1537272] [Process] kill() returned unexpected error 1
2020-10-15 17:32:15.991501+0300 veganrunner[4766:1537699] [avas] AVAudioSession.mm:997:-[AVAudioSession setActive:withOptions:error:]: Deactivating an audio session that has running I/O. All I/O should be stopped or paused prior to deactivating the audio session.
2020-10-15 17:32:15.995125+0300 veganrunner[4766:1537272] [Process] kill() returned unexpected error 1
2020-10-15 17:32:15.996682+0300 veganrunner[4766:1537272] [Process] kill() returned unexpected error 1
2020-10-15 17:32:15.997522+0300 veganrunner[4766:1537272] [Process] kill() returned unexpected error 1
2020-10-15 17:32:15.997656+0300 veganrunner[4766:1537272] [Process] kill() returned unexpected error 1
HandleRewardedAdClosed event received
ADManager:HandleOnRewardVideoClosed(Object, EventArgs)
System.EventHandler`1:Invoke(Object, TEventArgs)
System.EventHandler`1:Invoke(Object, TEventArgs)
 
(Filename: ./Runtime/Export/Debug/Debug.bindings.h Line: 35)

2020-10-15 17:32:16.018349+0300 veganrunner[4766:1537558] [YandexMobileMetrica] Client event is received: Игрок посмотрел (продолжить уровень) рекламу. (apiKey: 8eee54b7-xxxx-xxxx-xxxx-xxxxxxxx96bf).
2020-10-15 17:32:16.023358+0300 veganrunner[4766:1537558] [YandexMobileMetrica] Client event is saved to db: Игрок посмотрел (продолжить уровень) рекламу. (apiKey: 8eee54b7-xxxx-xxxx-xxxx-xxxxxxxx96bf).
2020-10-15 17:32:16.027333+0300 veganrunner[4766:1537272] [Process] kill() returned unexpected error 1
2020-10-15 17:32:16.027388+0300 veganrunner[4766:1537272] [Process] kill() returned unexpected error 1
2020-10-15 17:32:16.027887+0300 veganrunner[4766:1537272] [Process] kill() returned unexpected error 1
2020-10-15 17:32:16.028163+0300 veganrunner[4766:1537272] [Process] kill() returned unexpected error 1
2020-10-15 17:32:16.028213+0300 veganrunner[4766:1537272] [Process] kill() returned unexpected error 1
2020-10-15 17:32:16.028234+0300 veganrunner[4766:1537272] [Process] kill() returned unexpected error 1
2020-10-15 17:32:16.028308+0300 veganrunner[4766:1537272] [Process] kill() returned unexpected error 1
2020-10-15 17:32:16.028332+0300 veganrunner[4766:1537272] [Process] kill() returned unexpected error 1
2020-10-15 17:32:16.145783+0300 veganrunner[4766:1537272] [ProcessSuspension] 0x12a8e64f0 - ProcessAssertion::processAssertionWasInvalidated()
2020-10-15 17:32:16.145854+0300 veganrunner[4766:1537272] [ProcessSuspension] 0x12a8e7c60 - ProcessAssertion::processAssertionWasInvalidated()
2020-10-15 17:32:16.505373+0300 veganrunner[4766:1537272] [Process] kill() returned unexpected error 1
2020-10-15 17:32:19.269306+0300 veganrunner[4766:1537699] [YandexMobileMetrica] Client event is received: Игрок НЕ прошёл 4 уровень, он врезался в препятствие. (apiKey: 8eee54b7-xxxx-xxxx-xxxx-xxxxxxxx96bf).
Market saved
System.Action`1:Invoke(T)
Player:Crash(ObstacleChunkGroup)
Obstacle:Crashed(Player)
 
(Filename: ./Runtime/Export/Debug/Debug.bindings.h Line: 35)

2020-10-15 17:32:19.285819+0300 veganrunner[4766:1537699] [YandexMobileMetrica] Client event is saved to db: Игрок НЕ прошёл 4 уровень, он врезался в препятствие. (apiKey: 8eee54b7-xxxx-xxxx-xxxx-xxxxxxxx96bf).
2020-10-15 17:32:20.222041+0300 veganrunner[4766:1537558] [YandexMobileMetrica] Client event is sent: Игрок НЕ прошёл 4 уровень, он врезался в препятствие. (apiKey: 8eee54b7-xxxx-xxxx-xxxx-xxxxxxxx96bf).
2020-10-15 17:32:20.222195+0300 veganrunner[4766:1537558] [YandexMobileMetrica] Client event is sent: Игрок решил посмотреть (продолжить уровень) рекламу. (apiKey: 8eee54b7-xxxx-xxxx-xxxx-xxxxxxxx96bf).
2020-10-15 17:32:20.222613+0300 veganrunner[4766:1537558] [YandexMobileMetrica] Client event is sent: Игрок посмотрел (продолжить уровень) рекламу. (apiKey: 8eee54b7-xxxx-xxxx-xxxx-xxxxxxxx96bf).
2020-10-15 17:32:20.222721+0300 veganrunner[4766:1537558] [YandexMobileMetrica] Client event is sent: Игрок НЕ прошёл 4 уровень, он врезался в препятствие. (apiKey: 8eee54b7-xxxx-xxxx-xxxx-xxxxxxxx96bf).
2020-10-15 17:32:20.233074+0300 veganrunner[4766:1537558] [YandexMobileMetrica] Client event is removed from db: Игрок НЕ прошёл 4 уровень, он врезался в препятствие. (apiKey: 8eee54b7-xxxx-xxxx-xxxx-xxxxxxxx96bf).
2020-10-15 17:32:20.233203+0300 veganrunner[4766:1537558] [YandexMobileMetrica] Client event is removed from db: Игрок решил посмотреть (продолжить уровень) рекламу. (apiKey: 8eee54b7-xxxx-xxxx-xxxx-xxxxxxxx96bf).
2020-10-15 17:32:20.233337+0300 veganrunner[4766:1537558] [YandexMobileMetrica] Client event is removed from db: Игрок посмотрел (продолжить уровень) рекламу. (apiKey: 8eee54b7-xxxx-xxxx-xxxx-xxxxxxxx96bf).
2020-10-15 17:32:20.236549+0300 veganrunner[4766:1537558] [YandexMobileMetrica] Client event is removed from db: Игрок НЕ прошёл 4 уровень, он врезался в препятствие. (apiKey: 8eee54b7-xxxx-xxxx-xxxx-xxxxxxxx96bf).
haptics stoped (usually because they have finished playing)
System.Action:Invoke()
 
(Filename: ./Runtime/Export/Debug/Debug.bindings.h Line: 35)

Unloading 5 Unused Serialized files (Serialized files now loaded: 0)
UnloadTime: 8.909333 ms
Level loaded 
(Filename: ./Runtime/Export/Debug/Debug.bindings.h Line: 35)


Unloading 6 unused Assets to reduce memory usage. Loaded Objects now: 38455.
Total: 15.427625 ms (FindLiveObjects: 1.797917 ms CreateObjectMapping: 2.438500 ms MarkObjects: 11.082000 ms  DeleteObjects: 0.108458 ms)

0 + -28 + 60 + 150 + 22.5 = 204.5 - finishZPos
LevelSpawner:SpawnLevel()
LevelSpawner:Start()
 
(Filename: ./Runtime/Export/Debug/Debug.bindings.h Line: 35)

2020-10-15 17:32:27.484782+0300 veganrunner[4766:1537558] [YandexMobileMetrica] Client event is received: Игрок НЕ прошёл 4 уровень, он врезался в препятствие. (apiKey: 8eee54b7-xxxx-xxxx-xxxx-xxxxxxxx96bf).
Market saved
System.Action`1:Invoke(T)
Player:Crash(ObstacleChunkGroup)
Obstacle:Crashed(Player)
 
(Filename: ./Runtime/Export/Debug/Debug.bindings.h Line: 35)

2020-10-15 17:32:27.497750+0300 veganrunner[4766:1537558] [YandexMobileMetrica] Client event is saved to db: Игрок НЕ прошёл 4 уровень, он врезался в препятствие. (apiKey: 8eee54b7-xxxx-xxxx-xxxx-xxxxxxxx96bf).
-> applicationWillResignActive()
2020-10-15 17:32:29.916826+0300 veganrunner[4766:1537272] [Process] kill() returned unexpected error 1
haptics stoped (usually because they have finished playing)
System.Action:Invoke()
 
(Filename: ./Runtime/Export/Debug/Debug.bindings.h Line: 35)

2020-10-15 17:32:30.875377+0300 veganrunner[4766:1537272] [Process] kill() returned unexpected error 1
-> applicationDidEnterBackground()
2020-10-15 17:32:31.087629+0300 veganrunner[4766:1537272] Can't end BackgroundTask: no background task exists with identifier 12 (0xc), or it may have already been ended. Break in UIApplicationEndBackgroundTaskError() to debug.
2020-10-15 17:32:31.088078+0300 veganrunner[4766:1537272] [Process] kill() returned unexpected error 1
2020-10-15 17:32:31.088200+0300 veganrunner[4766:1537272] [Process] kill() returned unexpected error 1
2020-10-15 17:32:31.088301+0300 veganrunner[4766:1537272] [Process] kill() returned unexpected error 1
2020-10-15 17:32:31.088486+0300 veganrunner[4766:1537272] [Process] kill() returned unexpected error 1
2020-10-15 17:32:31.089640+0300 veganrunner[4766:1537272] [Process] kill() returned unexpected error 1
--//--
2020-10-15 17:32:34.145587+0300 veganrunner[4766:1537272] [Process] kill() returned unexpected error 1
2020-10-15 17:32:34.145954+0300 veganrunner[4766:1537272] [Process] kill() returned unexpected error 1
2020-10-15 17:32:34.162213+0300 veganrunner[4766:1537272] [Process] kill() returned unexpected error 1
2020-10-15 17:32:34.162457+0300 veganrunner[4766:1537272] [Process] kill() returned unexpected error 1

我很乐意为您提供任何帮助并准备回答任何问题

【问题讨论】:

很好,很详细的问题。一些小问题:什么是“完整的单元游戏”?另外,你用什么来实现这个? (标签建议使用 Unity3d。)在没有广告的情况下运行游戏会发生什么? 我的意思是一个完整的游戏,这意味着有声音,有振动(我使用了很好的振动资产),有广告(admob),有分析(yandex metrika),游戏内购买等等。创建一个游戏,我使用unity版本2019.4.12f1,并构建应用程序xcode版本11.6。当我构建一个没有广告的项目,或者如果一个广告播放没有声音,那么就没有问题 纯属猜测...确保您在退出 admob 时正确关闭和释放音频设备等资产 感谢大家的帮助。我找到了解决方案 【参考方案1】:

Apple 在 2015 年推出了一种压力感应技术,称为 3D Touch。但在 2018 年,这项技术失宠了,如果我没记错的话,iPhone XR、iPhone SE 和 iPhone 11 型号用 Haptic Touch 取代了它。 我的问题与我为实现振动而导入的助手有关(很好的振动)。此资产提供仅适用于较新手机的高级振动。一般来说,错误是由这种振动的再现引起的,我决定不打扰,干脆拒绝使用这种振动。我写信给开发人员来修复这个错误。 如果有人提供一种解决方案,以保留这种类型的振动为前提,我会很高兴,但我认为这是一个具体问题,我不会在此浪费时间。

【讨论】:

以上是关于打完广告后,声音在游戏中消失的主要内容,如果未能解决你的问题,请参考以下文章

unity_小功能实现(避免游戏对象被销毁时声音消失)

iAd 冻结游戏画面

说一下打完游戏后的感觉. 因为花了不少时间.

游戏结束后如何在 Swift SceneKit 游戏中启用广告?

想要在游戏结束后在“我的游戏”中展示 AdMob 插页式广告

在 SpriteKit 中暂停游戏后文本消失