Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. Dismiss Notice

Terrain Bug on Unity 5.4.2f1 and Android 6+ devices...

Discussion in 'Editor & General Support' started by JustAnotherDude, Oct 17, 2016.

  1. JustAnotherDude

    JustAnotherDude

    Joined:
    Oct 28, 2013
    Posts:
    279
    I tested with both an Samsung S7 and a Motorola G4 Plus.

    Create an empty scene, add a terrain, build and run and it works.

    Create some texture and paint the terrain, the game will no longer work.

    Error as follows :

    test crash.png



    Update: This only seems to happen when we build with Texture compression overriding for ASTC or ATC, I can't test other devices.

    Edit: Also notice this is only on terrain, any other 3D object works.
     
    Last edited: Oct 17, 2016
    MrEsquire likes this.
  2. JustAnotherDude

    JustAnotherDude

    Joined:
    Oct 28, 2013
    Posts:
    279
    After further testing, if I create a prefab with the terrain and delete it from the scene (disabling isn't enough, the game still crashes), and instantiate the terrain later via GameObject.Instantiate<GameObject>(Resources.Load<GameObject>("Terrain")); the game will NOT crash.
     
  3. MrEsquire

    MrEsquire

    Joined:
    Nov 5, 2013
    Posts:
    2,712
    Please file a bug report Unity
     
  4. Kurius

    Kurius

    Joined:
    Sep 29, 2013
    Posts:
    412
    Posting this here because this thread is the number one search result in Google for this issue...

    This is a warning to anybody making a 3D game for Android... using a Terrain object will cause some Android devices such as Galaxy Note 3 to crash, while other devices like Galaxy S3 work fine.

    If you create a new scene without a Terrain object, then the game works fine.
    Btw simply removing the Terrain object from your scene isn't enough. For some reason you need to rebuild your scene without a Terrain object. The easiest way to do this without having to start from scratch is...
    1. Remove the Terrain object from your scene
    2. Create a new GameObject and drag everything from your scene into that GameObject
    3. Drag that GameObject over to your Assets folder to create a prefab
    4. Create a new blank scene
    5. Drag your GameObject prefab into that scene
    6. Everything should work fine now
    You might then say, well I need something like a Terrain object for my game. The workaround is to create a huge Plane object as the ground floor of your game, then add some mountain assets to it, like these nice mountains...
    https://assetstore.unity.com/packages/3d/environments/landscapes/mountains-14435

    Anyway this Terrain bug in Unity looks like it will be fixed in an upcoming release...
    https://issuetracker.unity3d.com/is...n-certain-devices-using-adreno-3xx-series-gpu