首页 / 浏览问题 / 组件GIS / 问题详情
Unity SDK导入之后示例场景无法正常显示
2EXP 2024年09月04日
导入SuperMap Hi-Fi 3D SDK for Unity.unitypackag之后设置player setting然后打开Scenes中的Sample_Model场景直接运行,可以显示出地球但是滚轮缩放的时候并没有加载出更精细的地形和场景出来,然后出现警告如下:

SuperMapSDK.Star must be instantiated using the ScriptableObject.CreateInstance method instead of new Star.
UnityEngine.ScriptableObject:.ctor ()
SuperMapSDK.RenderObject:.ctor () (at Assets/SuperMap/Basic/Render/RenderObject.cs:23)
SuperMapSDK.Star:.ctor (intptr) (at Assets/SuperMap/Basic/Render/Star.cs:32)
SuperMapSDK.Scene:set_ugcHandle (intptr) (at Assets/SuperMap/Basic/Core/Scene.cs:125)
SuperMapSDK.SceneControl:InitializeSence () (at Assets/SuperMap/Basic/Core/SceneControl.cs:204)
SuperMapSDK.RealspaceView:Initialize () (at Assets/SuperMap/Basic/ControlUnity/RealspaceView.cs:259)
SupermapGIS:InitializeRealspaceView () (at Assets/SuperMap/Desktop/Scripts/SupermapGIS.cs:222)
SupermapGIS:Awake () (at Assets/SuperMap/Desktop/Scripts/SupermapGIS.cs:168)

SuperMapSDK.Layer3DS3MFile must be instantiated using the ScriptableObject.CreateInstance method instead of new Layer3DS3MFile.
UnityEngine.ScriptableObject:.ctor ()
SuperMapSDK.Layer3D:.ctor (intptr&,SuperMapSDK.Layer3Ds,string,SuperMapSDK.Layer3DType) (at Assets/SuperMap/Basic/Core/Layer3D.cs:141)
SuperMapSDK.Layer3DS3MFile:.ctor (intptr&,SuperMapSDK.Layer3Ds,string,SuperMapSDK.Layer3DType) (at Assets/SuperMap/Basic/Core/Layer3DS3MFile.cs:131)
SuperMapSDK.Layer3D:CreateInstance (intptr&,SuperMapSDK.Layer3Ds,string,SuperMapSDK.Layer3DType) (at Assets/SuperMap/Basic/Core/Layer3D.cs:735)
SuperMapSDK.Layer3Ds:Add (string,SuperMapSDK.Layer3DType,string,bool) (at Assets/SuperMap/Basic/Core/Layer3Ds.cs:257)
SupermapGIS:SceneAddLayer (LayerInfo) (at Assets/SuperMap/Desktop/Scripts/SupermapGIS.cs:436)
SupermapGIS:InitializeRealspaceView () (at Assets/SuperMap/Desktop/Scripts/SupermapGIS.cs:241)
SupermapGIS:Awake () (at Assets/SuperMap/Desktop/Scripts/SupermapGIS.cs:168)

SuperMapSDK.Layer3DS3MFile must be instantiated using the ScriptableObject.CreateInstance method instead of new Layer3DS3MFile.
UnityEngine.ScriptableObject:.ctor ()
SuperMapSDK.Layer3D:.ctor (intptr&,SuperMapSDK.Layer3Ds,string,SuperMapSDK.Layer3DType) (at Assets/SuperMap/Basic/Core/Layer3D.cs:141)
SuperMapSDK.Layer3DS3MFile:.ctor (intptr&,SuperMapSDK.Layer3Ds,string,SuperMapSDK.Layer3DType) (at Assets/SuperMap/Basic/Core/Layer3DS3MFile.cs:131)
SuperMapSDK.Layer3D:CreateInstance (intptr&,SuperMapSDK.Layer3Ds,string,SuperMapSDK.Layer3DType) (at Assets/SuperMap/Basic/Core/Layer3D.cs:735)
SuperMapSDK.Layer3Ds:Add (string,SuperMapSDK.Layer3DType,string,bool) (at Assets/SuperMap/Basic/Core/Layer3Ds.cs:257)
SupermapGIS:SceneAddLayer (LayerInfo) (at Assets/SuperMap/Desktop/Scripts/SupermapGIS.cs:436)
SupermapGIS:InitializeRealspaceView () (at Assets/SuperMap/Desktop/Scripts/SupermapGIS.cs:241)
SupermapGIS:Awake () (at Assets/SuperMap/Desktop/Scripts/SupermapGIS.cs:168)

