using System; using Unity.Multiplayer.Center.Common.Analytics; using UnityEngine.Analytics; namespace Unity.Multiplayer.Center.Analytics { /// /// Package representation in the analytics data. /// [Serializable] internal struct Package { /// /// The identifier of the package. /// public string PackageId; /// /// Whether the user has selected this package for installation. /// public bool SelectedForInstall; /// /// Whether the package was recommended. /// public bool IsRecommended; /// /// Whether the package was already installed when the installation attempt event occured /// public bool IsAlreadyInstalled; } /// /// A single Answer to the GameSpecs questionnaire. /// [Serializable] internal struct GameSpec { /// /// The identifier of the answered question (does not change). /// public string QuestionId; /// /// The text of the question as displayed in the UI (may change with versions). /// public string QuestionText; /// /// Whether the question accepts multiple answers. /// public bool AcceptsMultipleAnswers; /// /// The identifier of the answered question (does not change). /// public string AnswerId; /// /// The text of the answer as displayed in the UI (may change with versions). /// public string AnswerText; } /// /// /// [Serializable] internal struct RecommendationData : IAnalytic.IData { /// /// The preset selected by the user. /// public int Preset; /// /// The preset selected by the user (game genre) as displayed in the UI. /// public string PresetName; /// /// The version defined in the Questionnaire data. /// public string QuestionnaireVersion; /// /// All the selected answers to the questions of the game specs questionnaire. /// public GameSpec[] GameSpecs; } /// /// What type of content the user Interacted with (buttons). /// [Serializable] internal struct InteractionData : IAnalytic.IData { /// /// The identifier of the section that contains the button. /// public string SectionId; /// /// Whether it is a call to action or a link. /// public InteractionDataType Type; /// /// The name of the button in the UI. /// public string DisplayName; /// /// The target package for which the section is helpful. /// public string TargetPackageId; } /// /// Payload of the installation event. /// [Serializable] internal struct InstallData : IAnalytic.IData { /// /// The preset selected by the user. /// public int Preset; /// /// The preset selected by the user (game genre) as displayed in the UI. /// public string PresetName; /// /// The version defined in the Questionnaire data. /// public string QuestionnaireVersion; /// /// All the selected answers to the questions of the game specs questionnaire. /// public GameSpec[] GamesSpecs; /// /// The packages that were in the recommendation tab of the multiplayer center /// public Package[] Packages; } }