Android Build not completing when including shaderRetention in build
See original GitHub issueShader error in 'GLTF/PbrMetallicRoughness': '' : 'UNITY_STANDARD_SIMPLE' already defined at /Program Files/Unity/Editor/Data/CGIncludes/UnityStandardCoreForward.cginc(6) (on gles)
I am using latest version of unitygltf and also I have tested all possible solution in issues regarding to this problem in unity
Issue Analytics
- State:
- Created 6 years ago
- Comments:11 (1 by maintainers)
Top Results From Across the Web
android - Gradle build not finished
In Android Studio go to File -> Settings -> Build, Execution, Deployment -> Build Tools -> Gradle Check the 'Offline work' under 'Global ......
Read more >Bug - Can't build for Android
6 can't build for Android because there is a missing Tools folder inside Editor\Data\PlaybackEngines\AndroidPlayer\ so Unity can't find gradle.
Read more >Known issues with Android Studio and Android Gradle Plugin
To fix the issue for the current project, click Run > Edit Configurations and change the default JUnit configuration to only include the...
Read more >Troubleshoot build performance with Build Analyzer
If you haven't already done so, build your app in one of the following ways: Click Build > Make Project from the menu...
Read more >Build your app from the command line | Android Studio
Find out how you can execute all the build tasks available to your Android project using the Gradle wrapper command line tool.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
OK I just barely figured out how to fix this issue the right way. (It looks like it’s a bug in some core Unity includes.)
First, create a new file called
UnityGltfStandardCoreForward.cginc
and paste in the following code:Then, in the
PbrSpecularGlossiness.shader
andPbrMetallicRoughness.shader
files, replace allwith
Let me know if this works for you guys.
Hello Guys,
Hope so you are fine and keeping well. Attached is the log of unity android build and these two shaders are taking most of the size in the app.
“58.9 mb 8.3% Assets/UnityGLTF/Shaders/PbrSpecularGlossiness.shader 55.7 mb 7.9% Assets/UnityGLTF/Shaders/PbrMetallicRoughness.shader”
When I don’t add them in the android build the build doesn’t work so I have added them and now it has increased the size. Can please anyone help me @stevenvergenz