internal void Set(AttributeDataInternal?other) { if (other != null) { Key = other.Value.Key; Value = other.Value.Value; } }
public void Set(AttributeData other) { if (other != null) { m_ApiVersion = LobbyInterface.AttributedataApiLatest; Key = other.Key; Value = other.Value; } }
public void Set(AttributeDataValue other) { if (other != null) { AsInt64 = other.AsInt64; AsDouble = other.AsDouble; AsBool = other.AsBool; AsUtf8 = other.AsUtf8; } }
/// <summary> /// Short SetParameter /// </summary> /// <param name="search">LobbySearch</param> /// <param name="key">Key</param> /// <param name="value">Value</param> /// <param name="comparisonOp">Compare option</param> public static void SetParameter(this LobbySearch search, string key, AttributeDataValue value, ComparisonOp comparisonOp) { var attr = new AttributeData(); attr.Key = key; attr.Value = value; var paramOp = new LobbySearchSetParameterOptions { Parameter = attr, ComparisonOp = comparisonOp, }; var result = search.SetParameter(paramOp); if (result != Result.Success) { Debug.LogError($"error {DebugTools.GetClassMethodName()}:{result}"); } }
/// <summary> /// Short UpdateLobbyModification /// </summary> /// <param name="lobby">LobbyModification</param> /// <param name="key">Key</param> /// <param name="value">Value</param> /// <param name="visibility">Visibility type</param> public static void AddAttribute(this LobbyModification modify, string key, AttributeDataValue value, LobbyAttributeVisibility visibility) { var attr = new AttributeData(); attr.Key = key; attr.Value = value; var addOp = new LobbyModificationAddAttributeOptions { Attribute = attr, Visibility = visibility }; var addRes = modify.AddAttribute(addOp); if (addRes != Result.Success) { Debug.LogError($"{nameof(addRes)}:{addRes}"); } }