Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

ARCore Unity - Proguard Problems

After activating Proguard on my ARCore based project, my AR camera is black, probably due to obfuscation of Arcore Session or other class related to AR package.

I searched all over the internet, and found a Thread on this subject, I tried every rules in my proguard-user but no one works for me.

Have you an idea ?

like image 503
Rocé Tarentula Avatar asked Mar 21 '26 02:03

Rocé Tarentula


1 Answers

Problem Solved.

I checked the usage.txt and noticed that AR classes were stripped out. The package com.unity3d.unitygar.AR were exclude.

Here is my working ProGuard-user.txt

  -keepclassmembers public class com.google.ar.core.Session {
  static <methods>;
  }
  -keepclassmembers class com.google.ar.core.** { *; }
  -keep class com.google.ar.** { *; }
  -keep class com.google.vr.** { *; }
  -keep class com.unity3d.unitygar.** { *; }
  -keep class com.unity3d.plugin.** { *; }
  -keep class com.google.atap.tangoservice.** { *; }
  -keep class com.google.tango.** { *; }
  -keepclassmembers class com.google.ar.core.Pose {
  private <fields>;    
  }
like image 79
Rocé Tarentula Avatar answered Mar 22 '26 16:03

Rocé Tarentula