コード例 #1
0
        private void InitField()
        {
            Type[] allTypes = NativeDrawerUtility.GetAllBaseTypes(drawerObject.GetType());
            if (allTypes != null)
            {
                foreach (var type in allTypes)
                {
                    TypeDrawerProperty typeDrawerProperty = new TypeDrawerProperty()
                    {
                        type = type,
                    };

                    FieldInfo[] fields = type.GetFields(BindingFlags.Instance | BindingFlags.Public | BindingFlags.NonPublic | BindingFlags.DeclaredOnly);
                    foreach (var field in fields)
                    {
                        NativeDrawerProperty drawerProperty = new NativeDrawerProperty(drawerObject, field);
                        typeDrawerProperty.drawerProperties.Add(drawerProperty);
                    }

                    typeDrawerProperties.Add(typeDrawerProperty);
                }
            }
        }