如何在 Unity 中使用 Gradle [英] How to use Gradle in Unity
问题描述
因为我想将 Firebase 添加到我的 Android 游戏中,所以我想包含 Google Auth.但我有以下问题.我需要在 build.gradle 文件中添加一些代码,但在我的 Unity 项目中找不到它.
这是我从 Firebase 找到的手册:
Since I want to add Firebase to my Android Game I want to include Google Auth. But I have the following Problem. I need to add some Code to the build.gradle File but I cant find it in my Unity Project.
Here is the manual I found from Firebase : https://firebase.google.com/docs/auth/android/google-signin
I searched on all my Drives for build.gradle but found nothing. Can you tell me where I find it or what do I have to do to implement the Code from the Link?
To use Gradle in Unity.
1.Go to <UnityInstallationDirecory>EditorDataPlaybackEnginesAndroidPlayerToolsGradleTemplates
, then copy mainTemplate.gradle
file to your <ProjectName>AssetsPluginsAndroid
folder.
2.You can then modify mainTemplate.gradle
to be whatever you want it to be. Now, to make sure the build uses the gradle file, change the Build System to "Gradle (New)".
这篇关于如何在 Unity 中使用 Gradle的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!