From 4fb1787a3ba9b946ba0ccb8accbaad16dda5700f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?B=C3=A1lint=20Hodossy?= Date: Fri, 17 Nov 2023 12:46:55 +0000 Subject: [PATCH] Use default value of memory option if not present in imported XML --- unity/Runtime/Components/MjGlobalSettings.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/unity/Runtime/Components/MjGlobalSettings.cs b/unity/Runtime/Components/MjGlobalSettings.cs index de55a6a9..171039a1 100644 --- a/unity/Runtime/Components/MjGlobalSettings.cs +++ b/unity/Runtime/Components/MjGlobalSettings.cs @@ -147,7 +147,7 @@ public struct MjSizeStruct { }; public void ParseMjcf(XmlElement mjcf) { - Memory = mjcf.GetAttribute("memory"); + Memory = mjcf.GetStringAttribute("memory", "-1"); } public XmlElement ToMjcf(XmlElement mjcf) {