「Unity/Firebase/RemoteConfig」の版間の差分
提供: 初心者エンジニアの簡易メモ
(→インストール) |
|||
| 行4: | 行4: | ||
==インストール== | ==インストール== | ||
FirebaseRemoteConfig.unitypackageをAssets/Importからインストールする | FirebaseRemoteConfig.unitypackageをAssets/Importからインストールする | ||
| + | |||
| + | ==Helloworld== | ||
| + | 公式 | ||
| + | https://firebase.google.com/docs/remote-config/use-config-unity?hl=ja | ||
| + | |||
| + | <pre> | ||
| + | System.Collections.Generic.Dictionary defaults = | ||
| + | new System.Collections.Generic.Dictionary(); | ||
| + | |||
| + | // These are the values that are used if we haven't fetched data from the | ||
| + | // service yet, or if we ask for values that the service doesn't have: | ||
| + | defaults.Add("propertyname_string", "default local string"); | ||
| + | defaults.Add("propertyname_int", 1); | ||
| + | defaults.Add("propertyname_float", 1.0); | ||
| + | defaults.Add("propertyname_bool", false); | ||
| + | |||
| + | Firebase.RemoteConfig.FirebaseRemoteConfig.SetDefaults(defaults); | ||
| + | </pre> | ||
| + | |||
| + | error CS0305: Using the generic type 'Dictionary<TKey, TValue>' requires 2 type argumentsとでる。 | ||
==参考== | ==参考== | ||
https://firebase.google.com/docs/remote-config/use-config-unity?hl=ja | https://firebase.google.com/docs/remote-config/use-config-unity?hl=ja | ||
2019年3月22日 (金) 18:43時点における版
FirebaseDL
https://firebase.google.com/docs/remote-config/use-config-unity?hl=ja
インストール
FirebaseRemoteConfig.unitypackageをAssets/Importからインストールする
Helloworld
公式 https://firebase.google.com/docs/remote-config/use-config-unity?hl=ja
System.Collections.Generic.Dictionary defaults =
new System.Collections.Generic.Dictionary();
// These are the values that are used if we haven't fetched data from the
// service yet, or if we ask for values that the service doesn't have:
defaults.Add("propertyname_string", "default local string");
defaults.Add("propertyname_int", 1);
defaults.Add("propertyname_float", 1.0);
defaults.Add("propertyname_bool", false);
Firebase.RemoteConfig.FirebaseRemoteConfig.SetDefaults(defaults);
error CS0305: Using the generic type 'Dictionary<TKey, TValue>' requires 2 type argumentsとでる。
参考
https://firebase.google.com/docs/remote-config/use-config-unity?hl=ja
