R2API Animations

版本 v1.2.5·更新於 2026-10-12

API for modifying RuntimeAnimatorController

模組介紹 作者原文

R2API.Animations - Modifying RuntimeAnimatorController

About

R2API.Animations is a submodule assembly for R2API that allows mod creators to modify existing RuntimeAnimatorController at runtime.

You can add:

  • Parameters.
  • Layers.
  • Sub-State Machines.
  • Behaviours.
  • States (both clips and blend trees).
  • Transitions.

Since applying modifications to a controller is somewhat complicated and slow operation, the changes are cached.

The cache for a controller is rebuilt when a mod version is changed.

For development there is a config option IgnoreCache, so that you don't have to constantly change mod version or manually delete cache.

Unity

When imported into Unity, adds an option in context menu Create/R2API/Animations/AnimatorDiff. In AnimatorDiff you specify Modified Controller which should have all things that Source Controller has + your modifications.

To create Modified Controller use option Assets/R2API/Animation/Copy AnimatorController for modification in context menu on a Source Controller.

After that you add the AnimatorDiff to an AssetBundle and in code you can create an instance of AnimatorModifications with AnimatorModifications.CreateFromDiff().

Changelog

'1.2.4'

  • Reduced file name for cached files to reduce the chance of going over file path limit.

'1.2.3'

  • Fixed an issue where adding a new layer after another new layer could result in an error because of incorrect sorting.

'1.2.2'

  • Fixed an issue where modifying a layer that has behaviours would result in an error.

'1.2.1'

  • Fixed AnimatorDiff incorrectly diffing parameters in the editor.

'1.2.0'

  • Added support for behaviours.
  • Added support for child StateMachines.
  • Added support for new layers.
  • Added Copy AnimatorController for modification button to context menu in Unity.
  • ClipBundlePath is no longer required for State and ChildMotion.
  • Cache detection has been simplified. Now only changes to mod version will cause a rebuild. During development change config option IgnoreCache to true.

'1.1.1'

  • Fix NuGet package

'1.1.0'

  • Added support for BlendTrees.
  • Added AnimatorDiff that you can create inside editor and load at runtime.

'1.0.1'

  • Values for NewStates and NewTransitions dictionaries are now lists

'1.0.0'

  • Release

安裝與使用 安裝:BepInEx 外掛

  1. 本站下載的壓縮包就是模組本體,通常是 BepInEx 外掛(解壓後得到 .dll 或外掛資料夾)。
  2. 建議流程:用社群模組管理器(如 r2modman)選中本遊戲後匯入該模組,管理器會自動裝好 BepInEx 前置並處理依賴。
  3. 手動流程:先在遊戲目錄裝好 BepInEx 載入器,再把解壓出的 .dll 或外掛資料夾放進 BepInEx/plugins/。
  4. 啟動遊戲,BepInEx 控制台會列印載入日誌;確認這個模組出現在日誌裡即為安裝成功。

帶「前置依賴」的模組需要一併安裝,否則不會載入。功能開關通常在遊戲內或外掛自帶的設定檔裡調整。

前置依賴

下面這些內容需要先安裝,否則該模組不會生效:

bbepis-BepInExPackRiskofThunder-R2API_Core

檔案與校驗

檔案名稱
R2API_Animations-1.2.5.zip
檔案大小
149.2 KiB