using UnityEngine; namespace EFSDK { public static class AutoSetEFSdk { [RuntimeInitializeOnLoadMethod(RuntimeInitializeLoadType.BeforeSceneLoad)] public static void SetupCommunicationObject() { try { GameObject communicationObject = new GameObject("EFSdkAndroid"); if (communicationObject != null) { EFSdkAndroid communicationComponent = communicationObject.AddComponent(); if (communicationComponent == null) { Debug.LogError("Failed to add EFSdkAndroid component to the GameObject."); } Object.DontDestroyOnLoad(communicationObject); } else { Debug.LogError("Failed to create the EFSdkAndroid GameObject."); } } catch (System.Exception e) { Debug.LogError($"An error occurred while setting up the communication object: {e.Message}"); } } } }