From 585992b711580ef95fd0e9ba57d00aa0ff869578 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dino=20Fejzagi=C4=87?= Date: Sun, 2 Nov 2025 12:24:27 +0100 Subject: [PATCH 1/2] Fix used render pipeline check --- Runtime/Utilities/RenderPipelineUtilities.cs | 19 ++++++------------- 1 file changed, 6 insertions(+), 13 deletions(-) diff --git a/Runtime/Utilities/RenderPipelineUtilities.cs b/Runtime/Utilities/RenderPipelineUtilities.cs index b62951ea..89f9e62e 100644 --- a/Runtime/Utilities/RenderPipelineUtilities.cs +++ b/Runtime/Utilities/RenderPipelineUtilities.cs @@ -18,26 +18,19 @@ public static class RenderPipelineUtilities /// The used by the project. public static UnityRenderPipeline GetActiveRenderingPipeline() { -#if UNITY_6000_0_OR_NEWER - var renderPipelineAsset = GraphicsSettings.defaultRenderPipeline; -#else - var renderPipelineAsset = GraphicsSettings.renderPipelineAsset; -#endif + var renderPipelineAsset = GraphicsSettings.currentRenderPipeline; if (renderPipelineAsset.IsNull()) { return UnityRenderPipeline.Legacy; } - switch (renderPipelineAsset.GetType().Name) + return renderPipelineAsset.GetType().Name switch { - case urpAssetTypeName: - return UnityRenderPipeline.UniversalRenderPipeline; - case hdrpAssetTypeName: - return UnityRenderPipeline.HighDefinitionRenderPipeline; - } - - return UnityRenderPipeline.Custom; + urpAssetTypeName => UnityRenderPipeline.UniversalRenderPipeline, + hdrpAssetTypeName => UnityRenderPipeline.HighDefinitionRenderPipeline, + _ => UnityRenderPipeline.Custom, + }; } } } \ No newline at end of file From d703dab57db6f53b77d6dceac012da89e79b8089 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dino=20Fejzagi=C4=87?= Date: Sun, 2 Nov 2025 15:53:37 +0100 Subject: [PATCH 2/2] Remove obsolete Billboard component (moved to player) --- Runtime/Utilities/Billboard.cs | 75 ----------------------------- Runtime/Utilities/Billboard.cs.meta | 11 ----- 2 files changed, 86 deletions(-) delete mode 100644 Runtime/Utilities/Billboard.cs delete mode 100644 Runtime/Utilities/Billboard.cs.meta diff --git a/Runtime/Utilities/Billboard.cs b/Runtime/Utilities/Billboard.cs deleted file mode 100644 index baa676f2..00000000 --- a/Runtime/Utilities/Billboard.cs +++ /dev/null @@ -1,75 +0,0 @@ -// Copyright (c) Reality Collective. All rights reserved. -// Licensed under the MIT License. See LICENSE in the project root for license information. - -using UnityEngine; - -namespace RealityToolkit.Utilities -{ - /// - /// The Billboard class implements the behaviors needed to keep a GameObject oriented towards the user. - /// - public class Billboard : MonoBehaviour - { - [SerializeField, Tooltip("Specifies the axis about which the object will rotate.")] - private SnapAxis axes = SnapAxis.Y; - - [SerializeField, Tooltip("Inverts the rotation, if set.")] - private bool invert = false; - - [SerializeField, Tooltip("Specifies the target we will orient to. If no target is specified, the main camera will be used.")] - private Transform targetTransform; - - /// - /// The axis about which the object will rotate. - /// - public SnapAxis Axes - { - get => axes; - set => axes = value; - } - - /// - /// The target we will orient to. If no target is specified, the main camera will be used. - /// - public Transform TargetTransform - { - get => targetTransform = targetTransform == null ? Camera.main.transform : targetTransform; - set => targetTransform = value == null ? Camera.main.transform : value; - } - - /// - /// Keeps the object facing the camera. - /// - private void Update() - { - var direction = invert ? - transform.position - TargetTransform.position : - TargetTransform.position - transform.position; - - // If we are right next to the camera the rotation is undefined. - if (direction.sqrMagnitude < 0.001f) - { - return; - } - - var rotation = Quaternion.LookRotation(-direction).eulerAngles; - - if ((axes & SnapAxis.X) <= 0) - { - rotation.x = 0f; - } - - if ((axes & SnapAxis.Y) <= 0) - { - rotation.y = 0f; - } - - if ((axes & SnapAxis.Z) <= 0) - { - rotation.z = 0f; - } - - transform.eulerAngles = rotation; - } - } -} \ No newline at end of file diff --git a/Runtime/Utilities/Billboard.cs.meta b/Runtime/Utilities/Billboard.cs.meta deleted file mode 100644 index d3b5b8cd..00000000 --- a/Runtime/Utilities/Billboard.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: d91a2f7184a3427e887e4c91d3cc2113 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {fileID: 2800000, guid: 8ac5213854cf4dbabd140decf8df1946, type: 3} - userData: - assetBundleName: - assetBundleVariant: