public static async Task <ICloudRemoteConfig> GetAsync(CloudRemoteConfigType type #if FIREBASE_REMOTE_CONFIG || FIREBASE_REALTIME_DATABASE , params object[] param #endif ) { await new WaitUntil(() => !Get(type #if FIREBASE_REMOTE_CONFIG || FIREBASE_REALTIME_DATABASE , param #endif ).IsNull()); return(Get(type #if FIREBASE_REMOTE_CONFIG || FIREBASE_REALTIME_DATABASE , param #endif )); }
public static ICloudRemoteConfig Get(CloudRemoteConfigType type #if FIREBASE_REMOTE_CONFIG || FIREBASE_REALTIME_DATABASE , params object[] param #endif ) { if (remoteConfigs.ContainsKey(type)) { var service = remoteConfigs[type]; switch (type) { #if UNITY_REMOTE_CONFIG case CloudRemoteConfigType.UnityRemoteConfig: { return(service as ICloudRemoteConfig); } #endif #if FIREBASE_REMOTE_CONFIG || FIREBASE_REALTIME_DATABASE case CloudRemoteConfigType.FirebaseRemoteConfig: { var firebaseType = (Firebase.FirebaseCloudRemoteConfigType)param.First(); var firebaseConfigs = service as IDictionary <Firebase.FirebaseCloudRemoteConfigType, ICloudRemoteConfig>; if (firebaseConfigs.ContainsKey(firebaseType)) { return(firebaseConfigs[firebaseType]); } break; } #endif } } return(null); }