GetValueAsString
Namespace: SynicSugar.MatchMake
Class: AttributeData
public static string GetValueAsString(List<AttributeData> list, string Key)
Description
Get specific value from user attributes for GUI.
Convert AttributeData to string and return the value even if the type of AttributeData is not a string.
using System.Collections.Generic;
using SynicSugar.MatchMake;
using SynicSugar.P2P;
using UnityEngine;
public class LobbyCondition : MonoBehaviour {
void OnUpdatedMemberAttribute(UserId target){
List<AttributeData> data = MatchMakeManager.Instance.GetTargetAttributeData(target);
Debug.LogFormat("NAME: {0} / LEVEL: {1}", AttributeData.GetValueAsString(data, "NAME"), AttributeData.GetValueAsString(data, "LEVEL"));
}
}