public static bool ValidForNewShapeVisuals(RigidBody rb) { if (rb == null) { return(false); } int numSupportedNewShapeVisual = 0; foreach (var shape in rb.Shapes) { numSupportedNewShapeVisual += System.Convert.ToInt32(ShapeVisualCreateTool.CanCreateVisual(shape)); } return(numSupportedNewShapeVisual > 0); }
public static bool ValidForNewShapeVisuals(RigidBody rb) { if (rb == null) { return(false); } var shapes = rb.GetComponentsInChildren <Shape>(); int numSupportedNewShapeVisual = 0; foreach (var shape in shapes) { numSupportedNewShapeVisual += System.Convert.ToInt32(ShapeVisualCreateTool.CanCreateVisual(shape)); } return(numSupportedNewShapeVisual > 0); }