Version: 2022.3
언어: 한국어
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); } }