- Home /
unity android build out of memory
I am developing an ARPG mobile game for Android and iOS.
The main character in the game has many skills so there are many animator states in the animator controller.
Each animation clip of these animator states has several "ShowEffect" events to show the special effects. These "ShowEffect" events are assigned a prefab to the "Object" slot which can be referenced using AnimationEvent.objectReferenceParameter in the script.
I build the game and install it on my Android smartphone (Xiaomi 3, 2 GiB RAM), when the game enters the battle scene and loads the main character, the game crash because of "Out Of Memory".
It seems that unity will load all prefabs in all "ShowEffect" events. Am I right?
PS: I delete all special effect prefabs and rebuild the game, the game does not crash this time.