From 5dee4b212a57c15f8710a0e0c90066e47f9e09a6 Mon Sep 17 00:00:00 2001 From: "DYLAN-MINIPC\\lordo" Date: Wed, 19 Nov 2025 02:51:45 -0500 Subject: [PATCH] Added define constraints to assembly definitions so that the assemblies are excluded in builds when not necessary. Also made the editor *.uss file load by guid so it's agnostic of the 'Packages' folder. --- .../Editor/Settings/EditorSteamworksNETSettingsElement.cs | 4 +++- .../Editor/com.rlabrecque.steamworks.net.editor.asmdef | 4 +++- .../Runtime/com.rlabrecque.steamworks.net.asmdef | 4 +++- 3 files changed, 9 insertions(+), 3 deletions(-) diff --git a/com.rlabrecque.steamworks.net/Editor/Settings/EditorSteamworksNETSettingsElement.cs b/com.rlabrecque.steamworks.net/Editor/Settings/EditorSteamworksNETSettingsElement.cs index 92afff7a..c2f5f212 100644 --- a/com.rlabrecque.steamworks.net/Editor/Settings/EditorSteamworksNETSettingsElement.cs +++ b/com.rlabrecque.steamworks.net/Editor/Settings/EditorSteamworksNETSettingsElement.cs @@ -8,11 +8,13 @@ public sealed class EditorSteamworksNETSettingsElement : VisualElement private const string UssFilePath = "Packages/com.rlabrecque.steamworks.net/Editor/Settings/EditorSteamworksNETSettingsStyleSheet.uss"; + private const string UssFileGuid = "fcba6a16ac8056e418e5f791a8bbb67c"; public EditorSteamworksNETSettingsElement() { _settings = EditorSteamworksNETSettings.Instance; - var styleSheet = AssetDatabase.LoadAssetAtPath(UssFilePath); + //var styleSheet = AssetDatabase.LoadAssetAtPath(UssFilePath); + var styleSheet = AssetDatabase.LoadAssetAtPath(AssetDatabase.GUIDToAssetPath(UssFileGuid)); if (styleSheet) { diff --git a/com.rlabrecque.steamworks.net/Editor/com.rlabrecque.steamworks.net.editor.asmdef b/com.rlabrecque.steamworks.net/Editor/com.rlabrecque.steamworks.net.editor.asmdef index eab0b2bc..7cdf7310 100644 --- a/com.rlabrecque.steamworks.net/Editor/com.rlabrecque.steamworks.net.editor.asmdef +++ b/com.rlabrecque.steamworks.net/Editor/com.rlabrecque.steamworks.net.editor.asmdef @@ -12,7 +12,9 @@ "overrideReferences": true, "precompiledReferences": [], "autoReferenced": true, - "defineConstraints": [], + "defineConstraints": [ + "UNITY_EDITOR" + ], "versionDefines": [], "noEngineReferences": false } \ No newline at end of file diff --git a/com.rlabrecque.steamworks.net/Runtime/com.rlabrecque.steamworks.net.asmdef b/com.rlabrecque.steamworks.net/Runtime/com.rlabrecque.steamworks.net.asmdef index 2692f320..d73b122a 100644 --- a/com.rlabrecque.steamworks.net/Runtime/com.rlabrecque.steamworks.net.asmdef +++ b/com.rlabrecque.steamworks.net/Runtime/com.rlabrecque.steamworks.net.asmdef @@ -14,7 +14,9 @@ "overrideReferences": true, "precompiledReferences": [], "autoReferenced": true, - "defineConstraints": [], + "defineConstraints": [ + "UNITY_EDITOR || STEAMWORKS_NET" + ], "versionDefines": [], "noEngineReferences": false } \ No newline at end of file