using System; namespace Unity.Services.Core.Analytics { /// /// Extensions of InitializationOptions for Analytics /// public static class AnalyticsOptionsExtensions { internal const string AnalyticsUserIdKey = "com.unity.services.core.analytics-user-id"; /// /// Stores the user id for Analytics. /// /// The InitializationOptions object to modify /// The custom user id for Analytics. /// Throws a if id is null or empty. /// /// Return . /// Fluent interface pattern to make it easier to chain set options operations. /// [Obsolete("SetAnalyticsUserId is deprecated. Please use UnityServices.ExternalUserId instead.", false)] public static InitializationOptions SetAnalyticsUserId(this InitializationOptions self, string id) { if (string.IsNullOrEmpty(id)) throw new ArgumentException("Analytics user id cannot be null or empty.", nameof(id)); return self.SetOption(AnalyticsUserIdKey, id); } } }