public BlobAssetReference <CharacterStateController> BuildController(CharacterControllerBuildParams builderParams)
 {
     if (_reference != BlobAssetReference <CharacterStateController> .Null)
     {
         return(_reference);
     }
     var builder = new BlobBuilder(Allocator.Temp);
     ref CharacterStateController controller = ref builder.ConstructRoot <CharacterStateController>();
#pragma warning restore 0649

        public CharacterState BuildState(ref BlobBuilder builder,
                                         CharacterControllerBuildParams builderParams)
        {
            var state = new CharacterState {
                Animation = AnimationClipPlayable.Create(builderParams.Graph, Animation)
            };

            builder.AllocateString(ref state.Name, _name);
            builder.Construct(ref state.Frames, BuildFrames());
            builder.Construct(ref state.Hitboxes, BuildHitboxes(ref builder));

            var transitions = new List <CharacterStateTransition>();

            foreach (var transition in _transitions)
            {
                if (!transition.Enabled)
                {
                    continue;
                }
                transitions.Add(transition.ToStateTransition(ref builder, builderParams.StateMap));
            }
            builder.Construct(ref state.Transitions, transitions.ToArray());
            return(state);
        }