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) {