Edit Allow Equipped Items by Script

The problem I have right now is I can't create the Swim component and assign values with out it erroring.

Cause Awake() on Swim.cs is being called right after I add the Ability

I tried to rewrite the Swim ability to accept it but keep failing to do so.

EntranceSplash becomes null and I can't figure out why.

Code:
           m_Swim = AbilityBuilder.AddAbility(m_UltimateCharacterLocomotion, typeof(Swim)) as Swim;


            m_Swim.DetectLayers = 1 << LayerMask.NameToLayer("Water");
            m_Swim.State = "Swim";
            m_Swim.BreathModifier.AttributeName = "Breath";
            m_Swim.EntranceSplash.MinVelocity = 4f;
            m_Swim.EntranceSplash.ParticlePrefab = GameSettings.entranceSplashParticlePrefab;
            m_Swim.EntranceSplash.AudioClipSet = GameSettings.entranceSplashAudioClips;
            m_Swim.UnderwaterBubbles.Location = m_Animator.GetBoneTransform(HumanBodyBones.Head);
            m_Swim.UnderwaterBubbles.ParticlePrefab = GameSettings.underwaterBubblesParticlePrefab;
            m_Swim.UnderwaterBubbles.AudioClipSet = GameSettings.underwaterBubblesAudioClips;
 
I guess im doing this so its easier to create characters in the future.
when you create a new character and select State Configuration
I did DemoStateConfiguration using profile Nolan
but it didnt give me his abilities and states? Only gave like 5 abilities?
 
EntranceSplash doesn't get initialized to anything so that's why it's null. To fix it you could assign the EntraceSplash field to the WaterEffectVelocity. I'll do the same for version 3 update.

The state configuration doesn't add any abilities, just modifies the parameters for the existing abilities (and this feature has been removed from v3 since there is now a template feature).
 
Top