<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Unable to load a SLPK file from disk in ArcGIS Maps SDK for Unity Questions</title>
    <link>https://community.esri.com/t5/arcgis-maps-sdk-for-unity-questions/unable-to-load-a-slpk-file-from-disk/m-p/1542315#M985</link>
    <description>&lt;P&gt;I have a SLPK file in my persistant data folder and I want to load it as a layer at runtime. I get the following error message. I get the same error when trying add it via the Inspector.&lt;/P&gt;&lt;P&gt;InvalidOperationException: Stack empty.&lt;BR /&gt;System.Collections.Generic.Stack`1[T].ThrowForEmptyStack () (at &amp;lt;606c2e0a56af495988c860a4ac613e74&amp;gt;:0)&lt;BR /&gt;System.Collections.Generic.Stack`1[T].Pop () (at &amp;lt;606c2e0a56af495988c860a4ac613e74&amp;gt;:0)&lt;BR /&gt;UnityEditor.EditorGUI.EndProperty () (at /Users/bokken/build/output/unity/unity/Editor/Mono/EditorGUI.cs:6848)&lt;BR /&gt;UnityEditor.EditorGUI+PropertyScope.CloseScope () (at /Users/bokken/build/output/unity/unity/Editor/Mono/EditorGUI.cs:6717)&lt;BR /&gt;UnityEngine.GUI+Scope.Dispose (System.Boolean disposing) (at /Users/bokken/build/output/unity/unity/Modules/IMGUI/GUI.cs:1975)&lt;BR /&gt;UnityEngine.GUI+Scope.Dispose () (at /Users/bokken/build/output/unity/unity/Modules/IMGUI/GUI.cs:1988)&lt;BR /&gt;Esri.ArcGISMapsSDK.Editor.Components.ArcGISLayerInstanceDataEditor.OnGUI (UnityEngine.Rect position, UnityEditor.SerializedProperty property, UnityEngine.GUIContent label) (at ./Library/PackageCache/com.esri.arcgis-maps-sdk@c75e1c36614c/Editor/Components/ArcGISLayerInstanceDataEditor.cs:61)&lt;BR /&gt;UnityEditor.PropertyDrawer.OnGUISafe (UnityEngine.Rect position, UnityEditor.SerializedProperty property, UnityEngine.GUIContent label) (at /Users/bokken/build/output/unity/unity/Editor/Mono/ScriptAttributeGUI/PropertyDrawer.cs:27)&lt;BR /&gt;UnityEditor.PropertyHandler.OnGUI (UnityEngine.Rect position, UnityEditor.SerializedProperty property, UnityEngine.GUIContent label, System.Boolean includeChildren, UnityEngine.Rect visibleArea) (at /Users/bokken/build/output/unity/unity/Editor/Mono/ScriptAttributeGUI/PropertyHandler.cs:182)&lt;BR /&gt;UnityEditor.PropertyHandler.OnGUI (UnityEngine.Rect position, UnityEditor.SerializedProperty property, UnityEngine.GUIContent label, System.Boolean includeChildren) (at /Users/bokken/build/output/unity/unity/Editor/Mono/ScriptAttributeGUI/PropertyHandler.cs:142)&lt;BR /&gt;UnityEditorInternal.ReorderableList+Defaults.DrawElement (UnityEngine.Rect rect, UnityEditor.SerializedProperty element, System.Object listItem, System.Boolean selected, System.Boolean focused, System.Boolean draggable, System.Boolean editable) (at /Users/bokken/build/output/unity/unity/Editor/Mono/GUI/ReorderableList.cs:397)&lt;BR /&gt;UnityEditorInternal.ReorderableList.DoListElements (UnityEngine.Rect listRect, UnityEngine.Rect visibleRect) (at /Users/bokken/build/output/unity/unity/Editor/Mono/GUI/ReorderableList.cs:986)&lt;BR /&gt;UnityEditorInternal.ReorderableList.DoList (UnityEngine.Rect rect, UnityEngine.Rect visibleRect) (at /Users/bokken/build/output/unity/unity/Editor/Mono/GUI/ReorderableList.cs:774)&lt;BR /&gt;UnityEditorInternal.ReorderableListWrapper.DrawChildren (UnityEngine.Rect listRect, UnityEngine.Rect headerRect, UnityEngine.Rect sizeRect, UnityEngine.Rect visibleRect, UnityEngine.EventType previousEvent) (at /Users/bokken/build/output/unity/unity/Editor/Mono/Inspector/ReorderableListWrapper.cs:243)&lt;BR /&gt;UnityEditorInternal.ReorderableListWrapper.Draw (UnityEngine.GUIContent label, UnityEngine.Rect r, UnityEngine.Rect visibleArea, System.String tooltip, System.Boolean includeChildren) (at /Users/bokken/build/output/unity/unity/Editor/Mono/Inspector/ReorderableListWrapper.cs:196)&lt;BR /&gt;UnityEditor.PropertyHandler.OnGUI (UnityEngine.Rect position, UnityEditor.SerializedProperty property, UnityEngine.GUIContent label, System.Boolean includeChildren, UnityEngine.Rect visibleArea) (at /Users/bokken/build/output/unity/unity/Editor/Mono/ScriptAttributeGUI/PropertyHandler.cs:224)&lt;BR /&gt;UnityEditor.PropertyHandler.OnGUI (UnityEngine.Rect position, UnityEditor.SerializedProperty property, UnityEngine.GUIContent label, System.Boolean includeChildren) (at /Users/bokken/build/output/unity/unity/Editor/Mono/ScriptAttributeGUI/PropertyHandler.cs:142)&lt;BR /&gt;UnityEditor.PropertyHandler.OnGUILayout (UnityEditor.SerializedProperty property, UnityEngine.GUIContent label, System.Boolean includeChildren, UnityEngine.GUILayoutOption[] options) (at /Users/bokken/build/output/unity/unity/Editor/Mono/ScriptAttributeGUI/PropertyHandler.cs:301)&lt;BR /&gt;UnityEditor.EditorGUILayout.PropertyField (UnityEditor.SerializedProperty property, UnityEngine.GUIContent label, System.Boolean includeChildren, UnityEngine.GUILayoutOption[] options) (at /Users/bokken/build/output/unity/unity/Editor/Mono/EditorGUILayout.cs:2072)&lt;BR /&gt;UnityEditor.EditorGUILayout.PropertyField (UnityEditor.SerializedProperty property, UnityEngine.GUILayoutOption[] options) (at /Users/bokken/build/output/unity/unity/Editor/Mono/EditorGUILayout.cs:2056)&lt;BR /&gt;Esri.ArcGISMapsSDK.Editor.Components.ArcGISMapComponentEditor.OnInspectorGUI () (at ./Library/PackageCache/com.esri.arcgis-maps-sdk@c75e1c36614c/Editor/Components/ArcGISMapComponentEditor.cs:225)&lt;BR /&gt;UnityEditor.UIElements.InspectorElement+&amp;lt;&amp;gt;c__DisplayClass76_0.&amp;lt;CreateInspectorElementUsingIMGUI&amp;gt;b__0 () (at /Users/bokken/build/output/unity/unity/Editor/Mono/UIElements/Inspector/InspectorElement.cs:717)&lt;BR /&gt;UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr, Boolean&amp;amp;) (at /Users/bokken/build/output/unity/unity/Modules/IMGUI/GUIUtility.cs:203)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="csharp"&gt;using System;
