private void AddSupportedBuildPlatformPair(ICSharpProjectExporter exporter, UnityConfigurationType configuration, IReadOnlyDictionary <BuildTarget, CompilationPlatformInfo> platforms) { // Set supported build platforms foreach (KeyValuePair <BuildTarget, CompilationPlatformInfo> platform in platforms) { exporter.SupportedBuildPlatforms.Add(new ConfigurationPlatformPair(UnityConfigurationType.InEditor, platform.Value.Name)); } }
private void EnsureSet <T>(Dictionary <UnityConfigurationType, HashSet <T> > map, UnityConfigurationType unityConfiguration) { if (!map.ContainsKey(unityConfiguration)) { map.Add(unityConfiguration, new HashSet <T>()); } }
private void ProcessConfigurationPlatformMapping(SolutionProject solutionProject, UnityConfigurationType configType, CompilationPlatformInfo platform, IReadOnlyDictionary <BuildTarget, CompilationPlatformInfo> enabledPlatforms) { ConfigurationPlatformPair configPair = new ConfigurationPlatformPair(configType, platform.Name); solutionProject.ConfigurationPlatformMapping.Add(configPair, new ProjectConfigurationPlatformMapping() { ConfigurationPlatform = configPair, EnabledForBuild = enabledPlatforms.ContainsKey(platform.BuildTarget) }); }
/// <summary> /// Creates a new instance of <see cref="ConfigurationPlatformPair"/>. /// </summary> public ConfigurationPlatformPair(UnityConfigurationType configuration, string platform) : this(configuration.ToString(), platform) { }