Hi all,
I create interface and the base class uses this interface for example base_buttons then I created two buttons instances from this class but I want one to use the interface and the other not use it. Is there a way to make the other instance not use the interface ?
You can not have child classes selectively choose what to inherit from the parent class. The way to handle this is to have the child class override the interface functions you wish to ignore and leave them empty.
2 Likes
In blueprint the interface function called “Test Function” I am not sure how to override or just place the interface function and leave it empty ?
Yep, that will do it. I’m of course assuming the base class has some default functionality in place for this interface function and you simply don’t want it to be executed for a particular child class. If that’s the case then what you have is what you’re looking for as it should not execute the parent base functionality.
1 Like
Yes thanks. About interfaces in general does it work like global functions that accessible to any class ?
I’m not sure I understand the question exactly, however, it’s certainly accessible to any class that inherits from the interface class.
1 Like
I mean in general if I can create global function it will work like interface ?