Code Question, Adding Behavior to Existing Unity Class

If I wanted to add some behavior to an existing Unity class, is such a thing possible? In this example, I want to add a Locked method to a UI Panel, so I can test if it’s locked before attempting to close it. I can create a class from scratch and just put the behavior there if I have to, but I’d rather not.

This turned out to be a lot easier than I thought it would be. I just made a new class and added it as a component.

This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.

Privacy & Terms