Major error when I click optimize, no idea how to fix

After clicking “optimization” in pathfinder my inspector UI breaks

Here’s what my screen looks (inspector glitch and console errors):

Unity version 2021.2.0b1.3029

Shouldn’t be any plugin conflicts,

Full error:

ArgumentException: There is no a valid NamedBuildTarget for BuildTargetGroup ‘Facebook’
UnityEditor.Build.NamedBuildTarget.FromBuildTargetGroup (UnityEditor.BuildTargetGroup buildTargetGroup) (at :0)
UnityEditor.PlayerSettings.GetScriptingDefineSymbolsForGroup (UnityEditor.BuildTargetGroup targetGroup) (at :0)
Pathfinding.OptimizationHandler.GetDefineSymbols () (at Assets/AstarPathfindingProject/PackageTools/Editor/OptimizationHandler.cs:69)
Pathfinding.OptimizationHandler.IsDefineEnabled (System.String name, System.Boolean& enabled, System.Boolean& consistent) (at Assets/AstarPathfindingProject/PackageTools/Editor/OptimizationHandler.cs:108)
Pathfinding.OptimizationHandler+<>c.b__8_4 (System.String[] opts) (at Assets/AstarPathfindingProject/PackageTools/Editor/OptimizationHandler.cs:135)
System.Linq.Enumerable+WhereSelectEnumerableIterator2[TSource,TResult].ToList () (at <b024aa277ab0422080e4a1dbe1f3c835>:0) System.Linq.Enumerable.ToList[TSource] (System.Collections.Generic.IEnumerable1[T] source) (at :0)
Pathfinding.OptimizationHandler.FindDefines () (at Assets/AstarPathfindingProject/PackageTools/Editor/OptimizationHandler.cs:133)
Pathfinding.AstarPathEditor.DrawOptimizationSettings () (at Assets/AstarPathfindingProject/Editor/AstarPathEditor.cs:398)
Pathfinding.AstarPathEditor.DrawMainArea () (at Assets/AstarPathfindingProject/Editor/AstarPathEditor.cs:382)
Pathfinding.AstarPathEditor.OnInspectorGUI () (at Assets/AstarPathfindingProject/Editor/AstarPathEditor.cs:260)
UnityEditor.UIElements.InspectorElement+<>c__DisplayClass59_0.b__0 () (at <90bfa07fb5eb485c85c9136f8270cd9d>:0)
UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr, Boolean&)

still an issue for me, self bump?

Hi

Ah, Unity changed that enum again…
The beta version has a more proper fix for this. I’ll try to backport it to the non-beta.
You can probably close the optimizations header by going into the debug mode in the inspector and unchecking the relevant boolean.

1 Like

thanks for the response! can’t seem to find the right values in debug mode but that’s ok, not in a rush with this project. Appreciate your hard work, sorry unity is a butt sometimes