Skip to content

Commit d836c7e

Browse files
authored
Fixing tools icons not loading properly when importing the package (#668)
1 parent 2c9da68 commit d836c7e

5 files changed

Lines changed: 17 additions & 267 deletions

File tree

Editor/EditorCore/CutTool.cs

Lines changed: 1 addition & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919
namespace UnityEditor.ProBuilder
2020
{
2121
[EditorTool("Cut Tool", typeof(ProBuilderMesh), typeof(PositionToolContext))]
22+
[Icon("Packages/com.unity.probuilder/Editor Default Resources/Icons/Toolbar/CutTool.png")]
2223
class CutTool : EditorTool
2324
{
2425
ProBuilderMesh m_Mesh;
@@ -85,12 +86,6 @@ public CutVertexData(Vector3 position, Vector3 normal, VertexTypes types = Verte
8586

8687
Color m_CurrentHandleColor = k_HandleColor;
8788

88-
GUIContent m_IconContent;
89-
public override GUIContent toolbarIcon
90-
{
91-
get { return m_IconContent; }
92-
}
93-
9489
//Handles and point placement
9590
int m_ControlId;
9691
bool m_PlacingPoint;
@@ -169,13 +164,6 @@ public override bool IsAvailable()
169164

170165
void OnEnable()
171166
{
172-
m_IconContent = new GUIContent()
173-
{
174-
image = IconUtility.GetIcon("Toolbar/CutTool"),
175-
text = "Cut Tool",
176-
tooltip = "Cut Tool"
177-
};
178-
179167
s_HandleColorUseExistingVertex = Handles.selectedColor;
180168
s_HandleColorAddVertexOnEdge = Handles.selectedColor;
181169

0 commit comments

Comments
 (0)