Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Does not build for Android Platform Target #125

Closed
StephenHodgson opened this issue Feb 10, 2018 · 8 comments · Fixed by #547
Closed

Does not build for Android Platform Target #125

StephenHodgson opened this issue Feb 10, 2018 · 8 comments · Fixed by #547

Comments

@StephenHodgson
Copy link
Contributor

Unity 2017.2
Android Build target

Shader error in 'GLTF/GLTFStandard': '' : 'UNITY_STANDARD_SIMPLE' already defined at /Program Files/Unity 2017.2/Editor/Data/CGIncludes/UnityStandardCoreForward.cginc(6) (on gles)
Error building Player: Shader error in 'GLTF/GLTFStandard': '' : 'UNITY_STANDARD_SIMPLE' already defined at /Program Files/Unity 2017.2/Editor/Data/CGIncludes/UnityStandardCoreForward.cginc(6) (on gles)
@stevenvergenz
Copy link
Contributor

Make sure you're using the latest version of UnityGLTF. That shader was replaced a few weeks ago.

@keveleigh
Copy link
Contributor

keveleigh commented Feb 15, 2018

I'm seeing the same error on Android with the new shaders, tested with Unity 5.6, 2017.1, and 2017.2. Building the ShaderRentention scene definitely throws it.

Shader error in 'GLTF/PbrMetallicRoughness': '' : 'UNITY_STANDARD_SIMPLE' already defined at /Program Files/Unity/Editor/Data/CGIncludes/UnityStandardCoreForward.cginc(6) (on gles)

Compiling Vertex program with DIRECTIONAL
Platform defines: UNITY_NO_DXT5nm UNITY_NO_RGBM UNITY_ENABLE_REFLECTION_BUFFERS UNITY_FRAMEBUFFER_FETCH_AVAILABLE UNITY_NO_SCREENSPACE_SHADOWS UNITY_PBS_USE_BRDF3 UNITY_NO_FULL_STANDARD_SHADER SHADER_API_MOBILE UNITY_HARDWARE_TIER1 UNITY_COLORSPACE_GAMMA
Shader error in 'GLTF/PbrSpecularGlossiness': '' : 'UNITY_STANDARD_SIMPLE' already defined at /Program Files/Unity/Editor/Data/CGIncludes/UnityStandardCoreForward.cginc(6) (on gles)

Compiling Vertex program with DIRECTIONAL
Platform defines: UNITY_NO_DXT5nm UNITY_NO_RGBM UNITY_ENABLE_REFLECTION_BUFFERS UNITY_FRAMEBUFFER_FETCH_AVAILABLE UNITY_NO_SCREENSPACE_SHADOWS UNITY_PBS_USE_BRDF3 UNITY_NO_FULL_STANDARD_SHADER SHADER_API_MOBILE UNITY_HARDWARE_TIER1 UNITY_COLORSPACE_GAMMA

@alter-sachin
Copy link

alter-sachin commented Mar 7, 2018

Were any of you able to resolve this ? I am seeing the same issue using unity 2017 and building for android .
Help would be appreciated !!!

@smtabatabaie
Copy link

I'm also getting this error when building for android in Unity 2017.2.0 . Mostly something is defined multiple times. like
Assets/UnityGLTF/Scripts/UniformMaps/MetalRoughMap.cs(3,31): error CS0433: The imported type GLTF.Schema.AlphaMode' is defined multiple times Assets/UnityGLTF/Scripts/Cache/AnimationCacheData.cs(11,10): error CS0433: The imported type GLTF.AttributeAccessor' is defined multiple times
Assets/UnityGLTF/Scripts/Cache/TextureCacheData.cs(7,22): error CS0433: The imported type `GLTF.Schema.Texture' is defined multiple times

I'm getting 35 errors like this that something is defined multiple times.

@alt-ctrl-dev
Copy link

Facing this issue for 2018.2 as well

@taharaza16
Copy link

Facing this issue as well! Anyone found any got it working???

@alt-ctrl-dev
Copy link

@taharaza16 try this solution

@marcspraragen
Copy link

Check #540

mhochk added a commit that referenced this issue Jan 14, 2020
Updating VertexColor.cginc to properly support the path when UNITY_STANDARD_SIMPLE is true (e.g. Android builds). This fixes various conversion and re-definition errors (should resolve #125 and #540).
- Tested Android and Standalone builds on 2018.4.14f1. Confirmed errors and warnings on Android without fix and no related errors/warnings in either target after fix.
github-actions bot pushed a commit to Rhinox-Training/UnityGLTF that referenced this issue Nov 9, 2022
Updating VertexColor.cginc to properly support the path when UNITY_STANDARD_SIMPLE is true (e.g. Android builds). This fixes various conversion and re-definition errors (should resolve KhronosGroup#125 and KhronosGroup#540).
- Tested Android and Standalone builds on 2018.4.14f1. Confirmed errors and warnings on Android without fix and no related errors/warnings in either target after fix.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

8 participants