using System.Collections;
using System.Collections.Generic;
using Esri.ArcGISMapsSDK.Components;
using Esri.ArcGISMapsSDK.Samples.Components;
using Esri.GameEngine.Layers;
using Esri.Unity;
using UnityEngine;

[RequireComponent(typeof(ArcGISTabletopControllerComponent))]
public class LoadMap : MonoBehaviour
{
    IEnumerator Start()
    {
        ArcGISMapComponent arcGISMap = GetComponent&amp;lt;ArcGISTabletopControllerComponent&amp;gt;().MapComponent;
        yield return new WaitUntil(() =&amp;gt; arcGISMap.Map != null);
        var mapLayers = arcGISMap.Map.Layers;
        string source = Application.persistentDataPath + "/threeDSceneLayer.slpk";
        mapLayers.Add(new ArcGIS3DObjectSceneLayer(source, "", 1, true, ""));
        arcGISMap.View.Map.Layers = mapLayers;
    }
}&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Wed, 25 Sep 2024 05:02:55 GMT</pubDate>
    <dc:creator>ChrisAnderson7</dc:creator>
    <dc:date>2024-09-25T05:02:55Z</dc:date>
    <item>
      <title>Unable to load a SLPK file from disk</title>
      <link>https://community.esri.com/t5/arcgis-maps-sdk-for-unity-questions/unable-to-load-a-slpk-file-from-disk/m-p/1542315#M985</link>
      <description>&lt;P&gt;I have a SLPK file in my persistant data folder and I want to load it as a layer at runtime. I get the following error message. I get the same error when trying add it via the Inspector.&lt;/P&gt;&lt;P&gt;InvalidOperationException: Stack empty.&lt;BR /&gt;System.Collections.Generic.Stack`1[T].ThrowForEmptyStack () (at &amp;lt;606c2e0a56af495988c860a4ac613e74&amp;gt;:0)&lt;BR /&gt;System.Collections.Generic.Stack`1[T].Pop () (at &amp;lt;606c2e0a56af495988c860a4ac613e74&amp;gt;:0)&lt;BR /&gt;UnityEditor.EditorGUI.EndProperty () (at /Users/bokken/build/output/unity/unity/Editor/Mono/EditorGUI.cs:6848)&lt;BR /&gt;UnityEditor.EditorGUI+PropertyScope.CloseScope () (at /Users/bokken/build/output/unity/unity/Editor/Mono/EditorGUI.cs:6717)&lt;BR /&gt;UnityEngine.GUI+Scope.Dispose (System.Boolean disposing) (at /Users/bokken/build/output/unity/unity/Modules/IMGUI/GUI.cs:1975)&lt;BR /&gt;UnityEngine.GUI+Scope.Dispose () (at /Users/bokken/build/output/unity/unity/Modules/IMGUI/GUI.cs:1988)&lt;BR /&gt;Esri.ArcGISMapsSDK.Editor.Components.ArcGISLayerInstanceDataEditor.OnGUI (UnityEngine.Rect position, UnityEditor.SerializedProperty property, UnityEngine.GUIContent label) (at ./Library/PackageCache/com.esri.arcgis-maps-sdk@c75e1c36614c/Editor/Components/ArcGISLayerInstanceDataEditor.cs:61)&lt;BR /&gt;UnityEditor.PropertyDrawer.OnGUISafe (UnityEngine.Rect position, UnityEditor.SerializedProperty property, UnityEngine.GUIContent label) (at /Users/bokken/build/output/unity/unity/Editor/Mono/ScriptAttributeGUI/PropertyDrawer.cs:27)&lt;BR /&gt;UnityEditor.PropertyHandler.OnGUI (UnityEngine.Rect position, UnityEditor.SerializedProperty property, UnityEngine.GUIContent label, System.Boolean includeChildren, UnityEngine.Rect visibleArea) (at /Users/bokken/build/output/unity/unity/Editor/Mono/ScriptAttributeGUI/PropertyHandler.cs:182)&lt;BR /&gt;UnityEditor.PropertyHandler.OnGUI (UnityEngine.Rect position, UnityEditor.SerializedProperty property, UnityEngine.GUIContent label, System.Boolean includeChildren) (at /Users/bokken/build/output/unity/unity/Editor/Mono/ScriptAttributeGUI/PropertyHandler.cs:142)&lt;BR /&gt;UnityEditorInternal.ReorderableList+Defaults.DrawElement (UnityEngine.Rect rect, UnityEditor.SerializedProperty element, System.Object listItem, System.Boolean selected, System.Boolean focused, System.Boolean draggable, System.Boolean editable) (at /Users/bokken/build/output/unity/unity/Editor/Mono/GUI/ReorderableList.cs:397)&lt;BR /&gt;UnityEditorInternal.ReorderableList.DoListElements (UnityEngine.Rect listRect, UnityEngine.Rect visibleRect) (at /Users/bokken/build/output/unity/unity/Editor/Mono/GUI/ReorderableList.cs:986)&lt;BR /&gt;UnityEditorInternal.ReorderableList.DoList (UnityEngine.Rect rect, UnityEngine.Rect visibleRect) (at /Users/bokken/build/output/unity/unity/Editor/Mono/GUI/ReorderableList.cs:774)&lt;BR /&gt;UnityEditorInternal.ReorderableListWrapper.DrawChildren (UnityEngine.Rect listRect, UnityEngine.Rect headerRect, UnityEngine.Rect sizeRect, UnityEngine.Rect visibleRect, UnityEngine.EventType previousEvent) (at /Users/bokken/build/output/unity/unity/Editor/Mono/Inspector/ReorderableListWrapper.cs:243)&lt;BR /&gt;UnityEditorInternal.ReorderableListWrapper.Draw (UnityEngine.GUIContent label, UnityEngine.Rect r, UnityEngine.Rect visibleArea, System.String tooltip, System.Boolean includeChildren) (at /Users/bokken/build/output/unity/unity/Editor/Mono/Inspector/ReorderableListWrapper.cs:196)&lt;BR /&gt;UnityEditor.PropertyHandler.OnGUI (UnityEngine.Rect position, UnityEditor.SerializedProperty property, UnityEngine.GUIContent label, System.Boolean includeChildren, UnityEngine.Rect visibleArea) (at /Users/bokken/build/output/unity/unity/Editor/Mono/ScriptAttributeGUI/PropertyHandler.cs:224)&lt;BR /&gt;UnityEditor.PropertyHandler.OnGUI (UnityEngine.Rect position, UnityEditor.SerializedProperty property, UnityEngine.GUIContent label, System.Boolean includeChildren) (at /Users/bokken/build/output/unity/unity/Editor/Mono/ScriptAttributeGUI/PropertyHandler.cs:142)&lt;BR /&gt;UnityEditor.PropertyHandler.OnGUILayout (UnityEditor.SerializedProperty property, UnityEngine.GUIContent label, System.Boolean includeChildren, UnityEngine.GUILayoutOption[] options) (at /Users/bokken/build/output/unity/unity/Editor/Mono/ScriptAttributeGUI/PropertyHandler.cs:301)&lt;BR /&gt;UnityEditor.EditorGUILayout.PropertyField (UnityEditor.SerializedProperty property, UnityEngine.GUIContent label, System.Boolean includeChildren, UnityEngine.GUILayoutOption[] options) (at /Users/bokken/build/output/unity/unity/Editor/Mono/EditorGUILayout.cs:2072)&lt;BR /&gt;UnityEditor.EditorGUILayout.PropertyField (UnityEditor.SerializedProperty property, UnityEngine.GUILayoutOption[] options) (at /Users/bokken/build/output/unity/unity/Editor/Mono/EditorGUILayout.cs:2056)&lt;BR /&gt;Esri.ArcGISMapsSDK.Editor.Components.ArcGISMapComponentEditor.OnInspectorGUI () (at ./Library/PackageCache/com.esri.arcgis-maps-sdk@c75e1c36614c/Editor/Components/ArcGISMapComponentEditor.cs:225)&lt;BR /&gt;UnityEditor.UIElements.InspectorElement+&amp;lt;&amp;gt;c__DisplayClass76_0.&amp;lt;CreateInspectorElementUsingIMGUI&amp;gt;b__0 () (at /Users/bokken/build/output/unity/unity/Editor/Mono/UIElements/Inspector/InspectorElement.cs:717)&lt;BR /&gt;UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr, Boolean&amp;amp;) (at /Users/bokken/build/output/unity/unity/Modules/IMGUI/GUIUtility.cs:203)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="csharp"&gt;using System;
