zoukankan      html  css  js  c++  java
  • sceneManager.loadscene加载场景时不会主动去加载场景的依赖包,要手动加载或添加场景到build setting列表中

    假设有一场景1001.unity,,manifest文件如下:

    ManifestFileVersion: 0
    CRC: 425184873
    Hashes:
    AssetFileHash:
    serializedVersion: 2
    Hash: cd79999108bfb0a6a2695b1a33471bb4
    TypeTreeHash:
    serializedVersion: 2
    Hash: 31d6cfe0d16ae931b73c59d7e0c089c0
    HashAppended: 0
    ClassTypes: []
    Assets:
    - Assets/res/Scenes/1001/1001.unity
    Dependencies:
    - F:/ProjectMobile/project/Assets/../debug/android/resource/assets/res/prefabs/effects/e_char/fazhen.assetbundle
    - F:/ProjectMobile/project/Assets/../debug/android/resource/assets/res/prefabs/effects/e_scene/e_m001_shuizhengqi1.assetbundle
    - F:/ProjectMobile/project/Assets/../debug/android/resource/assets/res/prefabs/effects/e_scene/e_m001_guangshu01/e_m001_guangshu01.assetbundle
    - F:/ProjectMobile/project/Assets/../debug/android/resource/assets/res/prefabs/effects/e_scene/e_m001_taohuaban01/e_m001_taohuaban01.assetbundle
    - F:/ProjectMobile/project/Assets/../debug/android/resource/assets/res/map/jiangnan.assetbundle

    打包时,1001.unity打成了 1001.ab, 上面的依赖资源打成了 1001res.ab。

    则直接scenemanager.loadscene(1001)会提示出错:

    scene '1001' couldn't be loaded because it has not been added to the build settings or the assetbundle has not been loaded.

  • 相关阅读:
    【HYSBZ】1588 营业额统计
    【HYSBZ】1503 郁闷的出纳员
    【ZOJ】3228 Searching the String
    【ZOJ】3494 BCD Code
    【HDU】1754 I Hate It
    【HDU】3247 Resource Archiver
    【POJ】3481 Double Queue
    EdgeCore初学习
    go mod常用命令 已经 常见问题
    GO语言内存操作指导—unsafe的使用
  • 原文地址:https://www.cnblogs.com/timeObjserver/p/7126462.html
Copyright © 2011-2022 走看看