febucci / unitypackage-custom-hierarchy

Unity package to help having a clearer Hierarchy view, organizing everything in a “tree view” and including extra informations like Components Icons and groups/divisors.
Other
607 stars 76 forks source link

Errors are thrown when doing a clean build #19

Open sandrofigo opened 10 months ago

sandrofigo commented 10 months ago

When freshly cloning a repository and running a build for the first time through the Unity CLI (CI/CD) errors similar to the one below are thrown:

Library\PackageCache\com.febucci.custom-hierarchy@1.2.0\Editor\HierarchyDrawer.cs(344,31): error CS0234: The type or namespace name 'PrefabStageUtility' does not exist in the namespace 'UnityEditor.Experimental.SceneManagement' (are you missing an assembly reference?)

Unity Version: 2021.3.20f1

The error above does not prevent the build from finishing, but clutters the output logs with false positives.

Reason behind this is the usage of UnityEditor.Experimental.SceneManagement which has changed in newer version of Unity to UnityEditor.SceneManagement.