private BuildTargetGroup GetBuildTargetGroup(string methodName, string platform, bool acceptDefault = true) { if (!acceptDefault && platform.Equals(VideoClipImporter.defaultTargetName, StringComparison.OrdinalIgnoreCase)) { throw new ArgumentException("Cannot call VideoClipImporter." + methodName + " for the default VideoImporterTargetSettings."); } BuildTargetGroup platformGroup = BuildPipeline.GetBuildTargetGroupByName(platform); if (!platform.Equals(VideoClipImporter.defaultTargetName, StringComparison.OrdinalIgnoreCase) && platformGroup == BuildTargetGroup.Unknown) { var platformList = "'Standalone', 'Android', 'iOS', 'Lumin', 'PS4', 'Switch', 'tvOS', 'WebGL', 'WSA', 'WebGL' or 'XboxOne'"; if (acceptDefault) { platformList = "'Default', " + platformList; } throw new ArgumentException( "Unknown platform passed to VideoClipImporter." + methodName + " (" + platform + "), please use one of " + platformList + "."); } return(platformGroup); }
public void SetTargetSettings(string platform, VideoImporterTargetSettings settings) { BuildTargetGroup buildTargetGroupByName = BuildPipeline.GetBuildTargetGroupByName(platform); if (!platform.Equals(VideoClipImporter.defaultTargetName, StringComparison.OrdinalIgnoreCase) && buildTargetGroupByName == BuildTargetGroup.Unknown) { throw new ArgumentException("Unknown platform passed to AudioImporter.GetOverrideSampleSettings (" + platform + "), please use one of 'Default', 'Web', 'Standalone', 'iOS', 'Android', 'WebGL', 'PS4', 'PSP2', 'XBox360', 'XboxOne', 'WP8', or 'WSA'"); } this.Internal_SetTargetSettings(buildTargetGroupByName, settings); }
private string GetFixedPlatformName(string platform) { var targetGroup = BuildPipeline.GetBuildTargetGroupByName(platform); if (targetGroup != BuildTargetGroup.Unknown) { return(BuildPipeline.GetBuildTargetGroupName(targetGroup)); } return(platform); }
public bool ClearSampleSettingOverride(string platform) { BuildTargetGroup buildTargetGroupByName = BuildPipeline.GetBuildTargetGroupByName(platform); if (buildTargetGroupByName == BuildTargetGroup.Unknown) { Debug.LogError("Unknown platform passed to AudioImporter.ClearSampleSettingOverride (" + platform + "), please use one of 'Web', 'Standalone', 'iOS', 'Android', 'WebGL', 'PS3', 'PS4', 'PSP2', 'PSM', 'XBox360', 'XboxOne', 'WP8', 'WSA' or 'BlackBerry'"); return(false); } return(this.Internal_ClearSampleSettingOverride(buildTargetGroupByName)); }
public AudioImporterSampleSettings GetOverrideSampleSettings(string platform) { BuildTargetGroup buildTargetGroupByName = BuildPipeline.GetBuildTargetGroupByName(platform); if (buildTargetGroupByName == BuildTargetGroup.Unknown) { Debug.LogError("Unknown platform passed to AudioImporter.GetOverrideSampleSettings (" + platform + "), please use one of 'Web', 'Standalone', 'iOS', 'Android', 'WebGL', 'PS3', 'PS4', 'PSP2', 'PSM', 'XBox360', 'XboxOne', 'WP8', or 'WSA'"); return(this.defaultSampleSettings); } return(this.Internal_GetOverrideSampleSettings(buildTargetGroupByName)); }
/// <summary> /// <para>Sets the override sample settings for the given platform.</para> /// </summary> /// <param name="platform">The platform which will have the sample settings overridden.</param> /// <param name="settings">The override settings for the given platform.</param> /// <returns> /// <para>Returns true if the settings were successfully overriden. Some setting overrides are not possible for the given platform, in which case false is returned and the settings are not registered.</para> /// </returns> public bool SetOverrideSampleSettings(string platform, AudioImporterSampleSettings settings) { BuildTargetGroup buildTargetGroupByName = BuildPipeline.GetBuildTargetGroupByName(platform); if (buildTargetGroupByName == BuildTargetGroup.Unknown) { Debug.LogError("Unknown platform passed to AudioImporter.SetOverrideSampleSettings (" + platform + "), please use one of 'Web', 'Standalone', 'iOS', 'Android', 'WebGL', 'PS4', 'PSP2', 'PSM', 'XboxOne' or 'WSA'"); return(false); } return(this.Internal_SetOverrideSampleSettings(buildTargetGroupByName, settings)); }
private static bool ValidatePlatform(string platform, string methodName, out BuildTargetGroup group) { group = BuildPipeline.GetBuildTargetGroupByName(platform); if (group != BuildTargetGroup.Unknown) { return(true); } Debug.LogErrorFormat("Unknown platform passed to {0} ({1})", methodName, platform); return(false); }
/// <summary> /// <para>Sets the override sample settings for the given platform.</para> /// </summary> /// <param name="platform">The platform which will have the sample settings overridden.</param> /// <param name="settings">The override settings for the given platform.</param> /// <returns> /// <para>Returns true if the settings were successfully overriden. Some setting overrides are not possible for the given platform, in which case false is returned and the settings are not registered.</para> /// </returns> public bool SetOverrideSampleSettings(string platform, AudioImporterSampleSettings settings) { BuildTargetGroup targetGroupByName = BuildPipeline.GetBuildTargetGroupByName(platform); if (targetGroupByName != BuildTargetGroup.Unknown) { return(this.Internal_SetOverrideSampleSettings(targetGroupByName, settings)); } Debug.LogError((object)("Unknown platform passed to AudioImporter.SetOverrideSampleSettings (" + platform + "), please use one of 'Web', 'Standalone', 'iOS', 'Android', 'WebGL', 'PS3', 'PS4', 'PSP2', 'PSM', 'XBox360', 'XboxOne', 'WP8', 'WSA' or 'BlackBerry'")); return(false); }
public AudioImporterSampleSettings GetOverrideSampleSettings(string platform) { BuildTargetGroup platformGroup = BuildPipeline.GetBuildTargetGroupByName(platform); if (platformGroup == BuildTargetGroup.Unknown) { Debug.LogError("Unknown platform passed to AudioImporter.GetOverrideSampleSettings (" + platform + "), please use one of " + "'Web', 'Standalone', 'iOS', 'Android', 'WebGL', 'PS4', 'XboxOne' or 'WSA'"); return(defaultSampleSettings); } return(Internal_GetOverrideSampleSettings(platformGroup)); }
public bool ContainsSampleSettingsOverride(string platform) { BuildTargetGroup platformGroup = BuildPipeline.GetBuildTargetGroupByName(platform); if (platformGroup == BuildTargetGroup.Unknown) { Debug.LogError("Unknown platform passed to AudioImporter.ContainsSampleSettingsOverride (" + platform + "), please use one of " + "'Web', 'Standalone', 'iOS', 'Android', 'WebGL', 'PS4', 'PSP2', 'XboxOne' or 'WSA'"); return(false); } return(Internal_ContainsSampleSettingsOverride(platformGroup)); }
public bool ContainsSampleSettingsOverride(string platform) { BuildTargetGroup buildTargetGroupByName = BuildPipeline.GetBuildTargetGroupByName(platform); bool result; if (buildTargetGroupByName == BuildTargetGroup.Unknown) { Debug.LogError("Unknown platform passed to AudioImporter.ContainsSampleSettingsOverride (" + platform + "), please use one of 'Web', 'Standalone', 'iOS', 'Android', 'WebGL', 'PS4', 'PSP2', 'PSM', 'XboxOne' or 'WSA'"); result = false; } else { result = this.Internal_ContainsSampleSettingsOverride(buildTargetGroupByName); } return(result); }
public void ClearTargetSettings(string platform) { if (platform.Equals(VideoClipImporter.defaultTargetName, StringComparison.OrdinalIgnoreCase)) { throw new ArgumentException("Cannot clear the Default VideoClipTargetSettings."); } BuildTargetGroup platformGroup = BuildPipeline.GetBuildTargetGroupByName(platform); if (platformGroup == BuildTargetGroup.Unknown) { throw new ArgumentException("Unknown platform passed to AudioImporter.GetOverrideSampleSettings (" + platform + "), please use one of " + "'Web', 'Standalone', 'iOS', 'Android', 'WebGL', 'PS4', 'PSP2', 'XBox360', 'XboxOne', 'WP8', or 'WSA'"); } Internal_ClearTargetSettings(platformGroup); }
private BuildTargetGroup GetBuildTargetGroup(string methodName, string platform, bool acceptDefault = true) { var defaultName = VideoClipImporter.defaultTargetName; if (!acceptDefault && platform.Equals(defaultName, StringComparison.OrdinalIgnoreCase)) { throw new ArgumentException("Cannot call VideoClipImporter." + methodName + " for the default VideoImporterTargetSettings."); } BuildTargetGroup platformGroup = BuildPipeline.GetBuildTargetGroupByName(platform); if (!platform.Equals(defaultName, StringComparison.OrdinalIgnoreCase) && platformGroup == BuildTargetGroup.Unknown) { throw new ArgumentException( "Unknown platform passed to VideoClipImporter." + methodName + " (" + platform + "), please use '" + defaultName + "' or one of the supported platform names."); } return(platformGroup); }
private static bool ValidatePlatform(string platformName, string methodName, out BuildTargetGroup group) { group = BuildPipeline.GetBuildTargetGroupByName(platformName); return(ValidatePlatform(group, methodName)); }