Пример #1
0
 static void Drawer_SectionDecalSettings(GlobalDecalSettingsUI s, SerializedGlobalDecalSettings d, Editor o)
 {
     EditorGUILayout.PropertyField(d.drawDistance, _.GetContent("Draw Distance"));
     EditorGUILayout.PropertyField(d.atlasWidth, _.GetContent("Atlas Width"));
     EditorGUILayout.PropertyField(d.atlasHeight, _.GetContent("Atlas Height"));
     EditorGUILayout.PropertyField(d.perChannelMask, _.GetContent("Enable Metal and AO properties"));
 }
 static void Drawer_SectionDecalSettings(GlobalDecalSettingsUI s, SerializedGlobalDecalSettings d, Editor o)
 {
     EditorGUILayout.LabelField(_.GetContent("Decals"), EditorStyles.boldLabel);
     ++EditorGUI.indentLevel;
     EditorGUILayout.PropertyField(d.drawDistance, _.GetContent("Draw Distance"));
     EditorGUILayout.PropertyField(d.atlasWidth, _.GetContent("Atlas Width"));
     EditorGUILayout.PropertyField(d.atlasHeight, _.GetContent("Atlas Height"));
     EditorGUILayout.PropertyField(d.perChannelMask, _.GetContent("Enable Metal and AO properties"));
     --EditorGUI.indentLevel;
 }
        static void Drawer_SectionDecalSettings(GlobalDecalSettingsUI s, SerializedGlobalDecalSettings d, Editor o)
        {
            EditorGUILayout.PropertyField(d.drawDistance, _.GetContent("Draw Distance"));
            EditorGUILayout.DelayedIntField(d.atlasWidth, _.GetContent("Atlas Width"));
            EditorGUILayout.DelayedIntField(d.atlasHeight, _.GetContent("Atlas Height"));
            EditorGUILayout.PropertyField(d.perChannelMask, _.GetContent("Enable Metal and AO properties"));

            // Clamp input values
            d.drawDistance.intValue = Mathf.Max(d.drawDistance.intValue, 0);
            d.atlasWidth.intValue   = Mathf.Max(d.atlasWidth.intValue, 0);
            d.atlasHeight.intValue  = Mathf.Max(d.atlasHeight.intValue, 0);
        }