Example #1
0
    public static void CopyAndroidIL2CPPSymbols(string pathToBuiltProject, AndroidArchitecture targetArchi)
    {
        string buildName  = Path.GetFileNameWithoutExtension(pathToBuiltProject);
        string symbolsDir = Path.GetDirectoryName(pathToBuiltProject);

        symbolsDir = symbolsDir + "/" + buildName + "_IL2CPPSymbols/";
        Debug.Log("CopyAndroidIL2CPPSymbols : " + symbolsDir + "   " + targetArchi.ToString());

        if (Directory.Exists(symbolsDir))
        {
            Directory.Delete(symbolsDir, true);
        }
        CreateDir(symbolsDir);

        if ((targetArchi & AndroidArchitecture.ARMv7) > 0)
        {
            CopyARMV7Symbols(symbolsDir);
        }
        if ((targetArchi & AndroidArchitecture.ARM64) > 0)
        {
            CopyARMV8Symbols(symbolsDir);
        }
    }
 /// <summary>
 /// 実行する時に呼び出されます
 /// </summary>
 protected override BuildCommandResult DoRun()
 {
     m_oldTargetArchitectures = PlayerSettings.Android.targetArchitectures;
     PlayerSettings.Android.targetArchitectures = m_targetArchitectures;
     return(Success(m_targetArchitectures.ToString()));
 }
        public void SerializeToAsset()
        {
            var settingsAsset = ScriptableObject.CreateInstance <CurrentSettings>();

            settingsAsset.SimulationMode           = SimulationMode;
            settingsAsset.PlayerGraphicsApi        = PlayerGraphicsApi.ToString();
            settingsAsset.MtRendering              = MtRendering;
            settingsAsset.GraphicsJobs             = GraphicsJobs;
            settingsAsset.ColorSpace               = ColorSpace.ToString();
            settingsAsset.EnabledXrTarget          = XrTarget;
            settingsAsset.XrsdkRevision            = GetOculusXrSdkPackageVersionInfo();
            settingsAsset.XrManagementRevision     = GetXrManagementPackageVersionInfo();
            settingsAsset.UrpPackageVersionInfo    = GetUrpPackageVersionInfo();
            settingsAsset.HdrpPackageVersionInfo   = GetHdrpPackageVersionInfo();
            settingsAsset.PerfTestsPackageRevision = GetPerfTestsPackageVersionInfo();
            settingsAsset.DeviceRuntimeVersion     = DeviceRuntimeVersion;
            settingsAsset.Username                  = Username = Environment.UserName;
            settingsAsset.FfrLevel                  = FfrLevel;
            settingsAsset.TestsRevision             = TestsRevision;
            settingsAsset.TestsRevisionDate         = TestsRevisionDate;
            settingsAsset.TestsBranch               = TestsBranch;
            settingsAsset.AndroidTargetArchitecture = string.Format("AndroidTargetArchitecture|{0}", AndroidTargetArchitecture.ToString());
            settingsAsset.RenderPipeline            = RenderPipeline =
                $"renderpipeline|{(GraphicsSettings.renderPipelineAsset != null ? GraphicsSettings.renderPipelineAsset.name : "BuiltInRenderer")}";

#if URP
            settingsAsset.AntiAliasing = GraphicsSettings.renderPipelineAsset != null
                ? ((UniversalRenderPipelineAsset)GraphicsSettings.renderPipelineAsset).msaaSampleCount
                : QualitySettings.antiAliasing;
#else
            settingsAsset.AntiAliasing = QualitySettings.antiAliasing;
#endif


#if OCULUS_SDK
            // These fields are used by the performance test framework and are an artifact from this class
            // previously using the provider - specific enums before converting to a cross-platform friendly string
            if (BuildTarget == BuildTarget.Android)
            {
                settingsAsset.StereoRenderingModeAndroid = StereoRenderingPath;
            }
            else
            {
                settingsAsset.StereoRenderingModeDesktop = StereoRenderingPath;
            }

#if OCULUS_SDK_PERF
            settingsAsset.PluginVersion = string.Format("OculusPluginVersion|{0}", OculusStats.PluginVersion);
#endif
#endif
#if XR_SDK
            settingsAsset.StereoRenderingMode = StereoRenderingPath;
#else
            // legacy xr has different enum for player settings and runtime settings for stereo rendering mode
            var builtInXrStereoPath = (StereoRenderingPath)Enum.Parse(typeof(StereoRenderingPath), StereoRenderingPath);
            settingsAsset.StereoRenderingMode = GetXrStereoRenderingPathMapping(builtInXrStereoPath).ToString();
#endif
            CreateAndSaveCurrentSettingsAsset(settingsAsset);
        }
