From 9b6a15337de6fa6bd4a379998caa3c8e3cee6634 Mon Sep 17 00:00:00 2001 From: Nico de Poel Date: Fri, 23 Jul 2021 08:59:31 +0200 Subject: [PATCH] Fixes to make the game run on Xbox One: limit allocated heap memory to 32 MB (for now). Also copy PDB file for engine to native plugin directory. --- Assets/Scripts/UniQuake.cs | 4 ++++ engine/Windows/VisualStudio/uniquake.vcxproj | 3 ++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/Assets/Scripts/UniQuake.cs b/Assets/Scripts/UniQuake.cs index f7565c1..0944f5f 100644 --- a/Assets/Scripts/UniQuake.cs +++ b/Assets/Scripts/UniQuake.cs @@ -5,7 +5,11 @@ using UnityEngine; public partial class UniQuake: MonoBehaviour { +#if UNITY_GAMECORE_XBOXONE + private const int DefaultMemSize = 0x2000000; // Xbox One is limited to 32 MB of heap space for now... +#else private const int DefaultMemSize = 0x8000000; // 128 MB of heap space +#endif public int memorySize = DefaultMemSize; diff --git a/engine/Windows/VisualStudio/uniquake.vcxproj b/engine/Windows/VisualStudio/uniquake.vcxproj index a03f9cc..9048384 100644 --- a/engine/Windows/VisualStudio/uniquake.vcxproj +++ b/engine/Windows/VisualStudio/uniquake.vcxproj @@ -509,7 +509,8 @@ copy "$(SolutionDir)\..\SDL2\lib\*.dll" "$(TargetDir)" Windows - copy "$(TargetDir)$(TargetName).dll" $(SolutionDir)..\..\..\Assets\Plugins\gamecore\xboxone\uniquake.dll + copy "$(TargetDir)$(TargetName).dll" $(SolutionDir)..\..\..\Assets\Plugins\gamecore\xboxone\uniquake.dll +copy "$(TargetDir)$(TargetName).pdb" $(SolutionDir)..\..\..\Assets\Plugins\gamecore\xboxone\uniquake.pdb