浏览问题
等待回复
精选文章
申请试用
资源中心
漏洞修复
注册
|
登录
SuperMap技术问答社区
我要
提问
智能客服
首页
/
浏览问题
/
组件GIS
/
问题详情
导入unity包之后 使用SuperMap.unity打包报错
sunmingy...
16EXP
2022年02月16日
unity版本2021.2.9f1c1
unity
请
登录
或者
注册
后回答这个问题。
1个回答
您好,打包有多种方式,请确定下您是用的哪种方式报错的?打包exe、webgl或者其他方式?
在打包之前,请问您直接运行您的场景是否正常呢?
如果运行您的场景就报错,此时请截图说明下详细报错信息,我这边先让您的场景能够正常运行起来。然后再去打包。或者使用示范场景去打包看是否会报错。
如果运行您的场景不报错,此时就需要检查您在打包过程中的参数设置是否是按照我们的帮助文档中的配置去配置的。帮助文档中介绍了打包成exe和webgl的,如果是打包成其他方式,目前还不支持。
宋翔
897EXP
2022年02月16日
打包的exe按照资源包中的受用手册pdf文档 直接打开的SuperMap.unity, 并且添加天地图和官方鸟巢三维场景,game面包里能出现地球约上面图层控制工具,不报错,但是也不能操作,打包前也配置了shader,删除报错的Custom/ModelInstance shader后能打包成功,但是程序运行之后 场景无法操作,工具能正常添加图层,添加的图层无法显示与操作
1.
Shader error in 'Custom/ModelInstance': 'ComputeScreenPos': no matching 1 parameter function at line 67 (on d3d11)
Compiling Vertex program with DIRECTIONAL SHADOWS_SCREEN VERTEXLIGHT_ON
Platform defines: SHADER_API_DESKTOP UNITY_COLORSPACE_GAMMA UNITY_ENABLE_DETAIL_NORMALMAP UNITY_ENABLE_REFLECTION_BUFFERS UNITY_LIGHTMAP_FULL_HDR UNITY_LIGHT_PROBE_PROXY_VOLUME UNITY_PBS_USE_BRDF1 UNITY_SPECCUBE_BLENDING UNITY_SPECCUBE_BOX_PROJECTION UNITY_USE_DITHER_MASK_FOR_ALPHABLENDED_SHADOWS
Disabled keywords: DIRLIGHTMAP_COMBINED DYNAMICLIGHTMAP_ON INSTANCING_ON LIGHTMAP_ON LIGHTMAP_SHADOW_MIXING LIGHTPROBE_SH SHADER_API_GLES30 SHADOWS_SHADOWMASK UNITY_ASTC_NORMALMAP_ENCODING UNITY_ENABLE_NATIVE_SHADOW_LOOKUPS UNITY_FRAMEBUFFER_FETCH_AVAILABLE UNITY_HALF_PRECISION_FRAGMENT_SHADER_REGISTERS UNITY_HARDWARE_TIER1 UNITY_HARDWARE_TIER2 UNITY_HARDWARE_TIER3 UNITY_LIGHTMAP_DLDR_ENCODING UNITY_LIGHTMAP_RGBM_ENCODING UNITY_METAL_SHADOWS_USE_POINT_FILTERING UNITY_NO_DXT5nm UNITY_NO_FULL_STANDARD_SHADER UNITY_NO_SCREENSPACE_SHADOWS UNITY_PBS_USE_BRDF2 UNITY_PBS_USE_BRDF3 UNITY_PRETRANSFORM_TO_DISPLAY_ORIENTATION UNITY_UNIFIED_SHADER_PRECISION_MODEL UNITY_VIRTUAL_TEXTURING
2.
Shader error in 'Custom/ModelInstance': invalid subscript 'pos' at line 67 (on d3d11)
Compiling Vertex program with DIRECTIONAL SHADOWS_SCREEN VERTEXLIGHT_ON
Platform defines: SHADER_API_DESKTOP UNITY_COLORSPACE_GAMMA UNITY_ENABLE_DETAIL_NORMALMAP UNITY_ENABLE_REFLECTION_BUFFERS UNITY_LIGHTMAP_FULL_HDR UNITY_LIGHT_PROBE_PROXY_VOLUME UNITY_PBS_USE_BRDF1 UNITY_SPECCUBE_BLENDING UNITY_SPECCUBE_BOX_PROJECTION UNITY_USE_DITHER_MASK_FOR_ALPHABLENDED_SHADOWS
Disabled keywords: DIRLIGHTMAP_COMBINED DYNAMICLIGHTMAP_ON INSTANCING_ON LIGHTMAP_ON LIGHTMAP_SHADOW_MIXING LIGHTPROBE_SH SHADER_API_GLES30 SHADOWS_SHADOWMASK UNITY_ASTC_NORMALMAP_ENCODING UNITY_ENABLE_NATIVE_SHADOW_LOOKUPS UNITY_FRAMEBUFFER_FETCH_AVAILABLE UNITY_HALF_PRECISION_FRAGMENT_SHADER_REGISTERS UNITY_HARDWARE_TIER1 UNITY_HARDWARE_TIER2 UNITY_HARDWARE_TIER3 UNITY_LIGHTMAP_DLDR_ENCODING UNITY_LIGHTMAP_RGBM_ENCODING UNITY_METAL_SHADOWS_USE_POINT_FILTERING UNITY_NO_DXT5nm UNITY_NO_FULL_STANDARD_SHADER UNITY_NO_SCREENSPACE_SHADOWS UNITY_PBS_USE_BRDF2 UNITY_PBS_USE_BRDF3 UNITY_PRETRANSFORM_TO_DISPLAY_ORIENTATION UNITY_UNIFIED_SHADER_PRECISION_MODEL UNITY_VIRTUAL_TEXTURING
3.
Shader warning in 'Custom/ModelCache': integer divides may be much slower, try using uints if possible. at line 85 (on d3d11)
Compiling Vertex program with DIRECTIONAL LIGHTPROBE_SH
Platform defines: SHADER_API_DESKTOP UNITY_COLORSPACE_GAMMA UNITY_ENABLE_DETAIL_NORMALMAP UNITY_ENABLE_REFLECTION_BUFFERS UNITY_LIGHTMAP_FULL_HDR UNITY_LIGHT_PROBE_PROXY_VOLUME UNITY_PASS_FORWARDBASE UNITY_PBS_USE_BRDF1 UNITY_SPECCUBE_BLENDING UNITY_SPECCUBE_BOX_PROJECTION UNITY_USE_DITHER_MASK_FOR_ALPHABLENDED_SHADOWS
Disabled keywords: DIRLIGHTMAP_COMBINED DYNAMICLIGHTMAP_ON LIGHTMAP_ON LIGHTMAP_SHADOW_MIXING SHADER_API_GLES30 SHADOWS_SCREEN SHADOWS_SHADOWMASK UNITY_ASTC_NORMALMAP_ENCODING UNITY_ENABLE_NATIVE_SHADOW_LOOKUPS UNITY_FRAMEBUFFER_FETCH_AVAILABLE UNITY_HALF_PRECISION_FRAGMENT_SHADER_REGISTERS UNITY_HARDWARE_TIER1 UNITY_HARDWARE_TIER2 UNITY_HARDWARE_TIER3 UNITY_LIGHTMAP_DLDR_ENCODING UNITY_LIGHTMAP_RGBM_ENCODING UNITY_METAL_SHADOWS_USE_POINT_FILTERING UNITY_NO_DXT5nm UNITY_NO_FULL_STANDARD_SHADER UNITY_NO_SCREENSPACE_SHADOWS UNITY_PBS_USE_BRDF2 UNITY_PBS_USE_BRDF3 UNITY_PRETRANSFORM_TO_DISPLAY_ORIENTATION UNITY_UNIFIED_SHADER_PRECISION_MODEL UNITY_VIRTUAL_TEXTURING VERTEXLIGHT_ON
4.
Shader warning in 'Custom/ModelCache': integer divides may be much slower, try using uints if possible. at line 85 (on d3d11)
Compiling Vertex program with DIRECTIONAL LIGHTPROBE_SH
Platform defines: SHADER_API_DESKTOP UNITY_COLORSPACE_GAMMA UNITY_ENABLE_DETAIL_NORMALMAP UNITY_ENABLE_REFLECTION_BUFFERS UNITY_LIGHTMAP_FULL_HDR UNITY_LIGHT_PROBE_PROXY_VOLUME UNITY_PASS_FORWARDBASE UNITY_PBS_USE_BRDF1 UNITY_SPECCUBE_BLENDING UNITY_SPECCUBE_BOX_PROJECTION UNITY_USE_DITHER_MASK_FOR_ALPHABLENDED_SHADOWS
Disabled keywords: DIRLIGHTMAP_COMBINED DYNAMICLIGHTMAP_ON LIGHTMAP_ON LIGHTMAP_SHADOW_MIXING SHADER_API_GLES30 SHADOWS_SCREEN SHADOWS_SHADOWMASK UNITY_ASTC_NORMALMAP_ENCODING UNITY_ENABLE_NATIVE_SHADOW_LOOKUPS UNITY_FRAMEBUFFER_FETCH_AVAILABLE UNITY_HALF_PRECISION_FRAGMENT_SHADER_REGISTERS UNITY_HARDWARE_TIER1 UNITY_HARDWARE_TIER2 UNITY_HARDWARE_TIER3 UNITY_LIGHTMAP_DLDR_ENCODING UNITY_LIGHTMAP_RGBM_ENCODING UNITY_METAL_SHADOWS_USE_POINT_FILTERING UNITY_NO_DXT5nm UNITY_NO_FULL_STANDARD_SHADER UNITY_NO_SCREENSPACE_SHADOWS UNITY_PBS_USE_BRDF2 UNITY_PBS_USE_BRDF3 UNITY_PRETRANSFORM_TO_DISPLAY_ORIENTATION UNITY_UNIFIED_SHADER_PRECISION_MODEL UNITY_VIRTUAL_TEXTURING VERTEXLIGHT_ON
5.
Build completed with a result of 'Failed' in 18 seconds (18092 ms)
UnityEngine.GUIUtility:ProcessEvent (int,intptr,bool&)
6.
UnityEditor.BuildPlayerWindow+BuildMethodException: 3 errors
at UnityEditor.BuildPlayerWindow+DefaultBuildMethods.BuildPlayer (UnityEditor.BuildPlayerOptions options) [0x002d8] in <62ae3f730aa64a47a81744a7c25c6679>:0
at UnityEditor.BuildPlayerWindow.CallBuildMethods (System.Boolean askForBuildLocation, UnityEditor.BuildOptions defaultBuildOptions) [0x00080] in <62ae3f730aa64a47a81744a7c25c6679>:0
UnityEngine.GUIUtility:ProcessEvent (int,intptr,bool&)
我这里用unity插件10.2.1 unity版本2021.2.4f1c1,然后用的示范的scenes中的sample_bim场景,然后打包成exe能够正常运行。您说的supermap.unity 这个是你自己新建的场景还是什么呢?
您那边尝试下用scenes中的sample_bim 这个场景打包能否成功呢?如果能够成功,并且正常运行,那说明是您的场景配置出现了问题,请按照帮助文档中的4.1 说明重新配置下您的场景
请
登录
或者
注册
后再添加评论。
智能推荐
相关问题
相关文章
推荐教程
Unity 导入资源包 运行场景报错
Unity 导入资源包 运行场景报错
UNITY 插件打包时报错
unity打包后出错,不能显示模型
使用unity插件,可以打包成webGL吗
Unity 2020.3.30f1c1 的内置管线工程, 打包后运行未显示图像
插件导入到unity中报错
插件导入Unity运行场景报错
热门文章
查看更多>
关注我们
超图软件官网
SuperMap Online
地图慧
帮助中心
备案信息
技术资源中心
...