/// <summary>
 /// Resumes the interactable ungrabbed by the interactor.
 /// </summary>
 /// <param name="interactable">The interactable to resume.</param>
 protected virtual void ResumeInteractorUngrabbedCollision(InteractableFacade interactable)
 {
     Collider[] interactableColliders = interactable.GetComponentsInChildren <Collider>(true);
     foreach (Collider resumeCollider in interactableColliders.Intersect(RestoreColliders))
     {
         ResumeCollisionsWith(resumeCollider);
         RestoreColliders.Remove(resumeCollider);
     }
 }
 /// <summary>
 /// Ignores the interactable grabbed by the interactor.
 /// </summary>
 /// <param name="interactable">The interactable to ignore.</param>
 protected virtual void IgnoreInteractorGrabbedCollision(InteractableFacade interactable)
 {
     Collider[] interactableColliders = interactable.GetComponentsInChildren <Collider>(true);
     foreach (Collider toRestore in interactableColliders.Except(ignoredColliders))
     {
         RestoreColliders.Add(toRestore);
     }
     IgnoreCollisionsWith(interactable.gameObject);
 }
        /// <summary>
        /// Applies the given <see cref="Material"/> to all of the meshes in the given <see cref="InteractableFacade"/>.
        /// </summary>
        /// <param name="interactable">The target to change the mesh materials on.</param>
        /// <param name="materialToApply">The material to apply.</param>
        protected virtual void ApplyMaterialToAllMeshes(InteractableFacade interactable, Material materialToApply)
        {
            if (interactable == null)
            {
                return;
            }

            foreach (Renderer currentRenderer in interactable.GetComponentsInChildren <Renderer>())
            {
                if (currentRenderer == null)
                {
                    continue;
                }

                currentRenderer.material = materialToApply;
            }
        }
        /// <summary>
        /// Caches all of the materials associated with the given <see cref="InteractableFacade"/>.
        /// </summary>
        /// <param name="interactable">The source of the materials to cache.</param>
        protected virtual void CacheInteractableMaterials(InteractableFacade interactable)
        {
            if (interactable == null)
            {
                return;
            }

            cachedMaterials.Clear();
            foreach (Renderer currentRenderer in interactable.GetComponentsInChildren <Renderer>())
            {
                if (currentRenderer == null)
                {
                    continue;
                }

                cachedMaterials.Add(currentRenderer, currentRenderer.materials);
            }
        }