- Home /
Android build fails for project with large array of data
Greetings. I recently updated unity from 2018.4.13f1 to 2019.2.17f1 as I want to publish a game to google play. The build failed because I have two large arrays of hardcoded data (2D string of over 2000 entries each) in my script. When I comment out these arrays, the build is successful. Kindly help if there is any alternative to store data in script or other forms where it needs to be readily readable by the game.
Answer by RandomCatUnity · Dec 29, 2019 at 10:46 AM
I fixed it out of frustration. I moved the large arrays into a function that was called (these variables were only used inside that function. Now the build is a success. Even though, I will be grateful if someone could share ideas on handling large premade data in Unity scripts.
Thank you!
Your answer
Follow this Question
Related Questions
Trying to build unity game for android device 1 Answer
Gradle build error 0 Answers
Android build failing 2020.3.25f1 1 Answer
Build Failure: Unable to list target platforms - Unity 2017.1.4p2 3 Answers