Suppose I have two independent plugins.
Suppose I want them both to compile standalone so that I can put them both to the marketplace (or just support them independently by two unrelated teams).
Suppose these two plugins have some bonus ful-plate-set functionality, that involves both of them. So both plugins, being compiled separately and independently, still must be able to communicate if they meet each other.
The first way is delegates, I get it, but delegates are just function calls, generally. So it solves the problem, but the solution will be a little bit noisy and hard to understand/support, as I see it. OOP is nice.
On the other hand there are interfaces, which promise the beautiful and robust solution, just what you need. Class, methods, properties.
The problem is that with delegates it’s directly stated, that equal-load delegates, wherever they were declared and however they were called, are made equal. So delegates with the same parameters always connect.
While reading docs on Interfaces I assume that you can’t redeclare the same interface under another name in another module, and then Cast and use it’s instance “blindly”. Am I getting it right, Interfaces are incapable of blind binding? So they are, effectively, just a weird reproduction of C++ inheritance system?
After reading docs several times I, honestly, could not find the point, where UInterface gives me something above basic C++ inheritance, except that UObject does not really support C++ inheritance, so this UInterface hack allows you to overcome this limitation. Probably. Perhaps some blueprint-related feutures, ok, but will this solve my problem?
So, can I declare two identical interfaces by different names and then Cast? Because if it can it’s a whole different story.