Skip to content

Commit 71def9f

Browse files
authored
Merge branch 'master' into bugfix/1324374-rotated-parent-incorrect-rect-select
2 parents 587eab3 + 68cd619 commit 71def9f

2 files changed

Lines changed: 13 additions & 8 deletions

File tree

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
99

1010
### Bug Fixes
1111

12+
- [case: 1332226] Fixed issue where some Gizmos menu items would be missing in projects that have ProBuilder package installed.
1213
- [case: 1324374] Fixed incorrect vertex/edge/face rect selection when mesh's parent is rotated and/or scaled.
1314

1415
## [5.0.3] - 2021-04-01

Editor/EditorCore/HierarchyListener.cs

Lines changed: 12 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -12,14 +12,7 @@ static class HierarchyListener
1212
{
1313
static HierarchyListener()
1414
{
15-
// The inspector icon for ProBuilderMesh is set in the component metadata. However, this also serves as the
16-
// scene view gizmo icon, which we do not want. To avoid drawing an icon for every mesh in the Scene View,
17-
// we simply tell the AnnotationManager to not render the icon. This _does_ put ProBuilderMesh in the
18-
// "Recently Changed" list, but only when it is modified the first time.
19-
// The alternative method of setting an icon is to place it in a folder named "Editor Default Resources/Icons",
20-
// however that requires that the resources directory be in "Assets", which we do not want to do.
21-
EditorUtility.SetGizmoIconEnabled(typeof(ProBuilderMesh), false);
22-
15+
AssemblyReloadEvents.afterAssemblyReload += OnAfterAssemblyReload;
2316
// When a prefab is updated, this is raised. For some reason it's
2417
// called twice?
2518
EditorApplication.hierarchyChanged += HierarchyWindowChanged;
@@ -29,6 +22,17 @@ static HierarchyListener()
2922
PrefabUtility.prefabInstanceUpdated += PrefabInstanceUpdated;
3023
}
3124

25+
static void OnAfterAssemblyReload()
26+
{
27+
// The inspector icon for ProBuilderMesh is set in the component metadata. However, this also serves as the
28+
// scene view gizmo icon, which we do not want. To avoid drawing an icon for every mesh in the Scene View,
29+
// we simply tell the AnnotationManager to not render the icon. This _does_ put ProBuilderMesh in the
30+
// "Recently Changed" list, but only when it is modified the first time.
31+
// The alternative method of setting an icon is to place it in a folder named "Editor Default Resources/Icons",
32+
// however that requires that the resources directory be in "Assets", which we do not want to do.
33+
EditorApplication.delayCall += () => EditorUtility.SetGizmoIconEnabled(typeof(ProBuilderMesh), false);
34+
}
35+
3236
static void PrefabInstanceUpdated(GameObject go)
3337
{
3438
if (EditorApplication.isPlayingOrWillChangePlaymode)

0 commit comments

Comments
 (0)