learntoflutter / flutter_embed_unity

19 stars 5 forks source link

Example does not work in release mode on Android #3

Closed learntoflutter closed 1 year ago

learntoflutter commented 1 year ago

Is there an existing issue for this?

Unity version

Common issues

Flutter version

3.13.1

Description

The example project does not work when built with --release on Android (iOS not tested yet): the logo does not spin.

It works fine when obfuscation is turned off:

buildTypes {
        release {
            ...
            minifyEnabled false
            shrinkResources false
        }
    }

So I'm guessing the problem is caused by minification

Minimum reproducible example (MRE)

Run the example project in release mode

What platforms are you seeing the problem on?

Android

If you're using Android, what Graphics APIs do you have enabled in Unity (File -> Build settings -> Player settings -> Other settings -> Graphics APIs)

No response

Devices

Samsung SM S901B

Anything else?

No response