Example #1
0
        public bool FindProperty(Func <XmlProperty, bool> predicate,
                                 out XmlPropertyGroup propertyGroup, out XmlProperty property)
        {
            XmlProperty propertyForSearch = null;

            propertyGroup = Xml.PropertyGroups.FirstOrDefault(g =>
            {
                propertyForSearch = g.Properties.FirstOrDefault(predicate);
                return(propertyForSearch != null);
            });
            property = propertyForSearch;

            return(property != null);
        }
        private static void SetupConfigurationGroupForUnity(
            XmlPropertyGroup group, ProjectConfigurationType type, bool forEditor, UnityVersion version)
        {
            var condition = CreateCondition(type, version);

            group.Condition = condition.ToString();

            bool isDebug = type == ProjectConfigurationType.Debug;

            if (isDebug)
            {
                group.SetProperty("DebugSymbols", "true");
            }

            group.SetProperty("DebugType", isDebug ? "full" : "pdbonly");
            group.SetProperty("Optimize", (!isDebug).ToString().ToLower());
            group.SetProperty("OutputPath", $@"bin\{condition[ConditionNames.Configuration]}");
            group.SetProperty("DefineConstants", GetDefineConstantsForUnity(isDebug, forEditor, version));
            group.SetProperty("ErrorReport", "prompt");
            group.SetProperty("WarningLevel", "4");
        }
Example #3
0
 private void InitializePropertyGroups()
 {
     DefaultPropertyGroup = FindPropertyGroup(g => g.Properties.Any(p => p.Name == "ProjectGuid"));
 }
Example #4
0
 public void RemovePropertyGroup(XmlPropertyGroup group) => Xml.RemoveChild(group);
Example #5
0
 public bool FindProperty(string name, out XmlPropertyGroup propertyGroup, out XmlProperty property)
 {
     return(FindProperty(p => p.Name == name, out propertyGroup, out property));
 }