{
  "schemaVersion": "0.11.0",
  "canonical": "https://www.pystone.net/notes/uwa-answer-animation-state-count-performance/",
  "atlas": "https://www.pystone.net/?node=uwa-answer-animation-state-count-performance#knowledge-atlas",
  "markdown": "https://www.pystone.net/notes/uwa-answer-animation-state-count-performance.md",
  "context": "https://www.pystone.net/notes/uwa-answer-animation-state-count-performance.context.json",
  "knowledgeVersion": "224c990773de.5fa8af6e39fa",
  "build": {
    "siteCommit": "224c990773de166d23a886306577dd90379529ce",
    "notesCommit": "5fa8af6e39fa3891d1b9b4832bfa6c4e0ecaaf0a",
    "builtAt": "1970-01-01T00:00:00.000Z",
    "version": "224c990773de.5fa8af6e39fa"
  },
  "id": "note:uwa-answer-animation-state-count-performance",
  "slug": "uwa-answer-animation-state-count-performance",
  "title": "动画状态机中AnimationState的数量过多相关问题",
  "type": "note",
  "visibility": "public",
  "idStability": "rename-stable",
  "author": {
    "name": "石心.Yong"
  },
  "publisher": {
    "name": "Perrin Yong",
    "profile": "https://www.pystone.net/profile/"
  },
  "aliases": [],
  "summary": "动画状态机中AnimationState的数量过多相关问题",
  "contentRole": "source",
  "sourceType": "source",
  "sourceMetadata": {
    "author": "石心.Yong"
  },
  "isMoc": false,
  "mocRecognition": "none",
  "generated": false,
  "attribution": "external_source",
  "domain": "10-计算机、信息技术与工程",
  "tags": [],
  "mocs": [],
  "contentHash": "8bbac4be8296fb13262f7d8d650e922c13b0b4cf86bd40378f8db61ef5bb2396",
  "assets": [],
  "headings": [
    {
      "depth": 1,
      "text": "动画状态机中AnimationState的数量过多相关问题",
      "anchor": "动画状态机中animationstate的数量过多相关问题",
      "citation": "https://www.pystone.net/notes/uwa-answer-animation-state-count-performance/#%E5%8A%A8%E7%94%BB%E7%8A%B6%E6%80%81%E6%9C%BA%E4%B8%ADanimationstate%E7%9A%84%E6%95%B0%E9%87%8F%E8%BF%87%E5%A4%9A%E7%9B%B8%E5%85%B3%E9%97%AE%E9%A2%98"
    },
    {
      "depth": 2,
      "text": "问题",
      "anchor": "问题",
      "citation": "https://www.pystone.net/notes/uwa-answer-animation-state-count-performance/#%E9%97%AE%E9%A2%98"
    },
    {
      "depth": 2,
      "text": "我的回答",
      "anchor": "我的回答",
      "citation": "https://www.pystone.net/notes/uwa-answer-animation-state-count-performance/#%E6%88%91%E7%9A%84%E5%9B%9E%E7%AD%94"
    },
    {
      "depth": 2,
      "text": "来源与关系",
      "anchor": "来源与关系",
      "citation": "https://www.pystone.net/notes/uwa-answer-animation-state-count-performance/#%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-animation-state-count-performance/#%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-05-29：动画状态机中AnimationState的数量过多相关问题（动画模块、终端平台、性能优化）",
      "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-05-29 - 动画状态机中AnimationState的数量过多相关问题”导航项",
      "citation": "https://www.pystone.net/notes/game-graphics-and-runtime/#%E6%88%91%E7%9A%84uwa%E9%97%AE%E7%AD%94"
    }
  ],
  "contentMarkdown": "# 动画状态机中AnimationState的数量过多相关问题\n\n> [!note] 我的 UWA 问答\n> 本文收录我在 UWA 问答发表的公开回答。问题内容归原提问者；回答保留当时语境，技术结论可能受 Unity 版本、平台和项目条件限制。\n\n## 问题\n\n在一篇博客中我看到“UWA曾经做过相关的测试，结果表明：单个AnimatorController下挂载的AnimationState数量过大，会给CPU运算带来一定的压力，在进行开发时候，应该尽量控制AnimatioinState的数量。对此规则，我们给的默认阈值为30“，\n\n为什么单个AnimatorController下挂载的AnimationState数量过大会对CPU运算带来一定的压力？\n\n（想要知道原因用来作为判断是否要对一些挂载很多AnimationState的Controller进行优化的标准）\n\nhttps://blog.uwa4d.com/archives/UWA_Pipeline22.html\n\n- 提问者：朱\n- 提问时间：2021-05-28 19:09:09\n\n## 我的回答\n\n动画在播放时，确实存在一些步骤，会遍历AnimationStates。因此AnimationState数量过多，确实会造成某些时刻CPU耗时过高。主要还是因为Unity是闭源的，官方没有讲的话，具体的行为我们还是没法讲清楚的。\n\n- 回答时间：2021-05-29 09:29:56\n- 最后更新：2021-05-29 09:29:56\n- 采纳状态：未采纳\n\n## 来源与关系\n\n- 上位集合：[[10-计算机、信息技术与工程/05-游戏图形与运行时/我的UWA问答/我的UWA问答|我的 UWA 问答]]\n- UWA 标签：动画模块、终端平台、性能优化\n- 原始问题：[动画状态机中AnimationState的数量过多相关问题](https://answer.uwa4d.com/question/60b05ed56bb31032f979198a)\n- 源页最后更新：2021-05-29 09:29:56\n"
}
