From 02d6632144245a2f4e1d224b7e002705693e9358 Mon Sep 17 00:00:00 2001 From: aarijimam <35100854+aarijimam@users.noreply.github.com> Date: Fri, 22 Nov 2024 21:39:01 +0500 Subject: [PATCH] fix: build errors --- Assets/PlayroomKit/modules/Helpers/DebugLogger.cs | 3 ++- Assets/PlayroomKit/modules/Player/Player.cs | 5 ++++- Assets/Scripts/Player.cs | 5 ----- ProjectSettings/EditorBuildSettings.asset | 4 ++-- 4 files changed, 8 insertions(+), 9 deletions(-) diff --git a/Assets/PlayroomKit/modules/Helpers/DebugLogger.cs b/Assets/PlayroomKit/modules/Helpers/DebugLogger.cs index e6e16ce..908f4f8 100644 --- a/Assets/PlayroomKit/modules/Helpers/DebugLogger.cs +++ b/Assets/PlayroomKit/modules/Helpers/DebugLogger.cs @@ -2,8 +2,9 @@ public static class DebugLogger { -#if UNITY_EDITOR || DEBUG public static bool enableLogs = true; // Toggle to enable/disable logs +#if UNITY_EDITOR || DEBUG + public static void Log(string message) { diff --git a/Assets/PlayroomKit/modules/Player/Player.cs b/Assets/PlayroomKit/modules/Player/Player.cs index 517d452..4f28c6d 100644 --- a/Assets/PlayroomKit/modules/Player/Player.cs +++ b/Assets/PlayroomKit/modules/Player/Player.cs @@ -142,10 +142,13 @@ public void InvokePlayerOnQuitCallback() if (_playerService is PlayerService playerService) { playerService.InvokePlayerOnQuitCallback(id); - }else if (_playerService is BrowserMockPlayerService playerService2) + } + #if UNITY_EDITOR || DEBUG + else if (_playerService is BrowserMockPlayerService playerService2) { playerService2.InvokePlayerOnQuitCallback(id); } + #endif else { Debug.LogWarning("InvokePlayerOnQuitCallback is only supported on build"); diff --git a/Assets/Scripts/Player.cs b/Assets/Scripts/Player.cs index 9a46a93..b289bf0 100644 --- a/Assets/Scripts/Player.cs +++ b/Assets/Scripts/Player.cs @@ -1,8 +1,3 @@ -using System; -using System.Collections; -using System.Collections.Generic; -using System.Runtime.InteropServices; -using UBB; using UnityEngine; public class Player : MonoBehaviour diff --git a/ProjectSettings/EditorBuildSettings.asset b/ProjectSettings/EditorBuildSettings.asset index 0273124..d521744 100644 --- a/ProjectSettings/EditorBuildSettings.asset +++ b/ProjectSettings/EditorBuildSettings.asset @@ -8,10 +8,10 @@ EditorBuildSettings: - enabled: 0 path: Assets/PlayroomKit/Examples/2d-platformer/2d-platformer.unity guid: cf82eec4c654cf44b89cec2a91afebd5 - - enabled: 0 + - enabled: 1 path: Assets/PlayroomKit/Examples/discord-activity/discord-activity.unity guid: bb7ef8e4a67f3fb46b78e5d95a6858a7 - - enabled: 1 + - enabled: 0 path: Assets/PlayroomKit/Examples/package-showcase/showcase.unity guid: 85c9af77ae006408ab24500b953a9035 m_configObjects: {}