From 358eb5d7de6cf327645f7cc45efd5665dd91cddd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dino=20Fejzagi=C4=87?= Date: Tue, 7 May 2024 21:41:45 +0200 Subject: [PATCH 1/3] Update manifest --- Editor/AssemblyInfo.cs | 9 +++++++++ Editor/AssemblyInfo.cs.meta | 11 ++++++++++ Editor/DevToolsPackageInstaller.cs | 9 +++++---- Editor/RealityToolkit.DevTools.Editor.asmdef | 3 ++- Runtime/AssemblyInfo.cs | 9 +++++++++ Runtime/AssemblyInfo.cs.meta | 11 ++++++++++ Runtime/BaseDiagnosticsEventData.cs | 2 +- .../ConsoleDiagnosticsHandler.cs | 2 +- Runtime/DiagnosticsService.cs | 6 +++--- Runtime/DiagnosticsServiceProfile.cs | 6 +++--- .../FrameDiagnosticsHandler.cs | 2 +- package.json | 20 ++++++++++++------- 12 files changed, 69 insertions(+), 21 deletions(-) create mode 100644 Editor/AssemblyInfo.cs create mode 100644 Editor/AssemblyInfo.cs.meta create mode 100644 Runtime/AssemblyInfo.cs create mode 100644 Runtime/AssemblyInfo.cs.meta diff --git a/Editor/AssemblyInfo.cs b/Editor/AssemblyInfo.cs new file mode 100644 index 0000000..992efcf --- /dev/null +++ b/Editor/AssemblyInfo.cs @@ -0,0 +1,9 @@ +// Copyright (c) Reality Collective. All rights reserved. +// Licensed under the MIT License. See LICENSE in the project root for license information. + +using System.Reflection; + +[assembly: AssemblyVersion("1.0.3")] +[assembly: AssemblyTitle("com.realitytoolkit.devtools.editor")] +[assembly: AssemblyCompany("Reality Collective")] +[assembly: AssemblyCopyright("Copyright (c) Reality Collective. All rights reserved.")] diff --git a/Editor/AssemblyInfo.cs.meta b/Editor/AssemblyInfo.cs.meta new file mode 100644 index 0000000..63b9bc3 --- /dev/null +++ b/Editor/AssemblyInfo.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 5ab37ccd8193578489d38a4da9d1ee1d +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {fileID: 2800000, guid: 8ac5213854cf4dbabd140decf8df1946, type: 3} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Editor/DevToolsPackageInstaller.cs b/Editor/DevToolsPackageInstaller.cs index 63b5b0a..0a3e86e 100644 --- a/Editor/DevToolsPackageInstaller.cs +++ b/Editor/DevToolsPackageInstaller.cs @@ -1,11 +1,12 @@ -// Copyright (c) Reality Collective. All rights reserved. +// Copyright (c) Reality Collective. All rights reserved. // Licensed under the MIT License. See LICENSE in the project root for license information. -using RealityCollective.Editor.Utilities; -using RealityCollective.Extensions; using RealityCollective.ServiceFramework.Editor; using RealityCollective.ServiceFramework.Editor.Packages; +using RealityCollective.Utilities.Editor; +using RealityCollective.Utilities.Extensions; using RealityToolkit.Editor; +using RealityToolkit.Editor.Settings; using System.IO; using UnityEditor; @@ -14,7 +15,7 @@ namespace RealityToolkit.DevTools.Editor [InitializeOnLoad] internal static class DevToolsPackageInstaller { - private static readonly string destinationPath = $"{RealityToolkitPreferences.ProfileGenerationPath}DeveloperTools"; + private static readonly string destinationPath = Path.Combine(RealityToolkitEditorSettings.Instance.AssetImportPath, "DeveloperTools"); private static readonly string sourcePath = Path.GetFullPath($"{PathFinderUtility.ResolvePath(typeof(DevToolsPackagePathFinder)).ForwardSlashes()}{Path.DirectorySeparatorChar}{RealityToolkitPreferences.HIDDEN_PACKAGE_ASSETS_PATH}"); static DevToolsPackageInstaller() diff --git a/Editor/RealityToolkit.DevTools.Editor.asmdef b/Editor/RealityToolkit.DevTools.Editor.asmdef index abcda94..397921b 100644 --- a/Editor/RealityToolkit.DevTools.Editor.asmdef +++ b/Editor/RealityToolkit.DevTools.Editor.asmdef @@ -8,7 +8,8 @@ "GUID:2a3f0ca4e21332c44bfdce311ea8943e", "GUID:810ca3bc28e810c44ac144b708fca7f4", "GUID:13703f41b24bb904cb2305abe6317e3d", - "GUID:9753fcbb5b1feaf459f435ac95e51baa" + "GUID:9753fcbb5b1feaf459f435ac95e51baa", + "GUID:4ddd23ea56a3a40f0aa0036d1624a53e" ], "includePlatforms": [ "Editor" diff --git a/Runtime/AssemblyInfo.cs b/Runtime/AssemblyInfo.cs new file mode 100644 index 0000000..1198381 --- /dev/null +++ b/Runtime/AssemblyInfo.cs @@ -0,0 +1,9 @@ +// Copyright (c) Reality Collective. All rights reserved. +// Licensed under the MIT License. See LICENSE in the project root for license information. + +using System.Reflection; + +[assembly: AssemblyVersion("1.0.3")] +[assembly: AssemblyTitle("com.realitytoolkit.devtools")] +[assembly: AssemblyCompany("Reality Collective")] +[assembly: AssemblyCopyright("Copyright (c) Reality Collective. All rights reserved.")] diff --git a/Runtime/AssemblyInfo.cs.meta b/Runtime/AssemblyInfo.cs.meta new file mode 100644 index 0000000..127d240 --- /dev/null +++ b/Runtime/AssemblyInfo.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 7cece503a8ad567429da0f0728cd619a +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {fileID: 2800000, guid: 8ac5213854cf4dbabd140decf8df1946, type: 3} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Runtime/BaseDiagnosticsEventData.cs b/Runtime/BaseDiagnosticsEventData.cs index 1c6a70d..94cd68b 100644 --- a/Runtime/BaseDiagnosticsEventData.cs +++ b/Runtime/BaseDiagnosticsEventData.cs @@ -1,9 +1,9 @@ // Copyright (c) Reality Collective. All rights reserved. // Licensed under the MIT License. See LICENSE in the project root for license information. +using RealityCollective.Utilities.Extensions; using System; using UnityEngine.EventSystems; -using RealityCollective.Extensions; namespace RealityToolkit.DevTools { diff --git a/Runtime/ConsoleDiagnostics/ConsoleDiagnosticsHandler.cs b/Runtime/ConsoleDiagnostics/ConsoleDiagnosticsHandler.cs index 2dc285c..16500b8 100644 --- a/Runtime/ConsoleDiagnostics/ConsoleDiagnosticsHandler.cs +++ b/Runtime/ConsoleDiagnostics/ConsoleDiagnosticsHandler.cs @@ -1,7 +1,7 @@ // Copyright (c) Reality Collective. All rights reserved. // Licensed under the MIT License. See LICENSE in the project root for license information. -using RealityCollective.Attributes; +using RealityCollective.Utilities.Attributes; using System; using TMPro; using UnityEngine; diff --git a/Runtime/DiagnosticsService.cs b/Runtime/DiagnosticsService.cs index cd645df..cbf2077 100644 --- a/Runtime/DiagnosticsService.cs +++ b/Runtime/DiagnosticsService.cs @@ -1,15 +1,15 @@ // Copyright (c) Reality Collective. All rights reserved. // Licensed under the MIT License. See LICENSE in the project root for license information. -using RealityCollective.Definitions.Utilities; -using RealityCollective.Extensions; using RealityCollective.ServiceFramework.Attributes; using RealityCollective.ServiceFramework.Definitions.Platforms; +using RealityCollective.ServiceFramework.Definitions.Utilities; using RealityCollective.ServiceFramework.Services; +using RealityCollective.Utilities.Extensions; using RealityToolkit.DevTools.ConsoleDiagnostics; using RealityToolkit.DevTools.FrameDiagnostics; using RealityToolkit.DevTools.MemoryDiagnostics; -using RealityToolkit.Player.Interfaces; +using RealityToolkit.Player; using UnityEngine; using UnityEngine.EventSystems; using Object = UnityEngine.Object; diff --git a/Runtime/DiagnosticsServiceProfile.cs b/Runtime/DiagnosticsServiceProfile.cs index be98684..4a069e3 100644 --- a/Runtime/DiagnosticsServiceProfile.cs +++ b/Runtime/DiagnosticsServiceProfile.cs @@ -1,9 +1,9 @@ -// Copyright (c) Reality Collective. All rights reserved. +// Copyright (c) Reality Collective. All rights reserved. // Licensed under the MIT License. See LICENSE in the project root for license information. -using RealityCollective.Attributes; -using RealityCollective.Definitions.Utilities; using RealityCollective.ServiceFramework.Definitions; +using RealityCollective.ServiceFramework.Definitions.Utilities; +using RealityCollective.Utilities.Attributes; using UnityEngine; namespace RealityToolkit.DevTools diff --git a/Runtime/FrameDiagnostics/FrameDiagnosticsHandler.cs b/Runtime/FrameDiagnostics/FrameDiagnosticsHandler.cs index 3777756..25331d1 100644 --- a/Runtime/FrameDiagnostics/FrameDiagnosticsHandler.cs +++ b/Runtime/FrameDiagnostics/FrameDiagnosticsHandler.cs @@ -1,7 +1,7 @@ // Copyright (c) Reality Collective. All rights reserved. // Licensed under the MIT License. See LICENSE in the project root for license information. -using RealityCollective.Attributes; +using RealityCollective.Utilities.Attributes; using System.Collections.Generic; using System.Globalization; using System.Text; diff --git a/package.json b/package.json index e0406a1..82df0c6 100644 --- a/package.json +++ b/package.json @@ -2,17 +2,20 @@ "name": "com.realitytoolkit.devtools", "displayName": "RealityToolkit.DevTools", "description": "A collection of services, utilities and tools useful for developing immersive experiences using the Reality Toolkit.", + "version": "1.0.3", + "documentationUrl": "https://realitytoolkit.io", + "changelogUrl": "https://github.com/realitycollective/com.realitytoolkit.devtools/releases", + "licensesUrl": "https://github.com/realitycollective/com.realitytoolkit.devtools/blob/main/LICENSE.md", "keywords": [ "VR", "AR", "XR", "Mixed Reality" ], - "version": "1.0.3", - "unity": "2021.3", - "homepage": "https://github.com/realitycollective", + "unity": "2022.3", + "homepage": "https://realitytoolkit.io", "bugs": { - "url": "https://github.com/realitycollective/realitytoolkit.dev/issues" + "url": "https://github.com/realitycollective/com.realitytoolkit.devtools/issues" }, "license": "MIT", "repository": { @@ -24,9 +27,12 @@ "email": "realitycollectivedev@gmail.com", "url": "https://github.com/realitycollective" }, + "publishConfig": { + "registry": "https://package.openupm.com" + }, "dependencies": { - "com.realitytoolkit.core": "1.0.0-pre.37", - "com.realitytoolkit.player": "1.0.3-pre.1", + "com.realitytoolkit.core": "1.0.0-pre.48", + "com.realitytoolkit.player": "1.0.4", "com.unity.ugui": "1.0.0" }, "assets": [ @@ -35,4 +41,4 @@ "path": "Assets~/" } ] -} +} \ No newline at end of file From 5114355f093e0cd3930e41a23cf2efa47143ae5a Mon Sep 17 00:00:00 2001 From: "Simon (Darkside) Jackson" Date: Wed, 8 May 2024 10:53:56 +0100 Subject: [PATCH 2/3] Add TextMeshPro as a dependency fo rthe package --- package.json | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/package.json b/package.json index 82df0c6..f6e4013 100644 --- a/package.json +++ b/package.json @@ -33,7 +33,8 @@ "dependencies": { "com.realitytoolkit.core": "1.0.0-pre.48", "com.realitytoolkit.player": "1.0.4", - "com.unity.ugui": "1.0.0" + "com.unity.ugui": "1.0.0", + "com.unity.textmeshpro": "3.0.8" }, "assets": [ { From a7100206ce1189cd62fa852069a036de5f77712a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dino=20Fejzagi=C4=87?= Date: Mon, 3 Jun 2024 19:02:38 +0200 Subject: [PATCH 3/3] Remove Enable() / Disable() overrides --- .../ConsoleDiagnosticsServiceModule.cs | 8 ++--- Runtime/DiagnosticsService.cs | 31 ++++--------------- .../FrameDiagnosticsServiceModule.cs | 6 +--- 3 files changed, 9 insertions(+), 36 deletions(-) diff --git a/Runtime/ConsoleDiagnostics/ConsoleDiagnosticsServiceModule.cs b/Runtime/ConsoleDiagnostics/ConsoleDiagnosticsServiceModule.cs index a0799d8..1548949 100644 --- a/Runtime/ConsoleDiagnostics/ConsoleDiagnosticsServiceModule.cs +++ b/Runtime/ConsoleDiagnostics/ConsoleDiagnosticsServiceModule.cs @@ -23,10 +23,8 @@ public ConsoleDiagnosticsServiceModule(string name, uint priority, BaseProfile p } /// - public override void Enable() + public override void Start() { - base.Enable(); - if (DiagnosticsService != null) { Application.logMessageReceived += DiagnosticsService.RaiseLogReceived; @@ -34,10 +32,8 @@ public override void Enable() } /// - public override void Disable() + public override void Destroy() { - base.Disable(); - if (DiagnosticsService != null) { Application.logMessageReceived -= DiagnosticsService.RaiseLogReceived; diff --git a/Runtime/DiagnosticsService.cs b/Runtime/DiagnosticsService.cs index cbf2077..793be73 100644 --- a/Runtime/DiagnosticsService.cs +++ b/Runtime/DiagnosticsService.cs @@ -71,17 +71,6 @@ public override void Initialize() frameEventData = new FrameEventData(currentEventSystem); consoleEventData = new ConsoleEventData(currentEventSystem); memoryEventData = new MemoryEventData(currentEventSystem); - } - - /// - public override void Enable() - { - base.Enable(); - - if (!Application.isPlaying) - { - return; - } if (profile.ShowDiagnosticsWindowOnStart == AutoStartBehavior.AutoStart) { @@ -90,24 +79,13 @@ public override void Enable() } /// - public override void Disable() + public override void Destroy() { - base.Disable(); - - if (!Application.isPlaying) { return; } - - if (diagnosticsWindow != null) + if (diagnosticsWindow.IsNotNull()) { Unregister(diagnosticsWindow); } - } - - /// - public override void Destroy() - { - base.Destroy(); - diagnosticsWindow.Destroy(); if (!diagnosticsRoot.IsNull() && @@ -166,7 +144,10 @@ public bool IsWindowEnabled get => DiagnosticsWindow.activeInHierarchy && isWindowEnabled; set { - if (isWindowEnabled == value) { return; } + if (isWindowEnabled == value) + { + return; + } isWindowEnabled = value; DiagnosticsWindow.SetActive(isWindowEnabled); diff --git a/Runtime/FrameDiagnostics/FrameDiagnosticsServiceModule.cs b/Runtime/FrameDiagnostics/FrameDiagnosticsServiceModule.cs index 78b044a..7b3fc5f 100644 --- a/Runtime/FrameDiagnostics/FrameDiagnosticsServiceModule.cs +++ b/Runtime/FrameDiagnostics/FrameDiagnosticsServiceModule.cs @@ -74,12 +74,8 @@ private int DeviceTargetRefreshRate #region IService Implementation /// - public override void Enable() + public override void Start() { - base.Enable(); - - if (!Application.isPlaying) { return; } - stopwatch.Restart(); }