AttributeData
Namespace: SynicSugar.MatchMake
Description
Attributes associated with Lobby to serach and create lobby.
Max 100 attributes can be set.
Properity
API | description |
Key | The Key for this attribute |
BOOLEAN | The value when it was set as bool |
INT64 | The value when it was set as INT64 |
DOUBLE | The value when it was set as DOUBLE |
STRING | The value when it was set as STRING |
ValueType | The value type of holding |
ComparisonOp | ComparisonOp for this attribute |
Function
API | description |
SetValue | Set a value to the attribute |
GetValueAsString | Get value as string from attribute |
Static Function
API | description |
GetValueAsString | Get specific key value as string from attribute list |
GetValue | Get specific data from attribute data or list |
using System.Collections.Generic;
using SynicSugar.MatchMake;
using UnityEngine;
public class MatchMakeSample {
public void AttributeDebug(){
List<AttributeData> attributes = MatchMakeManager.Instance.GetTargetAttributeData(target);
foreach(var a in attributes){
//If this API is not used, we need to get a value from the same type variable with ValueType.
Debug.LogFormat("Key: {0} / Value: {1}", a.Key, a.GetValueAsString());
}
}
}