Пример #1
0
        static void CheckPaths()
        {
            var monoBehaviours = UnityApp.FindAllObjectsOfType <MonoBehaviour>();

            foreach (var behaviour in monoBehaviours)
            {
                if (behaviour == null)
                {
                    continue;
                }

                var fields = behaviour.GetType()
                             .GetFields(BINDING_FLAGS)
                             .Where((f) => f.HasCustomAttribute <PathAttribute>());

                foreach (var field in fields)
                {
                    CheckPathField(behaviour, field);
                }
            }
        }