Unity-Technologies / ProjectAuditor

Project Auditor is an experimental static analysis tool for Unity Projects.
Other
789 stars 65 forks source link

Missing ProjectSettings.Android.optimizedFramePacing() in Unity 2020.3 #215

Open yaoyorozu-tech opened 10 months ago

yaoyorozu-tech commented 10 months ago

Describe the bug

An exception occurred in 'optimizedFramePacing' while running the analysis.

ArgumentException: Method UnityEditor.PlayerSettings+Android.optimizedFramePacing() not found in assembly UnityEditor, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null!
UnityEditor.Macros.MethodEvaluator.Eval (System.String assemblyFile, System.String typeName, System.String methodName, System.Type[] paramTypes, System.Object[] args) (at /Users/bokken/buildslave/unity/build/Editor/Mono/Macros/MethodEvaluator.cs:68)

To Reproduce Steps to reproduce the behavior:

  1. Create a new project using Core-2D template in Unity2020.3.5f.
  2. Add package according to https://docs.unity3d.com/Packages/Installation/manual/upm-ui-quick.html
  3. Switch Platform for Android.
  4. Select Platform:Android and run
  5. See error

Expected behavior

Optimized Frame Pacing itself has been around since 2019.2, but as of 2020.3 there is no API to access it from code.

The Project Auditor settings file (Data/ProjectSettings.json) defines it as available from 2019.2, so trying to reference it will throw an exception.

It's working fine on 2022.3 and 2021.3.

Information (please complete the following information):