Version: 2022.2
言語: 日本語
public static IDictionary<string,object> GetDictionary (string key);

パラメーター

key The key identifying the setting.

戻り値

IDictionary<string,object> An instance of Dictionary<string, object> containing the corresponding remote value or values.

説明

Gets a dictionary corresponding to the remote setting identified by key, if it exists.

Remote Settings creates a Dictionary<string, object> instance and adds the remote setting corresponding to the key parameter to it. If the setting is a simple type, then the dictionary contains a single element, which has a key matching the key parameter. If the remote setting is an object, then Remote Settings adds the field names and values of that object to the dictionary as the key-value pairs. If a remote value is an object rather than a simple type, Remote Settings adds a sub-dictionary containing the key-value pairs for the sub-object.

If you do not specify a key when calling GetDictionary(), Remote Settings treats all of your remote settings as a single object. If you specify a key that does not exist, this function returns null.

using UnityEngine;
using System.Collections.Generic;

public class HandleRemoteSettings : MonoBehaviour { private void Start() { IDictionary<string, object> ms = RemoteSettings.GetDictionary("myGameSettings"); Debug.Log(ms); } }
Copyright © 2023 Unity Technologies
优美缔软件(上海)有限公司 版权所有
"Unity"、Unity 徽标及其他 Unity 商标是 Unity Technologies 或其附属机构在美国及其他地区的商标或注册商标。其他名称或品牌是其各自所有者的商标。
公安部备案号:
31010902002961