private static void AddState(StyleSheetBuilderHelper helper, string stateRuleSelector, GUIStyleState state, string stateId, GUIStyleState defaultStyle) { // All common Style property helper.BeginRule("GUIStyle." + stateId); using (helper.builder.BeginComplexSelector(0)) { // Construct rule according to the GUIStyle -> is it custom? is it bound on a type? helper.builder.AddSimpleSelector(ConverterUtils.GetStateRuleSelectorParts(stateRuleSelector, stateId), StyleSelectorRelationship.None); } AddState(helper, state, defaultStyle); helper.EndRule(); }