Hello! I recently created a project in which I added an integrated mesh layer through a URL for a scene and it worked just fine.
I recently started a new project and am attempting to use a local .slpk file I have but the layer is not loading into the scene for some reason? Is it possible to add a local .slpk layer to a scene/is it recommended? Or is it always better to use a URL?
I am positive I have the correct coordinates for my location, and I know it isn't a project issue as I tested with the integrated mesh layer URL I had used on my previous project and that loaded into this new project scene just fine.
The local .slpk file is either a 3DObject Scene Layer or a Building Scene layer. I can't remember which at the moment but I did test with both configurations on the UI and neither loaded in.
Please let me know if you have any follow up questions or need images sent over from my project.
Thanks!
- Nick
Solved! Go to Solution.
Can you please add the ArcGISViewStateLogging Component to your arcigs map component and send a picture of the console? Try loading it through script and try loading it how you were doing before and send the console so I can better help with debugging.
Mason
@MasonGaw So a little update. The good news is that the .slpk is loading from a local path that points to my downloads folder. So there seems to be nothing wrong with the .slpk. However, I do want this project to be extensible and shareable.
Here is my console trying to load from the persistent data path:
As you can see an error on line 22 of my script is being thrown:
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using Esri.ArcGISMapsSDK.Components;
using Esri.Unity;
public class LoadLayer : MonoBehaviour
{
[SerializeField] private ArcGISMapComponent arcGISMapComponent;
private void Awake()
{
arcGISMapComponent = GetComponent<ArcGISMapComponent>();
}
// Start is called before the first frame update
void Start()
{
var buildingLayer = new Esri.GameEngine.Layers.ArcGIS3DObjectSceneLayer(
Application.persistentDataPath + "/AlbanyBuildings.slpk",
"Albany Layer", 1.0f, true, "");
arcGISMapComponent.View.Map.Layers.Add(buildingLayer);
}
}