Example #1
0
        private bool SearchMissing(GameObject targetObject)
        {
            // 既に検索済みなら検索しない.
            if (missingSearchDictionary.ContainsKey(targetObject))
            {
                return(missingSearchDictionary[targetObject]);
            }

            var gameObjects = targetObject.Children();

            var hasMissing = UnityEditorUtility.HasMissingReference(targetObject);

            foreach (var gameObject in gameObjects)
            {
                hasMissing |= SearchMissing(gameObject);
            }

            // 子階層にMissingがある場合は自身もMissingを持つ状態にする.
            missingSearchDictionary.Add(targetObject, hasMissing);

            return(hasMissing);
        }