/// <summary> /// Try to get an Impact Material from the Material Mapping using the given Physics Material instance ID. /// </summary> /// <param name="physicsMaterialInstanceId">The instance ID of the physics material (3D or 2D).</param> /// <param name="impactMaterial">The material that was found in the mapping, if one was found. Null otherwise.</param> /// <returns>True if a matching map was found, False otherwise.</returns> public static bool TryGetImpactMaterialFromMapping(int physicsMaterialInstanceId, out IImpactMaterial impactMaterial) { ImpactManager instance = GetInstance(); return(instance.TryGetImpactMaterialFromMapping(physicsMaterialInstanceId, out impactMaterial)); }
/// <summary> /// Try to get an Impact Material from the Material Mapping using the given Collider2D. /// </summary> /// <param name="collider2d">The collider that has the Physics Material 2D to get a mapping for.</param> /// <param name="impactMaterial">The material that was found in the mapping, if one was found. Null otherwise.</param> /// <returns>True if a matching map was found, False otherwise.</returns> public static bool TryGetImpactMaterialFromMapping(Collider2D collider2d, out IImpactMaterial impactMaterial) { ImpactManager instance = GetInstance(); return(instance.TryGetImpactMaterialFromMapping(collider2d, out impactMaterial)); }