You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Could we have some way to expose which targets we want to test / which one we want to exclude?
Right now it's loading consoles and other things that I don't have the SDK nor the intention to target 馃槄
Thanks for the amazing tools <3
Edit: I feel like a crybaby 馃う
I checked and the code to test compilation can be used standalone. Only the Net Framework compliance tests need the visualizer
In case anyone wants to steal the test code. Fill the array with your targets to test, watch it go BRRRRRR
publicclassCompilePlayerScripts{// Set me up :DprivatestaticreadonlyBuildTarget[]TargetsToTest=new[]{BuildTarget.Android};[Test]publicvoidBuildTargetCompiles([ValueSource(nameof(CompilePlayerScripts.GetTestableTargets))]BuildTargetbuildTarget){ScriptCompilationSettingssettings=newScriptCompilationSettings{group=BuildPipeline.GetBuildTargetGroup(buildTarget),target=buildTarget,options=ScriptCompilationOptions.None};PlayerBuildInterface.CompilePlayerScripts(settings,CompilePlayerScripts.TEMP_DIR+"_"+buildTarget);}privateconststringTEMP_DIR="Temp/PlayerScriptCompilationTests";privatestaticIEnumerable<BuildTarget>GetTestableTargets(){returnCompilePlayerScripts.TargetsToTest.Where(x =>CompilePlayerScripts.GetAttributeOfType<ObsoleteAttribute>(x)==null).Except(new[]{BuildTarget.WSAPlayer,BuildTarget.NoTarget});// excluded because they have errors even with just Unity packages.}privatestaticTGetAttributeOfType<T>(EnumenumVal)whereT:Attribute{MemberInfo[]memInfo=enumVal.GetType().GetMember(enumVal.ToString());object[]attributes=memInfo[0].GetCustomAttributes(typeof(T),false);returnattributes.Length>0?(T)attributes[0]:null;}}
Activity