本文整理汇总了C#中BuildTargetGroup类的典型用法代码示例。如果您正苦于以下问题:C# BuildTargetGroup类的具体用法?C# BuildTargetGroup怎么用?C# BuildTargetGroup使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
BuildTargetGroup类属于命名空间,在下文中一共展示了BuildTargetGroup类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C#代码示例。
示例1: OnGUI
// Use this for initialization
void OnGUI()
{
bool guiDisable = EditorApplication.isCompiling || EditorApplication.isPlayingOrWillChangePlaymode;
EditorGUI.BeginDisabledGroup( guiDisable );
EditorGUI.BeginChangeCheck();
targetGroup = (BuildTargetGroup)EditorGUILayout.EnumPopup( "target", targetGroup );
romMode = (RomMode)EditorGUILayout.EnumPopup( "romMode", romMode );
classDebugMode = (ClassDebugMode)EditorGUILayout.EnumPopup( "classDebugMode", classDebugMode );
if( EditorGUI.EndChangeCheck() )
{
var tmpSymbols = CreateSymbols();
PlayerSettings.SetScriptingDefineSymbolsForGroup( targetGroup, tmpSymbols );
}
var symbols = PlayerSettings.GetScriptingDefineSymbolsForGroup( targetGroup );
GUI.enabled = true;
var newSymbols = EditorGUILayout.TextArea( symbols, GUILayout.ExpandHeight( true ) );
GUI.enabled = !guiDisable;
if( symbols != newSymbols )
{
PlayerSettings.SetScriptingDefineSymbolsForGroup( targetGroup, newSymbols );
}
var scenes = EditorBuildSettings.scenes;
foreach( var scene in scenes )
{
GUILayout.Label( scene.path + " " + scene.enabled );
}
EditorGUI.EndDisabledGroup();
}
开发者ID:KurataKazuaki,项目名称:KemoShooting,代码行数:34,代码来源:BuildWizard.cs
示例2: EvaluateCustomArgs
static void EvaluateCustomArgs(BuildTarget buildTarget, BuildTargetGroup buildTargetGroup)
{
/*Dictionary<string,string> customArgsDict = CommandLineReader.GetCustomArguments();
foreach (KeyValuePair<string, string> entry in customArgsDict)
{
Debug.Log("AutoBuilder.cs - EvaluateCustomArgs() - Key = [" + entry.Key + "] / Value = [" + entry.Value + "]");
}
//Version
if (customArgsDict.ContainsKey("Version"))
{
PlayerSettings.bundleVersion = customArgsDict["Version"];
}
else
{
Debug.LogWarning("AutoBuilder.cs - EvaluateCustomArgs() - No version number has been provided.");
}
//Password
if (customArgsDict.ContainsKey("Password"))
{
SetPassword(customArgsDict["Password"]);
}
else
{
Debug.LogWarning("AutoBuilder.cs - EvaluateCustomArgs() - No password value has been provided.");
}*/
}
开发者ID:GordieRoss,项目名称:BrickizensDemo,代码行数:29,代码来源:AutoBuilder.cs
示例3: UndefineSymbol
public static void UndefineSymbol(string symbol, BuildTargetGroup target)
{
var defines = PlayerSettings.GetScriptingDefineSymbolsForGroup(target);
defines = defines.Replace(symbol + ";", "");
defines = defines.Replace(";" + symbol, "");
defines = defines.Replace(symbol, "");
PlayerSettings.SetScriptingDefineSymbolsForGroup(target, defines);
}
开发者ID:Elendow,项目名称:GGJ2016,代码行数:8,代码来源:Light2DMenu.cs
示例4: BuildPlatform
public BuildPlatform(string locTitle, string tooltip, BuildTargetGroup targetGroup, bool forceShowTarget)
{
this.targetGroup = targetGroup;
this.name = ((targetGroup == BuildTargetGroup.Unknown) ? string.Empty : BuildPipeline.GetBuildTargetGroupName(this.DefaultTarget));
this.title = EditorGUIUtility.TextContent(locTitle);
this.smallIcon = (EditorGUIUtility.IconContent(locTitle + ".Small").image as Texture2D);
this.tooltip = tooltip;
this.forceShowTarget = forceShowTarget;
}
开发者ID:guozanhua,项目名称:UnityDecompiled,代码行数:9,代码来源:BuildPlayerWindow.cs
示例5: IsValidBuildTargetGroup
private static bool IsValidBuildTargetGroup(BuildTargetGroup group)
{
if (group == BuildTargetGroup.Unknown) return false;
#if UNITY_5_3_0 // Unity 5.3.0 had tvOS in enum but throws error if used
if ((int)(object)group == 25) return false;
#endif
return true;
}
开发者ID:SpacesAdventure,项目名称:Kio-2,代码行数:10,代码来源:PlayMakerDefines.cs
示例6: GetShaderSettingsForPlatform
public static PlatformShaderSettings GetShaderSettingsForPlatform(BuildTargetGroup target, ShaderHardwareTier tier)
{
TierSettings tierSettings = GetTierSettings(target, (GraphicsTier) tier);
return new PlatformShaderSettings {
cascadedShadowMaps = tierSettings.cascadedShadowMaps,
standardShaderQuality = tierSettings.standardShaderQuality,
reflectionProbeBoxProjection = tierSettings.reflectionProbeBoxProjection,
reflectionProbeBlending = tierSettings.reflectionProbeBlending
};
}
开发者ID:CarlosHBC,项目名称:UnityDecompiled,代码行数:10,代码来源:EditorGraphicsSettings.cs
示例7: DefineSymbol
public static void DefineSymbol(string symbol, BuildTargetGroup target)
{
UndefineSymbol(symbol, target);
var defines = PlayerSettings.GetScriptingDefineSymbolsForGroup(target);
if (!defines.EndsWith(";"))
defines += ";";
defines += symbol;
PlayerSettings.SetScriptingDefineSymbolsForGroup(target, defines);
}
开发者ID:Elendow,项目名称:GGJ2016,代码行数:10,代码来源:Light2DMenu.cs
示例8: PlayerSettingsSetup
static PlayerSettingsSetup() {
BuildTargetGroup[] platformTargets = new BuildTargetGroup[1] { BuildTargetGroup.Standalone };
IList<string> definesToInclude = new List<string>() { "DEBUG_ERROR", "DEBUG_WARN" };
if (EditorWindow.GetWindow<DebugSettingsWindow>()._isDebugLogEnabled) {
definesToInclude.Add("DEBUG_LOG");
}
//if (DebugSettings.Instance.EnableVerboseDebug) {
// definesToInclude.Add("DEBUG_LOG");
//}
UnityEditorUtility.ResetConditionalCompilation(platformTargets, definesToInclude.ToArray<string>());
}
开发者ID:Maxii,项目名称:CodeEnv.Master,代码行数:11,代码来源:PlayerSettingsSetup.cs
示例9: ShowArchitectureButton
public static void ShowArchitectureButton(BuildTargetGroup target)
{
bool flag;
if (target == BuildTargetGroup.tvOS)
{
flag = PlayerSettings.tvOS.sdkVersion == tvOSSdkVersion.Simulator;
}
else
{
flag = PlayerSettings.iOS.sdkVersion == iOSSdkVersion.SimulatorSDK;
}
int scriptingBackend = (int) PlayerSettings.GetScriptingBackend(target);
if (!flag)
{
int num3;
int architecture = PlayerSettings.GetArchitecture(target);
if (scriptingBackend == 1)
{
if (target == BuildTargetGroup.tvOS)
{
num3 = 1;
PlayerSettingsEditor.BuildDisabledEnumPopup(new GUIContent("ARM64"), EditorGUIUtility.TextContent("Architecture"));
}
else
{
num3 = PlayerSettingsEditor.BuildEnumPopup<Architecture>(EditorGUIUtility.TextContent("Architecture"), architecture, kArchitectureOrder, kArchitectureDescriptions);
}
}
else
{
num3 = 0;
PlayerSettingsEditor.BuildDisabledEnumPopup(new GUIContent("ARMv7"), EditorGUIUtility.TextContent("Architecture"));
}
if (num3 != architecture)
{
PlayerSettings.SetArchitecture(target, num3);
}
}
else if (scriptingBackend == 1)
{
PlayerSettingsEditor.BuildDisabledEnumPopup(EditorGUIUtility.TextContent("x86_64"), EditorGUIUtility.TextContent("Architecture"));
}
else
{
PlayerSettingsEditor.BuildDisabledEnumPopup(EditorGUIUtility.TextContent("i386"), EditorGUIUtility.TextContent("Architecture"));
}
}
开发者ID:CarlosHBC,项目名称:UnityDecompiled,代码行数:47,代码来源:SettingsUI.cs
示例10: IsValidBuildTargetGroup
private static bool IsValidBuildTargetGroup(BuildTargetGroup group)
{
if (group == BuildTargetGroup.Unknown || IsObsolete(group)) return false;
// Checking Obsolete attribute should be enough,
// but sometimes Unity versions are missing attributes
// so keeping these checks around just in case:
#if UNITY_5_3_0 // Unity 5.3.0 had tvOS in enum but throws error if used
if ((int)(object)group == 25) return false;
#endif
#if UNITY_5_4 || UNITY_5_5 // Unity 5.4+ doesn't like Wp8 and Blackberry any more
if ((int)(object)group == 15) return false;
if ((int)(object)group == 16) return false;
#endif
return true;
}
开发者ID:yulcat,项目名称:GameCamp,代码行数:19,代码来源:PlayMakerDefines.cs
示例11: AddCompileDefine
/// <summary>
/// Attempts to add a new #define constant to the Player Settings
/// </summary>
/// <param name="newDefineCompileConstant">constant to attempt to define</param>
/// <param name="targetGroups">platforms to add this for (null will add to all platforms)</param>
public static void AddCompileDefine(string newDefineCompileConstant, BuildTargetGroup[] targetGroups = null)
{
if (targetGroups == null)
targetGroups = (BuildTargetGroup[])Enum.GetValues(typeof(BuildTargetGroup));
foreach (BuildTargetGroup grp in targetGroups)
{
if (grp == BuildTargetGroup.Unknown) //the unknown group does not have any constants location
continue;
string defines = PlayerSettings.GetScriptingDefineSymbolsForGroup(grp);
if (!defines.Contains(newDefineCompileConstant))
{
if (defines.Length > 0) //if the list is empty, we don't need to append a semicolon first
defines += ";";
defines += newDefineCompileConstant;
PlayerSettings.SetScriptingDefineSymbolsForGroup(grp, defines);
}
}
}
开发者ID:Headgate2,项目名称:-mobile-games-pipeline,代码行数:26,代码来源:AssetDefineManager.cs
示例12: PreProcessor
public bool PreProcessor()
{
_routineTargetGroup = EditorUserBuildSettings.selectedBuildTargetGroup;
if (PlayerSettings.GetScriptingDefineSymbolsForGroup(_routineTargetGroup).Contains(Tag))
{
_previousDefine = true;
}
else
{
if (!string.IsNullOrEmpty(PlayerSettings.GetScriptingDefineSymbolsForGroup(_routineTargetGroup)) &&
PlayerSettings.GetScriptingDefineSymbolsForGroup(_routineTargetGroup).Length > 0)
{
PlayerSettings.SetScriptingDefineSymbolsForGroup(_routineTargetGroup, PlayerSettings.GetScriptingDefineSymbolsForGroup(_routineTargetGroup) + ";" + Tag);
}
else
{
PlayerSettings.SetScriptingDefineSymbolsForGroup(_routineTargetGroup, Tag);
}
}
return true;
}
开发者ID:dotBunny,项目名称:uBuild,代码行数:22,代码来源:DefineModifier.cs
示例13: RemoveCompileDefine
/// <summary>
/// Attempts to remove a #define constant from the Player Settings
/// </summary>
/// <param name="defineCompileConstant"></param>
/// <param name="targetGroups"></param>
public static void RemoveCompileDefine(string defineCompileConstant, BuildTargetGroup[] targetGroups = null)
{
if (targetGroups == null)
targetGroups = (BuildTargetGroup[])Enum.GetValues(typeof(BuildTargetGroup));
foreach (BuildTargetGroup grp in targetGroups)
{
string defines = PlayerSettings.GetScriptingDefineSymbolsForGroup(grp);
int index = defines.IndexOf(defineCompileConstant);
if (index < 0)
continue; //this target does not contain the define
else if (index > 0)
index -= 1; //include the semicolon before the define
//else we will remove the semicolon after the define
//Remove the word and it's semicolon, or just the word (if listed last in defines)
int lengthToRemove = Math.Min(defineCompileConstant.Length + 1, defines.Length - index);
//remove the constant and it's associated semicolon (if necessary)
defines = defines.Remove(index, lengthToRemove);
PlayerSettings.SetScriptingDefineSymbolsForGroup(grp, defines);
}
}
开发者ID:Headgate2,项目名称:-mobile-games-pipeline,代码行数:29,代码来源:AssetDefineManager.cs
示例14: BuildPlatformFromTargetGroup
public BuildPlayerWindow.BuildPlatform BuildPlatformFromTargetGroup(BuildTargetGroup group)
{
int index = this.BuildPlatformIndexFromTargetGroup(group);
if (index != -1)
return this.buildPlatforms[index];
return (BuildPlayerWindow.BuildPlatform) null;
}
开发者ID:BlakeTriana,项目名称:unity-decompiled,代码行数:7,代码来源:BuildPlayerWindow.cs
示例15: OnSampleSettingGUI
private void OnSampleSettingGUI(BuildTargetGroup platform, AudioImporterInspector.MultiValueStatus status, bool selectionContainsTrackerFile, ref AudioImporterInspector.SampleSettingProperties properties, bool disablePreloadAudioDataOption)
{
EditorGUI.showMixedValue = status.multiLoadType && !properties.loadTypeChanged;
EditorGUI.BeginChangeCheck();
AudioClipLoadType audioClipLoadType = (AudioClipLoadType) EditorGUILayout.EnumPopup("Load Type", (Enum) properties.settings.loadType, new GUILayoutOption[0]);
if (EditorGUI.EndChangeCheck())
{
properties.settings.loadType = audioClipLoadType;
properties.loadTypeChanged = true;
}
EditorGUI.BeginDisabledGroup(disablePreloadAudioDataOption);
if (disablePreloadAudioDataOption)
EditorGUILayout.Toggle("Preload Audio Data", false, new GUILayoutOption[0]);
else
EditorGUILayout.PropertyField(this.m_PreloadAudioData);
EditorGUI.EndDisabledGroup();
if (selectionContainsTrackerFile)
return;
AudioCompressionFormat[] formatsForPlatform = this.GetFormatsForPlatform(platform);
EditorGUI.showMixedValue = status.multiCompressionFormat && !properties.compressionFormatChanged;
EditorGUI.BeginChangeCheck();
AudioCompressionFormat compressionFormat = (AudioCompressionFormat) EditorGUILayout.IntPopup("Compression Format", (int) properties.settings.compressionFormat, Array.ConvertAll<AudioCompressionFormat, string>(formatsForPlatform, (Converter<AudioCompressionFormat, string>) (value => value.ToString())), Array.ConvertAll<AudioCompressionFormat, int>(formatsForPlatform, (Converter<AudioCompressionFormat, int>) (value => (int) value)), new GUILayoutOption[0]);
if (EditorGUI.EndChangeCheck())
{
properties.settings.compressionFormat = compressionFormat;
properties.compressionFormatChanged = true;
}
if (this.CompressionFormatHasQuality(properties.settings.compressionFormat))
{
EditorGUI.showMixedValue = status.multiQuality && !properties.qualityChanged;
EditorGUI.BeginChangeCheck();
int num = EditorGUILayout.IntSlider("Quality", (int) Mathf.Clamp(properties.settings.quality * 100f, 1f, 100f), 1, 100, new GUILayoutOption[0]);
if (EditorGUI.EndChangeCheck())
{
properties.settings.quality = 0.01f * (float) num;
properties.qualityChanged = true;
}
}
EditorGUI.showMixedValue = status.multiSampleRateSetting && !properties.sampleRateSettingChanged;
EditorGUI.BeginChangeCheck();
AudioSampleRateSetting sampleRateSetting = (AudioSampleRateSetting) EditorGUILayout.EnumPopup("Sample Rate Setting", (Enum) properties.settings.sampleRateSetting, new GUILayoutOption[0]);
if (EditorGUI.EndChangeCheck())
{
properties.settings.sampleRateSetting = sampleRateSetting;
properties.sampleRateSettingChanged = true;
}
if (properties.settings.sampleRateSetting == AudioSampleRateSetting.OverrideSampleRate)
{
EditorGUI.showMixedValue = status.multiSampleRateOverride && !properties.sampleRateOverrideChanged;
EditorGUI.BeginChangeCheck();
int num = EditorGUILayout.IntPopup("Sample Rate", (int) properties.settings.sampleRateOverride, AudioImporterInspector.Styles.kSampleRateStrings, AudioImporterInspector.Styles.kSampleRateValues, new GUILayoutOption[0]);
if (EditorGUI.EndChangeCheck())
{
properties.settings.sampleRateOverride = (uint) num;
properties.sampleRateOverrideChanged = true;
}
}
EditorGUI.showMixedValue = false;
}
开发者ID:BlakeTriana,项目名称:unity-decompiled,代码行数:59,代码来源:AudioImporterInspector.cs
示例16: GetFormatsForPlatform
private AudioCompressionFormat[] GetFormatsForPlatform(BuildTargetGroup platform)
{
List<AudioCompressionFormat> compressionFormatList = new List<AudioCompressionFormat>();
if (platform == BuildTargetGroup.WebGL)
{
compressionFormatList.Add(AudioCompressionFormat.AAC);
return compressionFormatList.ToArray();
}
compressionFormatList.Add(AudioCompressionFormat.PCM);
if (platform != BuildTargetGroup.PS3 && platform != BuildTargetGroup.PSM && platform != BuildTargetGroup.PSP2)
compressionFormatList.Add(AudioCompressionFormat.Vorbis);
compressionFormatList.Add(AudioCompressionFormat.ADPCM);
if (platform != BuildTargetGroup.Standalone && platform != BuildTargetGroup.WebPlayer && (platform != BuildTargetGroup.Metro && platform != BuildTargetGroup.WiiU) && (platform != BuildTargetGroup.XboxOne && platform != BuildTargetGroup.XBOX360 && platform != BuildTargetGroup.Unknown))
compressionFormatList.Add(AudioCompressionFormat.MP3);
if (platform == BuildTargetGroup.PSM)
compressionFormatList.Add(AudioCompressionFormat.VAG);
if (platform == BuildTargetGroup.PSP2)
compressionFormatList.Add(AudioCompressionFormat.HEVAG);
if (platform == BuildTargetGroup.WiiU)
compressionFormatList.Add(AudioCompressionFormat.GCADPCM);
if (platform == BuildTargetGroup.XboxOne)
compressionFormatList.Add(AudioCompressionFormat.XMA);
return compressionFormatList.ToArray();
}
开发者ID:BlakeTriana,项目名称:unity-decompiled,代码行数:24,代码来源:AudioImporterInspector.cs
示例17: GetOverrideStatus
private AudioImporterInspector.OverrideStatus GetOverrideStatus(BuildTargetGroup platform)
{
bool flag1 = false;
bool flag2 = false;
if (this.GetAllAudioImporterTargets().Any<AudioImporter>())
{
AudioImporter audioImporter1 = this.GetAllAudioImporterTargets().First<AudioImporter>();
flag2 = audioImporter1.Internal_ContainsSampleSettingsOverride(platform);
IEnumerable<AudioImporter> audioImporterTargets = this.GetAllAudioImporterTargets();
AudioImporter[] audioImporterArray = new AudioImporter[1]{ audioImporter1 };
foreach (AudioImporter audioImporter2 in audioImporterTargets.Except<AudioImporter>((IEnumerable<AudioImporter>) audioImporterArray))
{
bool flag3 = audioImporter2.Internal_ContainsSampleSettingsOverride(platform);
if (flag3 != flag2)
flag1 = ((flag1 ? 1 : 0) | 1) != 0;
flag2 |= flag3;
}
}
if (!flag2)
return AudioImporterInspector.OverrideStatus.NoOverrides;
return flag1 ? AudioImporterInspector.OverrideStatus.MixedOverrides : AudioImporterInspector.OverrideStatus.AllOverrides;
}
开发者ID:BlakeTriana,项目名称:unity-decompiled,代码行数:22,代码来源:AudioImporterInspector.cs
示例18: GetMultiValueStatus
private AudioImporterInspector.MultiValueStatus GetMultiValueStatus(BuildTargetGroup platform)
{
AudioImporterInspector.MultiValueStatus multiValueStatus;
multiValueStatus.multiLoadType = false;
multiValueStatus.multiSampleRateSetting = false;
multiValueStatus.multiSampleRateOverride = false;
multiValueStatus.multiCompressionFormat = false;
multiValueStatus.multiQuality = false;
multiValueStatus.multiConversionMode = false;
if (this.GetAllAudioImporterTargets().Any<AudioImporter>())
{
AudioImporter audioImporter1 = this.GetAllAudioImporterTargets().First<AudioImporter>();
AudioImporterSampleSettings importerSampleSettings1 = platform != BuildTargetGroup.Unknown ? audioImporter1.Internal_GetOverrideSampleSettings(platform) : audioImporter1.defaultSampleSettings;
IEnumerable<AudioImporter> audioImporterTargets = this.GetAllAudioImporterTargets();
AudioImporter[] audioImporterArray = new AudioImporter[1]{ audioImporter1 };
foreach (AudioImporter audioImporter2 in audioImporterTargets.Except<AudioImporter>((IEnumerable<AudioImporter>) audioImporterArray))
{
AudioImporterSampleSettings importerSampleSettings2 = platform != BuildTargetGroup.Unknown ? audioImporter2.Internal_GetOverrideSampleSettings(platform) : audioImporter2.defaultSampleSettings;
multiValueStatus.multiLoadType |= importerSampleSettings1.loadType != importerSampleSettings2.loadType;
multiValueStatus.multiSampleRateSetting |= importerSampleSettings1.sampleRateSetting != importerSampleSettings2.sampleRateSetting;
multiValueStatus.multiSampleRateOverride |= (int) importerSampleSettings1.sampleRateOverride != (int) importerSampleSettings2.sampleRateOverride;
multiValueStatus.multiCompressionFormat |= importerSampleSettings1.compressionFormat != importerSampleSettings2.compressionFormat;
multiValueStatus.multiQuality |= (double) importerSampleSettings1.quality != (double) importerSampleSettings2.quality;
multiValueStatus.multiConversionMode |= importerSampleSettings1.conversionMode != importerSampleSettings2.conversionMode;
}
}
return multiValueStatus;
}
开发者ID:BlakeTriana,项目名称:unity-decompiled,代码行数:28,代码来源:AudioImporterInspector.cs
示例19: SetEveryplayEnabledForTarget
public static void SetEveryplayEnabledForTarget(BuildTargetGroup target, bool enabled)
{
string targetDefine = "";
if(target == kBuildTargetGroupIOS) {
targetDefine = "EVERYPLAY_IPHONE";
// Disable PluginImporter on iOS and use xCode editor instead
//SetPluginImportEnabled(kBuildTargetIOS, enabled);
}
else if(target == BuildTargetGroup.Android) {
targetDefine = "EVERYPLAY_ANDROID";
SetPluginImportEnabled(BuildTarget.Android, enabled);
}
#if UNITY_3_5
SetGlobalCustomDefine("smcs.rsp", targetDefine, enabled);
SetGlobalCustomDefine("gmcs.rsp", targetDefine, enabled);
#else
SetScriptingDefineSymbolForTarget(target, targetDefine, enabled);
#endif
}
开发者ID:Leii,项目名称:Everyplay_Demo_,代码行数:21,代码来源:EveryplayPostprocessor.cs
示例20: Entry
public int this[BuildTargetGroup g]
{
get {
int i = m_values.FindIndex(v => v.targetGroup == g);
if(i >= 0) {
return m_values[i].value;
} else {
return DefaultValue;
}
}
set {
int i = m_values.FindIndex(v => v.targetGroup == g);
if(i >= 0) {
m_values[i].value = value;
} else {
m_values.Add(new Entry(g, value));
}
}
}
开发者ID:unity3d-jp,项目名称:AssetGraph,代码行数:19,代码来源:SerializableMultiTargetInt.cs
注:本文中的BuildTargetGroup类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论