Ejemplo n.º 1
0
    // 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();
    }
Ejemplo n.º 2
0
    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.");
        }*/
    }
Ejemplo n.º 3
0
 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);
 }
Ejemplo n.º 4
0
			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;
			}
Ejemplo n.º 5
0
        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;
        }
 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
     };
 }
Ejemplo n.º 7
0
        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);
        }
Ejemplo n.º 8
0
 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>());
 }
Ejemplo n.º 9
0
 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"));
     }
 }
Ejemplo n.º 10
0
        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;
        }
    /// <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);
            }
        }
    }
Ejemplo n.º 12
0
        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;
        }
    /// <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);
        }
    }
 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));
         }
     }
 }
Ejemplo n.º 15
0
    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
    }
Ejemplo n.º 16
0
 internal static extern bool GetLightmapStreamingEnabledForPlatformGroup(BuildTargetGroup platformGroup);
Ejemplo n.º 17
0
 public static bool GetPropertyOptionalInt(string name, ref int value, BuildTargetGroup target)
 {
     value = GetPropertyInt(name, target);
     return(true);
 }
Ejemplo n.º 18
0
 internal static extern int GetLightmapStreamingPriorityForPlatformGroup(BuildTargetGroup platformGroup);
Ejemplo n.º 19
0
 public static extern ManagedStrippingLevel GetManagedStrippingLevel(BuildTargetGroup targetGroup);
Ejemplo n.º 20
0
 public static bool GetPropertyOptionalString(string name, ref string value, BuildTargetGroup target)
 {
     value = GetPropertyString(name, target);
     return(true);
 }
Ejemplo n.º 21
0
 public static extern bool GetMobileMTRendering(BuildTargetGroup targetGroup);
Ejemplo n.º 22
0
 public static extern void SetPropertyString(string name, string value, BuildTargetGroup target);
Ejemplo n.º 23
0
 public static extern string GetPropertyString(string name, BuildTargetGroup target);
Ejemplo n.º 24
0
 public static bool GetPropertyOptionalBool(string name, ref bool value, BuildTargetGroup target)
 {
     value = GetPropertyBool(name, target);
     return(true);
 }
Ejemplo n.º 25
0
 public static extern bool GetPropertyBool(string name, BuildTargetGroup target);
Ejemplo n.º 26
0
 public static extern void SetPropertyBool(string name, bool value, BuildTargetGroup target);
 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;
 }
Ejemplo n.º 28
0
        internal static string GetPlatformName(BuildTargetGroup targetGroup)
        {
            BuildPlatform platform = BuildPlatforms.instance.GetValidPlatforms().Find(p => p.targetGroup == targetGroup);

            return(platform == null ? string.Empty : platform.name);
        }
 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;
 }
Ejemplo n.º 30
0
 public static extern void SetPropertyInt(string name, int value, BuildTargetGroup target);
Ejemplo n.º 31
0
 internal static extern void SetBuildNumber(BuildTargetGroup targetGroup, string buildNumber);
Ejemplo n.º 32
0
 internal static extern void SetLightmapStreamingPriorityForPlatformGroup(BuildTargetGroup platformGroup, int lightmapStreamingPriority);
Ejemplo n.º 33
0
 public static extern ApiCompatibilityLevel GetApiCompatibilityLevel(BuildTargetGroup buildTargetGroup);
 public BuildPlayerWindow.BuildPlatform BuildPlatformFromTargetGroup(BuildTargetGroup group)
 {
   int index = this.BuildPlatformIndexFromTargetGroup(group);
   if (index != -1)
     return this.buildPlatforms[index];
   return (BuildPlayerWindow.BuildPlatform) null;
 }
Ejemplo n.º 35
0
 internal static extern void SetLightmapStreamingEnabledForPlatformGroup(BuildTargetGroup platformGroup, bool lightmapStreamingEnabled);
 public void Remove(BuildTargetGroup group)
 {
     int index = m_values.FindIndex(v => v.targetGroup == group);
     if(index >= 0) {
         m_values.RemoveAt(index);
     }
 }
Ejemplo n.º 37
0
 internal static extern LightmapEncodingQuality GetLightmapEncodingQualityForPlatformGroup(BuildTargetGroup platformGroup);
Ejemplo n.º 38
0
 public static extern int GetPropertyInt(string name, BuildTargetGroup target);
Ejemplo n.º 39
0
 public static extern void SetManagedStrippingLevel(BuildTargetGroup targetGroup, ManagedStrippingLevel level);
Ejemplo n.º 40
0
 internal static extern void SetLightmapEncodingQualityForPlatformGroup(BuildTargetGroup platformGroup, LightmapEncodingQuality encodingQuality);
 public int BuildPlatformIndexFromTargetGroup(BuildTargetGroup group)
 {
   for (int index = 0; index < this.buildPlatforms.Length; ++index)
   {
     if (group == this.buildPlatforms[index].targetGroup)
       return index;
   }
   return -1;
 }
Ejemplo n.º 42
0
 public static extern string GetScriptingDefineSymbolsForGroup(BuildTargetGroup targetGroup);
 public bool ContainsValueOf(BuildTargetGroup group)
 {
     return m_values.FindIndex(v => v.targetGroup == group) >= 0;
 }
Ejemplo n.º 44
0
 private static extern void SetScriptingDefineSymbolsForGroupInternal(BuildTargetGroup targetGroup, string defines);
 public Entry(BuildTargetGroup g, int v)
 {
     targetGroup = g;
     value = v;
 }
