Is there a differance in proformance using our own OnSelectionChange event?
Also
why didn’t we put in a OnDisable()?
private void OnDisable()
{
Selection.selectionChanged -= OnSelectionChanged;
}
Thanks
Is there a differance in proformance using our own OnSelectionChange event?
Also
why didn’t we put in a OnDisable()?
private void OnDisable()
{
Selection.selectionChanged -= OnSelectionChanged;
}
Thanks
As near as I can tell, no, there’s no difference in performance. Performance isn’t a huge issue here anyways.
As some clever students have discovered, you can bypass subscribing to the event altogether, by naming the method OnSelectionChange()
and it will be picked up by the EditorWindow callbacks.