Swimming reference error in new Climbing pack

Cheo

Active member
Hello, I just downloaded the new climbing add-on from the Asset Store, and instantly got that error : "The type or namespace name 'Swimming' could not be found (are you missing a using directive or an assembly reference?)"

It comes from OnAbilityActive in TraversalClimb at line 118 :

C#:
#if ULTIMATE_CHARACTER_CONTROLLER_SWIMMING
        /// <summary>
        /// The character's ability has been started or stopped.
        /// </summary>
        /// <param name="ability">The ability which was started or stopped.</param>
        /// <param name="active">True if the ability was started, false if it was stopped.</param>
        private void OnAbilityActive(Ability ability, bool active)
        {
            if (!(ability is Swimming.Swim)) {
                return;
            }

            m_HasBeenGrounded = false;
        }
#endif


The Swimming class is what is causing the issue, it is not prevented by the #if. It's easy to fix by commenting but this shouldn't happen on import anyway.
 
My copy paste failed me. Within DefineCompilerSymbols.cs it should check for the swimming pack instead of climbing:

Code:
var swimmingExists = TypeUtility.GetType("Opsive.UltimateCharacterController.AddOns.Swimming.Editor.SwimmingAddOnInspector") != null;

This requires a controller update though so for now I'll just remove that block from climbing. Thanks!
 
Top