/// <summary> /// Determines if the current containing <see cref="Transform"/> in the collision is valid. /// </summary> /// <param name="containingTransform">The <see cref="Transform"/> to check.</param> /// <returns>The validity result of the collision.</returns> protected virtual bool IsValidCollision(Transform containingTransform) { return(containingTransform != null && CollisionValidity.Accepts(containingTransform.gameObject)); }
/// <summary> /// Determines if the current collision is valid. /// </summary> /// <param name="collisionData">The collision to check.</param> /// <returns>The validity result of the collision.</returns> protected virtual bool IsValidCollision(CollisionNotifier.EventData collisionData) { Transform containingTransform = collisionData.ColliderData.GetContainingTransform(); return(containingTransform != null && CollisionValidity.Accepts(containingTransform.gameObject)); }