- Home /
Call method on "Start" of a built-in component?
Is there a way to call a method (or really just run any code) for a specific built-in component (in this case, the UI Text component) at its start?
I want to run specific code on all instances of Text components when they're initialized. I could just create a new Text class that extends the original Text with my functionality, but I already have a LOT of Text components all over my UI and replacing each and every one of them would be a pain.
Thanks!
Answer by zero_null · Dec 27, 2017 at 08:01 AM
There is no such way of modifying the built-in component without overriding it. You need to override the class or just create a new mono behavior and attach to your Text Game Object and do that does your required job in the manner you want in your script.
Your answer
![](https://koobas.hobune.stream/wayback/20220612145302im_/https://answers.unity.com/themes/thub/images/avi.jpg)