Ejemplo n.º 46
0
 public static extern int GetArchitecture(BuildTargetGroup targetGroup);
Ejemplo n.º 47
0
    private void DisplayImagesFor(string title, BuildTargetGroup target)
    {
        var found = false;
        Texture2D[] textures = PlayerSettings.GetIconsForTargetGroup(target);
        int[] textureSizes = PlayerSettings.GetIconSizesForTargetGroup(target);
        for (var i = 0; i < textureSizes.Length; i++)
        {
            var texture2D = textures[i];
            if (texture2D == null) continue;
            if (!found)
            {
                EditorGUILayout.LabelField(title);
                found = true;
            }

            EditorGUILayout.LabelField(string.Format("[{1}] - {0}",texture2D.ToString(), textureSizes[i]));
            new GUIContent(texture2D);
            Rect pos = GUILayoutUtility.GetRect(textureSizes[i], textureSizes[i], EditorStyles.miniButton, GUILayout.ExpandWidth(false));
            EditorGUI.DrawPreviewTexture(pos, texture2D);
        }
    }
	static void WriteInPrefs(List<string> defs, BuildTargetGroup p_target, bool p_forceRecompile = true)
	{

		string v_defineSymbols = PlayerSettings.GetScriptingDefineSymbolsForGroup(p_target);
		List<string> v_currentDefines = ParseDefines(v_defineSymbols);
		v_defineSymbols = "";
		foreach(string v_currentDefine in v_currentDefines)
		{
			if(!_removeList.Contains(v_currentDefine))
			{
				if(!string.IsNullOrEmpty(v_defineSymbols))
					v_defineSymbols += ";";
				v_defineSymbols += v_currentDefine;
			}
		}
		
		for(int i = 0; i < defs.Count; i++)
		{
			if(!string.IsNullOrEmpty(defs[i]) && !v_defineSymbols.Contains(defs[i]))
			{
				if(!string.IsNullOrEmpty(v_defineSymbols))
				   v_defineSymbols += ";";
				v_defineSymbols += defs[i];
			}
		}

		PlayerSettings.SetScriptingDefineSymbolsForGroup(p_target, v_defineSymbols);
		if(p_forceRecompile)
		{
			//ReimportSomethingToForceRecompile();
			_removeList.Clear();
		}
	}
 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;
 }
Ejemplo n.º 50
0
    private static void SetScriptingDefineSymbolForTarget(BuildTargetGroup target, string targetDefine, bool enabled)
    {
        #if !UNITY_3_5
        string defines = PlayerSettings.GetScriptingDefineSymbolsForGroup(target);

        defines = defines.Replace(targetDefine, "");
        defines = defines.Replace(";;", ";");

        if(enabled) {
            if(defines.Length > 0) {
                defines = targetDefine + ";" + defines;
            }
            else {
                defines = targetDefine;
            }
        }

        PlayerSettings.SetScriptingDefineSymbolsForGroup(target, defines);
        #endif
    }
 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();
 }
Ejemplo n.º 52
0
 public static extern void SetApiCompatibilityLevel(BuildTargetGroup buildTargetGroup, ApiCompatibilityLevel value);
Ejemplo n.º 53
0
 public static extern void SetArchitecture(BuildTargetGroup targetGroup, int architecture);
Ejemplo n.º 54
0
 public static extern void SetMobileMTRendering(BuildTargetGroup targetGroup, bool enable);
		/** Profile Providers util functions **/

		private void TryAddRemoveSocialPlatformFlag(BuildTargetGroup buildTarget, string socialPlatform, bool remove) {
			string targetFlag = GetSocialPlatformFlag(socialPlatform);
			string scriptDefines = PlayerSettings.GetScriptingDefineSymbolsForGroup(buildTarget);
			List<string> flags = new List<string>(scriptDefines.Split(';'));

			if (flags.Contains(targetFlag)) {
				if (remove) {
					flags.Remove(targetFlag);
				}
			}
			else {
				if (!remove) {
					flags.Add(targetFlag);
				}
			}

			string result = string.Join(";", flags.ToArray());
			if (scriptDefines != result) {
				PlayerSettings.SetScriptingDefineSymbolsForGroup(buildTarget, result);
			}
		}
Ejemplo n.º 56
0
 public static extern ScriptingImplementation GetScriptingBackend(BuildTargetGroup targetGroup);
Ejemplo n.º 57
0
    public static void SetEveryplayEnabledForTarget(BuildTargetGroup target, bool enabled)
    {
        string targetDefine = "";

        if(target == BuildTargetGroup.iPhone) {
            targetDefine = "EVERYPLAY_IPHONE";
        }
        else if(target == BuildTargetGroup.Android) {
            targetDefine = "EVERYPLAY_ANDROID";
        }

        #if UNITY_3_5
        SetGlobalCustomDefine("smcs.rsp", targetDefine, enabled);
        SetGlobalCustomDefine("gmcs.rsp", targetDefine, enabled);
        #else
        SetScriptingDefineSymbolForTarget(target, targetDefine, enabled);
        #endif
    }
Ejemplo n.º 58
0
 public static extern void SetApplicationIdentifier(BuildTargetGroup targetGroup, string identifier);
 private static List<string> GetDefinesList(BuildTargetGroup group)
 {
     return new List<string>(PlayerSettings.GetScriptingDefineSymbolsForGroup(group).Split(';'));
 }
Ejemplo n.º 60
0
 public static extern string GetApplicationIdentifier(BuildTargetGroup targetGroup);