Right now I’m building a custom Inspector for a derived class of the UI.Text component. I’m having trouble changing the text in OnDisable and see it updated in the editor.
I’ve tried calling the following afterwards to no avail:
- SetLayoutDirty()
- SetVerticesDirty()
- SetAllDirty()
- Canvas.ForceUpdateCanvases()
The only way the text actually updates itself is by moving or scaling its RectTransform in the scene. Since there’s no access to the RectTransform component code on bitbucket, i can’t look into what it’s doing different.
How do I get to Update the component programmatically in OnDisable of my custom inspector?