//Will compare the components of brokenPrefab with the ones on freshPrefab
        //Every intersecting component will be encapsulated as TransferableType and stored in a list
        private void CompareObjects()
        {
            List <Component> oldComponents = GameObjectHelper.GetComponentsInAllChildren <Component>(brokenPrefab);
            List <Component> newComponents = GameObjectHelper.GetComponentsInAllChildren <Component>(freshPrefab);

            var results = oldComponents.Distinct().Join(newComponents.Distinct(), o => o.GetType(), n => n.GetType(), (o, n) => o.GetType()).Distinct();

            componentIntersection = results.Select(r => new TransferableType()
            {
                ComponentType = r, IsActivated = r.Namespace != "UnityEngine"
            }).ToList();
            componentIntersection.ForEach(c => ObtainFields(c));
        }
        //Removes objects from the list, that do not share at lease one common component with brokenPrefab
        private void FindSimilarObjectsByComponents(List <GameObject> objectsToBeFiltered)
        {
            if (componentIntersection.Count == 0)
            {
                CompareObjects();
            }

            var currentComponents = componentIntersection.Where(c => c.IsActivated).Select(c => c.ComponentType);
            var objectsToRemove   = new List <GameObject>();

            foreach (GameObject gameObject in objectsToBeFiltered)
            {
                var sceneObjectComponents        = GameObjectHelper.GetComponentsInAllChildren <Component>(gameObject).Select(c => c.GetType()).ToList();
                var intersectingComponentsAmount = sceneObjectComponents.Join(currentComponents, a => a, b => b, (a, b) => a).Count();

                if (intersectingComponentsAmount == 0)
                {
                    objectsToRemove.Add(gameObject);
                }
            }

            objectsToBeFiltered.RemoveAll(o => objectsToRemove.Contains(o));
        }