Error: The AnimatorAudioState is null. Select the item XXX within the inspector to serialize.

トラブルシューティング
Ultimate Character Controller - Opsive
Thank you for your purchase of the most powerful and flexible character controller on the Asset Store. While the title says Ultimate Character Controller, this ...

有名なTPS asset使って自作UsableItemクラス作ってゲーム中で入手したら発生しました。

スポンサーリンク

原因

こいつをちゃんと選択しろよって言ってます。しかし実はこれenumとかではなくこのアセット固有のserialize系であり、自作UsableItem作るとAnimatorAudioあたりのinspector表示がぶっ壊れます。

対策

public class EatableItem : UsableItem
{}
// 別ファイルで
  [CustomEditor(typeof(EatableItem))]

    public class EatableItemInspector : UsableItemInspector
    {

    }

Editor拡張で自作UsableItem用のInspectorを作ってください。こうするとSelector選べるようになって実行時エラー消えます