はなちるのマイノート

Unityをメインとした技術ブログ。自分らしくまったりやっていきたいと思いますー!

【Unity】Easy Save3にAssembly Definitionを定義する

はじめに

Unityのセーブアセットとして、Easy Saveがとても有名です。

すごく使い勝手が良く暗号化もしてくれる便利アセットですが、唯一の不満点があります。

それはAssembly Definitionが定義されていないということです。

大した労力もかからないとは思いますが、全然対応してくれません。(一応v3.5.4になったら対応するよと言ってくれている?のですが、更新されていない模様)

Easy Save uses Assembly Definitions from v3.5.4 onwards. If you want to access Easy Save 3 from an assembly, add the EasySave3 asmdef to the Assembly Definition References list of your assembly’s asmdef.

https://docs.moodkie.com/easy-save-3/getting-started/

まああーだこーだ言っていてもしょうがないので、Assembly Definitionの定義の仕方を紹介します。

追記(2023/2/6)

2023/2/5v3.4.4が出て、Assemby Definition Filesに対応したとのことです。

3.5.4

  • You can now enable Assembly Definition Files for Easy Save by going to Tools > Easy Save 3 > Enable Assembly Definition Files.

// DeepL翻訳
3.5.4

  • Tools > Easy Save 3 > Enable Assembly Definition Filesで、Easy Save のアセンブリ定義ファイルを有効にすることができるようになりました。

情報を教えてくださったsu10さんありがとうございます!

環境

Unity 2021.3.0f1
Easy Save3 v3.5.3

やり方

Assets/Plugins/Easy Save 3フォルダの中の以下の3つのフォルダに対して操作をします。

  • Editor
  • PlayMaker
  • Scripts

それぞれ以下のAssembly Definition Fileを配置します。

  • Editor : ES3.Editor
  • PlayMaker : ES3.PlayMaker
  • Scripts : ES3.Runtime
作成したAssembly Definition Files

次にAssets/Plugins/Easy Save 3/Resources/ES3/ES3DefaultsAssembly Namesに先程定義したAssemblyの名前が記載されているか確認してください。(どうやら自動で追加されるよう)

Assembly Namesを確認する

またそれぞれのAssembly Definition Fileに対して、以下の設定をしてください。

ES3.Editor
  • PlatformsEditorのみに
  • Assembly Definition ReferencesES3.Runtimeを追加
ES3.PlayMaker

特になし(PlayMakerを導入した際には、PlayMakerへの依存を設定してあげてください)

ES3.Runtime
  • Assembly Definition ReferencesUnity.VisualScripting.Coreを追加