private void Start() { if (UnityUserReporting.CurrentClient == null) { UnityUserReporting.Configure(); } }
private void OnSubmitClick(string summary, string description) { //IL_0026: Unknown result type (might be due to invalid IL or missing references) //IL_0040: Unknown result type (might be due to invalid IL or missing references) //IL_0041: Unknown result type (might be due to invalid IL or missing references) //IL_004d: Unknown result type (might be due to invalid IL or missing references) //IL_005e: Unknown result type (might be due to invalid IL or missing references) //IL_007d: Unknown result type (might be due to invalid IL or missing references) //IL_007e: Unknown result type (might be due to invalid IL or missing references) //IL_008a: Unknown result type (might be due to invalid IL or missing references) if (m_currentBugReport != null && !m_isSubmittingUserReport) { m_isSubmittingUserReport = true; m_currentBugReport.set_Summary(summary); UserReportNamedValue val = default(UserReportNamedValue); val.set_Name("Description"); val.set_Value(description); UserReportNamedValue item = val; m_currentBugReport.get_Fields().Add(item); PlayerData instance = PlayerData.instance; if (instance != null) { val = default(UserReportNamedValue); val.set_Name("User Nickname"); val.set_Value(instance.nickName); UserReportNamedValue item2 = val; m_currentBugReport.get_Fields().Add(item2); } UnityUserReporting.get_CurrentClient().SendUserReport(m_currentBugReport, (Action <float, float>)UserReportSubmissionProgress, (Action <bool, UserReport>)UserReportSubmissionCallback); } }
private void Start() { if (Application.isPlaying) { EventSystem x = UnityEngine.Object.FindObjectOfType <EventSystem>(); if (x == null) { GameObject gameObject = new GameObject("EventSystem"); gameObject.AddComponent <EventSystem>(); gameObject.AddComponent <StandaloneInputModule>(); } } if (UnityUserReporting.CurrentClient == null) { UnityUserReporting.Configure(); } }
private void Start() { // Set Up Event System if (Application.isPlaying) { EventSystem sceneEventSystem = UnityEngine.Object.FindObjectOfType <EventSystem>(); if (sceneEventSystem == null) { GameObject eventSystem = new GameObject("EventSystem"); eventSystem.AddComponent <EventSystem>(); eventSystem.AddComponent <StandaloneInputModule>(); } } // Configure Client // This where you would want to change endpoints, override your project identifier, or provide configuration for events, metrics, and screenshots. UnityUserReporting.Configure(); }
private void Start() { mail = GameObject.Find("Logger"); // Set Up Event System if (Application.isPlaying) { EventSystem sceneEventSystem = UnityEngine.Object.FindObjectOfType <EventSystem>(); if (sceneEventSystem == null) { GameObject eventSystem = new GameObject("EventSystem"); eventSystem.AddComponent <EventSystem>(); eventSystem.AddComponent <StandaloneInputModule>(); } } // Configure Client bool configured = false; if (this.UserReportingPlatform == UserReportingPlatformType.Async) { Assembly assembly = Assembly.GetExecutingAssembly(); Type asyncUnityUserReportingPlatformType = assembly.GetType("Unity.Cloud.UserReporting.Plugin.Version2018_3.AsyncUnityUserReportingPlatform"); if (asyncUnityUserReportingPlatformType != null) { object activatedObject = Activator.CreateInstance(asyncUnityUserReportingPlatformType); IUserReportingPlatform asyncUnityUserReportingPlatform = activatedObject as IUserReportingPlatform; if (asyncUnityUserReportingPlatform != null) { UnityUserReporting.Configure(asyncUnityUserReportingPlatform, this.GetConfiguration()); configured = true; } } } if (!configured) { UnityUserReporting.Configure(this.GetConfiguration()); } // Ping string url = string.Format("https://userreporting.cloud.unity3d.com/api/userreporting/projects/{0}/ping", UnityUserReporting.CurrentClient.ProjectIdentifier); UnityUserReporting.CurrentClient.Platform.Post(url, "application/json", Encoding.UTF8.GetBytes("\"Ping\""), (upload, download) => { }, (result, bytes) => { }); }
public void Initialize() { //IL_0077: Unknown result type (might be due to invalid IL or missing references) //IL_0081: Expected O, but got Unknown isReady = false; m_isCreatingUserReport = true; m_isSubmittingUserReport = false; UnityUserReporting.Configure(); UserReportingClient currentClient = UnityUserReporting.get_CurrentClient(); currentClient.TakeScreenshot(1024, 1024, (Action <UserReportScreenshot>) delegate { }); currentClient.CreateUserReport((Action <UserReport>)CreateUserReportCallback); m_updater = new GameObject("BugReportUpdater", new Type[1] { typeof(BugReportUpdater) }); }
// Start is called before the first frame update void Start() { UserReportingClientConfiguration config = new UserReportingClientConfiguration(500, 300, 60, 10); UnityUserReporting.Configure(config); rightHandAnchor = GameObject.Find("RightHandAnchor"); leftHandAnchor = GameObject.Find("LeftHandAnchor"); rightHandGrabber = rightHandAnchor.GetComponent <SimpleGrabber>(); var mainDeck = GameObject.Find("MainDeck"); deckController = mainDeck.GetComponent <DeckController>(); deckCollider = mainDeck.GetComponent <Collider>(); cardHandController = leftHandAnchor.GetComponent <CardHandController>(); Core.AsyncInitialize(appID.ToString()).OnComplete((Message <Oculus.Platform.Models.PlatformInitialize> init_message) => { if (init_message.IsError) { Debug.LogError("Failed to initialize - " + init_message); } else { Entitlements.IsUserEntitledToApplication().OnComplete((entitlemnets_message) => { if (entitlemnets_message.IsError) { Debug.LogError("Entitlements failed - " + entitlemnets_message); } else { Users.GetLoggedInUser().OnComplete((Message <Oculus.Platform.Models.User> logged_in_user_message) => { if (logged_in_user_message.IsError) { Debug.LogError("Could not retrieve logged in user - " + logged_in_user_message); } else { localUser = logged_in_user_message.GetUser(); UnityUserReporting.CurrentClient.LogEvent(UserReportEventLevel.Info, "User logged in"); UnityUserReporting.CurrentClient.AddDeviceMetadata("userID", localUser.ID.ToString()); UnityUserReporting.CurrentClient.AddDeviceMetadata("username", localUser.OculusID); localAvatar = Instantiate(localAvatarPrefab); localAvatar.CanOwnMicrophone = false; localAvatar.UseSDKPackets = true; localAvatar.RecordPackets = true; localAvatar.PacketRecorded += OnLocalAvatarPacketRecorded; localAvatar.oculusUserID = localUser.ID.ToString(); var trackingSpace = GameObject.Find("TrackingSpace"); localAvatar.transform.position = trackingSpace.transform.position; localAvatar.transform.rotation = trackingSpace.transform.rotation; localAvatar.transform.parent = trackingSpace.transform; Rooms.SetUpdateNotificationCallback(OnRoomUpdateCallback); Net.SetConnectionStateChangedCallback(OnConnectionStateChangedCallback); Net.SetPeerConnectRequestCallback(OnConnectRequestCallback); Net.SetPingResultNotificationCallback(OnPingResultCallback); Voip.SetVoipConnectRequestCallback(OnVoipConnectRequestCallback); Voip.SetVoipStateChangeCallback(OnVoipStateChangedCallback); // NOTE - Setting this before the platform is initialized does NOT WORK!! Voip.SetMicrophoneFilterCallback(MicrophoneFilterCallback); Rooms.Join(roomID, true).OnComplete(OnRoomUpdateCallback); #if PLATFORM_ANDROID if (!Permission.HasUserAuthorizedPermission(Permission.Microphone)) { Permission.RequestUserPermission(Permission.Microphone); } UnityUserReporting.CurrentClient.AddDeviceMetadata("Microphone Enabled", Permission.HasUserAuthorizedPermission(Permission.Microphone).ToString()); #endif } }); } }); } }); }