// This function reports two sets of collision hulls to their respective parents (if possible) public static void ReportCollisionToParent(CollisionHull3D shapeA, CollisionHull3D shapeB) { // If yes, then inform the parents of the complex shape object (if applicable) if (shapeA.transform.parent != null) { shapeA.GetComponentInParent <ParentCollisionScript3D>().ReportCollisionToParent(); } if (shapeB.transform.parent != null) { shapeB.GetComponentInParent <ParentCollisionScript3D>().ReportCollisionToParent(); } }