using System.Collections;
using System.Collections.Generic;
using Esri.ArcGISMapsSDK.Components;
using Esri.ArcGISMapsSDK.Samples.Components;
using Esri.GameEngine.Layers;
using Esri.Unity;
using UnityEngine;

[RequireComponent(typeof(ArcGISTabletopControllerComponent))]
public class LoadMap : MonoBehaviour
{
    IEnumerator Start()
    {
        ArcGISMapComponent arcGISMap = GetComponent&amp;lt;ArcGISTabletopControllerComponent&amp;gt;().MapComponent;
        yield return new WaitUntil(() =&amp;gt; arcGISMap.Map != null);
        var mapLayers = arcGISMap.Map.Layers;
        string source = Application.persistentDataPath + "/threeDSceneLayer.slpk";
        mapLayers.Add(new ArcGIS3DObjectSceneLayer(source, "", 1, true, ""));
        arcGISMap.View.Map.Layers = mapLayers;
    }
}&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 25 Sep 2024 05:02:55 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-maps-sdk-for-unity-questions/unable-to-load-a-slpk-file-from-disk/m-p/1542315#M985</guid>
      <dc:creator>ChrisAnderson7</dc:creator>
      <dc:date>2024-09-25T05:02:55Z</dc:date>
    </item>
  </channel>
</rss>