Example #4
0
        public void SerializeToAsset()
        {
            var settings  = CustomMetadataManager.Instance;
            var pathParts = Application.dataPath.Split('/');

            settings.ProjectName                  = pathParts.Length >= 2 ? pathParts[pathParts.Length - 2] : string.Empty;
            settings.PlayerGraphicsApi            = PlayerGraphicsApi.ToString();
            settings.MtRendering                  = MtRendering;
            settings.GraphicsJobs                 = GraphicsJobs;
            settings.EnableBurst                  = EnableBurst;
            settings.ScriptingBackend             = ScriptingImplementation.ToString();
            settings.ColorSpace                   = ColorSpace.ToString();
            settings.Username                     = Username = Environment.UserName;
            settings.PackageUnderTestName         = PackageUnderTestName;
            settings.PackageUnderTestVersion      = PackageUnderTestVersion;
            settings.PackageUnderTestRevision     = PackageUnderTestRevision;
            settings.PackageUnderTestRevisionDate = PackageUnderTestRevisionDate;
            settings.PackageUnderTestBranch       = PackageUnderTestBranch;
            settings.TestsRevision                = TestsRevision;
            settings.TestsRevisionDate            = TestsRevisionDate;
            settings.TestsBranch                  = TestsBranch;
            settings.JobLink                    = JobLink;
            settings.JobWorkerCount             = Unity.Jobs.LowLevel.Unsafe.JobsUtility.JobWorkerCount;
            settings.ApiCompatibilityLevel      = ApiCompatibilityLevel.ToString();
            settings.StripEngineCode            = StringEngineCode;
            settings.ManagedStrippingLevel      = ManagedStrippingLevel.ToString();
            settings.ScriptDebugging            = ScriptDebugging;
            settings.TestProjectName            = TestProjectName;
            settings.TestProjectRevision        = TestProjectRevision;
            settings.TestProjectRevisionDate    = TestProjectRevisionDate;
            settings.TestProjectBranch          = TestProjectBranch;
            settings.EnabledXrTarget            = EnabledXrTarget;
            settings.StereoRenderingMode        = StereoRenderingMode;
            settings.StereoRenderingModeDesktop = StereoRenderingModeDesktop;
            settings.StereoRenderingModeAndroid = StereoRenderingModeAndroid;
            settings.SimulationMode             = SimulationMode;
            settings.PluginVersion              = PluginVersion;
            settings.DeviceRuntimeVersion       = DeviceRuntimeVersion;
            settings.FfrLevel                   = FfrLevel;
            settings.AndroidTargetArchitecture  = AndroidTargetArchitecture.ToString();

            GetPackageUnderTestVersionInfo(settings);
            settings.RenderPipeline = RenderPipeline = $"{(GraphicsSettings.renderPipelineAsset != null ? GraphicsSettings.renderPipelineAsset.name : "BuiltInRenderer")}";

#if URP
            settings.AntiAliasing = GraphicsSettings.renderPipelineAsset != null
                ? ((UniversalRenderPipelineAsset)GraphicsSettings.renderPipelineAsset).msaaSampleCount
                : QualitySettings.antiAliasing;
#else
            settings.AntiAliasing = QualitySettings.antiAliasing;
#endif

#if ENABLE_VR
#if OCULUS_SDK
            // These fields are used by the performance test framework and are an artifact from this class
            // previously using the provider - specific enums before converting to a cross-platform friendly string
            if (BuildTarget == BuildTarget.Android)
            {
                settings.StereoRenderingModeAndroid = StereoRenderingMode;
            }
            else
            {
                settings.StereoRenderingModeDesktop = StereoRenderingMode;
            }

#if OCULUS_SDK_PERF
            settings.PluginVersion = string.Format("OculusPluginVersion|{0}", OculusStats.PluginVersion);
#endif
#endif
#if XR_SDK
            settings.StereoRenderingMode = StereoRenderingMode;
#else
            if (!string.IsNullOrEmpty(StereoRenderingMode))
            {
                // legacy xr has different enum for player settings and runtime settings for stereo rendering mode
                var builtInXrStereoPath = (StereoRenderingPath)Enum.Parse(typeof(StereoRenderingPath), StereoRenderingMode);
                settings.StereoRenderingMode = GetXrStereoRenderingPathMapping(builtInXrStereoPath).ToString();
            }
#endif
#endif
            CustomMetadataManager.SaveSettingsAssetInEditor();
        }