SuperMapSDK.Layer3DS3MFile must be instantiated using the ScriptableObject.CreateInstance method instead of new Layer3DS3MFile.
UnityEngine.ScriptableObject:.ctor ()
SuperMapSDK.Layer3D:.ctor (intptr&,SuperMapSDK.Layer3Ds,string,SuperMapSDK.Layer3DType) (at Assets/SuperMap/Basic/Core/Layer3D.cs:141)
SuperMapSDK.Layer3DS3MFile:.ctor (intptr&,SuperMapSDK.Layer3Ds,string,SuperMapSDK.Layer3DType) (at Assets/SuperMap/Basic/Core/Layer3DS3MFile.cs:131)
SuperMapSDK.Layer3D:CreateInstance (intptr&,SuperMapSDK.Layer3Ds,string,SuperMapSDK.Layer3DType) (at Assets/SuperMap/Basic/Core/Layer3D.cs:735)
SuperMapSDK.Layer3Ds:Add (string,SuperMapSDK.Layer3DType,string,bool) (at Assets/SuperMap/Basic/Core/Layer3Ds.cs:257)
SupermapGIS:SceneAddLayer (LayerInfo) (at Assets/SuperMap/Desktop/Scripts/SupermapGIS.cs:436)
SupermapGIS:InitializeRealspaceView () (at Assets/SuperMap/Desktop/Scripts/SupermapGIS.cs:241)
SupermapGIS:Awake () (at Assets/SuperMap/Desktop/Scripts/SupermapGIS.cs:168)

SuperMapSDK.Layer3DS3MFile must be instantiated using the ScriptableObject.CreateInstance method instead of new Layer3DS3MFile.
UnityEngine.ScriptableObject:.ctor ()
SuperMapSDK.Layer3D:.ctor (intptr&,SuperMapSDK.Layer3Ds,string,SuperMapSDK.Layer3DType) (at Assets/SuperMap/Basic/Core/Layer3D.cs:141)
SuperMapSDK.Layer3DS3MFile:.ctor (intptr&,SuperMapSDK.Layer3Ds,string,SuperMapSDK.Layer3DType) (at Assets/SuperMap/Basic/Core/Layer3DS3MFile.cs:131)
SuperMapSDK.Layer3D:CreateInstance (intptr&,SuperMapSDK.Layer3Ds,string,SuperMapSDK.Layer3DType) (at Assets/SuperMap/Basic/Core/Layer3D.cs:735)
SuperMapSDK.Layer3Ds:Add (string,SuperMapSDK.Layer3DType,string,bool) (at Assets/SuperMap/Basic/Core/Layer3Ds.cs:257)
SupermapGIS:SceneAddLayer (LayerInfo) (at Assets/SuperMap/Desktop/Scripts/SupermapGIS.cs:436)
SupermapGIS:InitializeRealspaceView () (at Assets/SuperMap/Desktop/Scripts/SupermapGIS.cs:241)
SupermapGIS:Awake () (at Assets/SuperMap/Desktop/Scripts/SupermapGIS.cs:168)

SuperMapSDK.Layer3DS3MFile must be instantiated using the ScriptableObject.CreateInstance method instead of new Layer3DS3MFile.
UnityEngine.ScriptableObject:.ctor ()
SuperMapSDK.Layer3D:.ctor (intptr&,SuperMapSDK.Layer3Ds,string,SuperMapSDK.Layer3DType) (at Assets/SuperMap/Basic/Core/Layer3D.cs:141)
SuperMapSDK.Layer3DS3MFile:.ctor (intptr&,SuperMapSDK.Layer3Ds,string,SuperMapSDK.Layer3DType) (at Assets/SuperMap/Basic/Core/Layer3DS3MFile.cs:131)
SuperMapSDK.Layer3D:CreateInstance (intptr&,SuperMapSDK.Layer3Ds,string,SuperMapSDK.Layer3DType) (at Assets/SuperMap/Basic/Core/Layer3D.cs:735)
SuperMapSDK.Layer3Ds:Add (string,SuperMapSDK.Layer3DType,string,bool) (at Assets/SuperMap/Basic/Core/Layer3Ds.cs:257)
SupermapGIS:SceneAddLayer (LayerInfo) (at Assets/SuperMap/Desktop/Scripts/SupermapGIS.cs:436)
SupermapGIS:InitializeRealspaceView () (at Assets/SuperMap/Desktop/Scripts/SupermapGIS.cs:241)
SupermapGIS:Awake () (at Assets/SuperMap/Desktop/Scripts/SupermapGIS.cs:168)

SuperMapSDK.TrackingLayer must be instantiated using the ScriptableObject.CreateInstance method instead of new TrackingLayer.
UnityEngine.ScriptableObject:.ctor ()
SuperMapSDK.Layer3D:.ctor () (at Assets/SuperMap/Basic/Core/Layer3D.cs:85)
SuperMapSDK.TrackingLayer:.ctor (SuperMapSDK.Layer3Ds) (at Assets/SuperMap/Basic/Core/TrackingLayer.cs:18)
SuperMapSDK.Scene:Render () (at Assets/SuperMap/Basic/Core/Scene.cs:1893)
SuperMapSDK.RealspaceView:Render () (at Assets/SuperMap/Basic/ControlUnity/RealspaceView.cs:295)
SupermapGIS:PlayingUpdate () (at Assets/SuperMap/Desktop/Scripts/SupermapGIS.cs:331)
SupermapGIS:Update () (at Assets/SuperMap/Desktop/Scripts/SupermapGIS.cs:285)

1个回答

您好,这些是黄色感叹号警告,不是报错提示,可以不予理会。

该场景中的数据并不是全球范围的,需要定位到数据范围才能看到,您可以通过运行界面左上角,展开图层,然后通过右边的功能进行飞行定位

927EXP 2024年09月04日
...