Skip to content

Commit dbbc9fb

Browse files
committed
chore: removed onDestroy
1 parent dfdd01e commit dbbc9fb

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

Runtime/AvatarCreator/UI/Buttons/ButtonElement.cs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -22,11 +22,11 @@ public void AddListener(Action action)
2222
button.onClick.AddListener(action.Invoke);
2323
}
2424

25-
private void OnDestroy()
26-
{
27-
button.onClick.RemoveAllListeners();
28-
}
29-
25+
/// <summary>
26+
/// Sets the icon on the rawImage component
27+
/// </summary>
28+
/// <param name="texture">The texture to be assigned to the RawImage component</param>
29+
/// <param name="sizeToParent">If true the icon will resize itself to fit inside the parent RectTransform</param>
3030
public void SetIcon(Texture texture, bool sizeToParent = true)
3131
{
3232
rawImage.texture = texture;

0 commit comments

Comments
 (0)