Example #1
0
        internal static IScriptingImplementations GetScriptingImplementations(NamedBuildTarget namedBuildTarget)
        {
            // Standalone Windows, Linux and OS X share player settings between each other, so they share scripting implementations too
            // However, since we can't pin BuildTargetGroup to any single platform support module, we have to explicitly check for this case
            if (namedBuildTarget.ToBuildTargetGroup() == BuildTargetGroup.Standalone)
            {
                return(new DesktopStandalonePostProcessor.ScriptingImplementations());
            }

            return(GetScriptingImplementations(GetTargetStringFromBuildTargetGroup(namedBuildTarget.ToBuildTargetGroup())));
        }
 internal static BuildTarget CalculateSelectedBuildTarget(NamedBuildTarget namedBuildTarget)
 {
     if (namedBuildTarget.ToBuildTargetGroup() == BuildTargetGroup.Standalone)
     {
         BuildTarget target = EditorUserBuildSettings.selectedStandaloneTarget;
         if (target == BuildTarget.NoTarget)
         {
             target = EditorUserBuildSettings.activeBuildTarget;
         }
         return(DesktopStandaloneBuildWindowExtension.GetBestStandaloneTarget(target));
     }
     else
     {
         if (BuildPlatforms.instance == null)
         {
             throw new System.Exception("Build platforms are not initialized.");
         }
         BuildPlatform platform = BuildPlatforms.instance.BuildPlatformFromNamedBuildTarget(namedBuildTarget);
         if (platform == null)
         {
             throw new System.Exception("Could not find build platform for target group " + namedBuildTarget.TargetName);
         }
         return(platform.defaultTarget);
     }
 }
 public static TierSettings GetTierSettings(NamedBuildTarget target, GraphicsTier tier) => GetTierSettings(target.ToBuildTargetGroup(), tier);
 public static void SetTierSettings(NamedBuildTarget target, GraphicsTier tier, TierSettings settings) => SetTierSettings(target.ToBuildTargetGroup(), tier, settings);