Unity 2022.3.14f 手动增加 maven 库在 baseProjectTemplate - allprojects - repositories下找不到的问题

在Unity 2021.3.21f 中 baseProjectTemplate 文件如下,需要的依赖在我手动添加的3个 maven中,打包的时候是会从这3个maven去寻找的

allprojects {
    buildscript {
        repositories {**ARTIFACTORYREPOSITORY**
            google()
            jcenter()
            mavenCentral()
        }

        dependencies {
            // If you are changing the Android Gradle Plugin version, make sure it is compatible with the Gradle version preinstalled with Unity
            // See which Gradle version is preinstalled with Unity here https://docs.unity3d.com/Manual/android-gradle-overview.html
            // See official Gradle and Android Gradle Plugin compatibility table here https://developer.android.com/studio/releases/gradle-plugin#updating-gradle
            // To specify a custom Gradle version in Unity, go do "Preferences > External Tools", uncheck "Gradle Installed with Unity (recommended)" and specify a path to a custom Gradle version
            // classpath 'com.android.tools.build:gradle:4.0.1'
            classpath "com.android.tools.build:gradle:7.2.0"
            classpath 'com.google.gms:google-services:4.3.14'
            classpath 'com.google.firebase:firebase-crashlytics-gradle:2.9.2'
            **BUILD_SCRIPT_DEPS**
        }
    }

    repositories {**ARTIFACTORYREPOSITORY**
        google()
        jcenter()
        mavenCentral()

        maven {
            url "https://android-sdk.is.com/"
        }
        maven {
            url "https://artifact.bytedance.com/repository/pangle/"
        }
        maven {
           url "https://sdk.tapjoy.com/"
        }

        flatDir {
            dirs "${project(':unityLibrary').projectDir}/libs"
        }
    }
}

task clean(type: Delete) {
    delete rootProject.buildDir
}

但是在 Unity 2022.3.14f 中,我同样将这3个 maven 添加到 baseProjectTemplate 文件中,打包的时候却找不到,但是2022.3.14f中多了自定义的 settingsTemplate 文件,如下,我将3个 maven添加到 settingsTemplate 文件下后又可以被找到了

pluginManagement {
    repositories {
        **ARTIFACTORYREPOSITORY**
        gradlePluginPortal()
        google()
        mavenCentral()
    }
}

include ':launcher', ':unityLibrary'
**INCLUDES**

dependencyResolutionManagement {
    repositoriesMode.set(RepositoriesMode.PREFER_SETTINGS)
    repositories {
        **ARTIFACTORYREPOSITORY**
        google()
        mavenCentral()

        maven {
            url "https://android-sdk.is.com/"
        }
        maven {
            url "https://artifact.bytedance.com/repository/pangle/"
        }
        maven {
           url "https://sdk.tapjoy.com/"
        }

        flatDir {
            dirs "${project(':unityLibrary').projectDir}/libs"
        }
    }
}

最后,这是为啥?有大佬懂的吗?帮我解惑一下…!!!!!!!!!!!!!!!!!!!

  • 8
    点赞
  • 10
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
Unity 2022.3引入了一些新的导航功能,以帮助开发者更方便地为游戏添加导航系统。新版本中的导航系统改进了性能和功能,使其更加强大和灵活。 首先,Unity 2022.3引入了实时路径搜索功能。该功能可以根据场景中的物体位置和碰撞体等信息,在实时场景中进行路径搜索。这意味着开发者可以在游戏运行时动态计算角色或其他游戏实体的路径。这一功能对于实时策略游戏或动态变化的游戏环境非常有用。 其次,新版本的导航系统还改进了自动化的对话框生成功能。开发者可以通过简单的设置,自动生成适应场景的对话框来实现导航指示。这个功能可以大大减轻开发者的负担,并提高游戏中导航的质量。 此外,Unity 2022.3还提供了更多的导航算法选项。不同的游戏场景可能需要不同的导航算法来平衡效率和精度。新版本中的导航系统提供了多种算法选项,让开发者能够根据具体需求选择合适的算法。 最后,Unity 2022.3导航系统的改进还包括了对2D游戏的支持。早期的导航系统主要面向3D游戏,但新版本中加入了对2D游戏的导航支持。这使得开发者能够更方便地为2D游戏创建导航系统,为玩家提供更好的游戏体验。 总的来说,Unity 2022.3版本的导航系统带来了更多强大和灵活的功能,包括实时路径搜索、自动对话框生成、多种导航算法选项以及对2D游戏的支持。这些新功能使得开发者在为游戏添加导航系统时更加便捷,为玩家提供更好的游戏体验。

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值