{
  "schemaVersion": "0.11.0",
  "canonical": "https://www.pystone.net/notes/uwa-answer-duplicate-lightmap-memory-loading/",
  "atlas": "https://www.pystone.net/?node=uwa-answer-duplicate-lightmap-memory-loading#knowledge-atlas",
  "markdown": "https://www.pystone.net/notes/uwa-answer-duplicate-lightmap-memory-loading.md",
  "context": "https://www.pystone.net/notes/uwa-answer-duplicate-lightmap-memory-loading.context.json",
  "knowledgeVersion": "224c990773de.5fa8af6e39fa",
  "build": {
    "siteCommit": "224c990773de166d23a886306577dd90379529ce",
    "notesCommit": "5fa8af6e39fa3891d1b9b4832bfa6c4e0ecaaf0a",
    "builtAt": "1970-01-01T00:00:00.000Z",
    "version": "224c990773de.5fa8af6e39fa"
  },
  "id": "note:uwa-answer-duplicate-lightmap-memory-loading",
  "slug": "uwa-answer-duplicate-lightmap-memory-loading",
  "title": "lightmap 在内存中有重复加载",
  "type": "note",
  "visibility": "public",
  "idStability": "rename-stable",
  "author": {
    "name": "石心.Yong"
  },
  "publisher": {
    "name": "Perrin Yong",
    "profile": "https://www.pystone.net/profile/"
  },
  "aliases": [],
  "summary": "lightmap 在内存中有重复加载",
  "contentRole": "source",
  "sourceType": "source",
  "sourceMetadata": {
    "author": "石心.Yong"
  },
  "isMoc": false,
  "mocRecognition": "none",
  "generated": false,
  "attribution": "external_source",
  "domain": "10-计算机、信息技术与工程",
  "tags": [],
  "mocs": [],
  "contentHash": "48aade385ba7d2d7598e38ef644d1a28ec544c614fc0237d86691353330cae4c",
  "assets": [
    {
      "reference": "assets/6050a8d3cfa35d5b53669b10/01.png",
      "url": "/media/4e6b9d86ce2788ad22c9.png",
      "mediaType": "image/png",
      "contentHash": "4e6b9d86ce2788ad22c91fd64f2b20b1c0f8298e2fc917862541be83afedb381",
      "byteLength": 65132,
      "width": 1176,
      "height": 359
    },
    {
      "reference": "assets/6050a8d3cfa35d5b53669b10/02.png",
      "url": "/media/229e40419ef48f1ea17f.png",
      "mediaType": "image/png",
      "contentHash": "229e40419ef48f1ea17f15d03b1a135d2ea97445972e6d7ad15d0c0611bf6607",
      "byteLength": 95864,
      "width": 1162,
      "height": 358
    }
  ],
  "headings": [
    {
      "depth": 1,
      "text": "lightmap 在内存中有重复加载",
      "anchor": "lightmap-在内存中有重复加载",
      "citation": "https://www.pystone.net/notes/uwa-answer-duplicate-lightmap-memory-loading/#lightmap-%E5%9C%A8%E5%86%85%E5%AD%98%E4%B8%AD%E6%9C%89%E9%87%8D%E5%A4%8D%E5%8A%A0%E8%BD%BD"
    },
    {
      "depth": 2,
      "text": "问题",
      "anchor": "问题",
      "citation": "https://www.pystone.net/notes/uwa-answer-duplicate-lightmap-memory-loading/#%E9%97%AE%E9%A2%98"
    },
    {
      "depth": 2,
      "text": "我的回答",
      "anchor": "我的回答",
      "citation": "https://www.pystone.net/notes/uwa-answer-duplicate-lightmap-memory-loading/#%E6%88%91%E7%9A%84%E5%9B%9E%E7%AD%94"
    },
    {
      "depth": 2,
      "text": "来源与关系",
      "anchor": "来源与关系",
      "citation": "https://www.pystone.net/notes/uwa-answer-duplicate-lightmap-memory-loading/#%E6%9D%A5%E6%BA%90%E4%B8%8E%E5%85%B3%E7%B3%BB"
    }
  ],
  "claims": [],
  "outgoing": [
    {
      "id": "note:my-uwa-answers",
      "title": "我的 UWA 问答",
      "url": "https://www.pystone.net/notes/my-uwa-answers/",
      "atlas": "https://www.pystone.net/?node=my-uwa-answers#knowledge-atlas",
      "label": "我的 UWA 问答",
      "origin": "explicit",
      "humanReviewed": true,
      "context": "上位集合：我的 UWA 问答",
      "citation": "https://www.pystone.net/notes/uwa-answer-duplicate-lightmap-memory-loading/#%E6%9D%A5%E6%BA%90%E4%B8%8E%E5%85%B3%E7%B3%BB"
    }
  ],
  "incoming": [
    {
      "id": "note:my-uwa-answers",
      "title": "我的 UWA 问答",
      "url": "https://www.pystone.net/notes/my-uwa-answers/",
      "atlas": "https://www.pystone.net/?node=my-uwa-answers#knowledge-atlas",
      "label": "我的 UWA 问答",
      "origin": "explicit",
      "humanReviewed": true,
      "context": "2021-03-17：lightmap 在内存中有重复加载（渲染模块、资源管理）",
      "citation": "https://www.pystone.net/notes/my-uwa-answers/#2021"
    },
    {
      "id": "note:game-graphics-and-runtime",
      "title": "游戏图形与运行时",
      "url": "https://www.pystone.net/notes/game-graphics-and-runtime/",
      "atlas": "https://www.pystone.net/?node=game-graphics-and-runtime#knowledge-atlas",
      "label": "游戏图形与运行时",
      "origin": "explicit",
      "humanReviewed": true,
      "context": "我的UWA问答中的“2021-03-17 - lightmap 在内存中有重复加载”导航项",
      "citation": "https://www.pystone.net/notes/game-graphics-and-runtime/#%E6%88%91%E7%9A%84uwa%E9%97%AE%E7%AD%94"
    }
  ],
  "contentMarkdown": "# lightmap 在内存中有重复加载\n\n> [!note] 我的 UWA 问答\n> 本文收录我在 UWA 问答发表的公开回答。问题内容归原提问者；回答保留当时语境，技术结论可能受 Unity 版本、平台和项目条件限制。\n\n## 问题\n\n![screenshot20210316204444.png](assets/6050a8d3cfa35d5b53669b10/01.png)\n\n![screenshot20210316204444.png](assets/6050a8d3cfa35d5b53669b10/02.png)\n\n为什么lightmap在profile里会显示有重复的呢，我看每一个都是40MB，有什么办法优化吗。求大佬指点一下。\n\n- 提问者：正在输入\n- 提问时间：2021-03-17 04:47:15\n\n## 我的回答\n\n看起来每张Lightmap都加载了两份。题主有没有写自己管理Lightmap的机制呢？是一次就加载两份还是在切换场景或者更换Lightmap的时候没有卸载掉？ 加载场景时有没有使用 LoadSceneMode.Additive，导致场景累加式加载，不卸载之前的资源？\n\nLightmap的引用数很高，看看是被哪些脚本索引住了，相应的组件是不是一直驻留。在该卸载的时候要把索引置空。\n\n- 回答时间：2021-03-17 20:00:35\n- 最后更新：2021-03-17 20:45:04\n- 采纳状态：未采纳\n\n## 来源与关系\n\n- 上位集合：[[10-计算机、信息技术与工程/05-游戏图形与运行时/我的UWA问答/我的UWA问答|我的 UWA 问答]]\n- UWA 标签：渲染模块、资源管理\n- 原始问题：[lightmap 在内存中有重复加载](https://answer.uwa4d.com/question/6050a8d3cfa35d5b53669b10)\n- 源页最后更新：2021-03-23 04:23:13\n"
}
