Hello, I am having a issue that I don’t know how to deal with, when using the Facebook SDK 14.1.0.
When I call FB.Init() which initialized the SDK package, It moves my EventSystem to “Don’t destroy on load”. When I then load any other scene, there is now two EventSystem objects, one that used to control the canvas events on the scene, and now also the one moved to “Don’t destroy on load” - and unity starts spamming the warning:
There are 2 event systems in the scene. Please ensure there is always exactly one event system in the scene
The same happens when I go back to the main scene, because it is now loaded with the EventSystem that was there originally, plus the one from Don’t destroy on load…
-
I can’t remove the original one from the main scene, otherwise the user can’t click any buttons to begin with, and I don’t always want to initialize the Facebook SDK, this is an additional optional thing in my game.
-
I could remove all other event systems from all other scene, but this would be a massive pain, since I can no longer run 1 scene at a time when developing… Not ideal - and this still doesn’t solve the issue that there will again be 2 event systems in the main scene each time that one is loaded.
There has got to be some scripting trick that checks if there is an EventSystem in don’t destroy on load, and if so, then destroy the other event system - when a scene is loaded? Or what would be the right way to handle this?
Thanks!