Hello, I'm trying to call a function from a class of an object. I have the Object but no clue to access the right Component.
A little Example:
Thats the Method I want to Call from this:
I cant call it with GetComponent() because it should work with any other class as well. When I call the Method, I know the Method is there because every class from Effect has this one, but I dont know the concrete Name of the Class.
Hope you can Help.
Are you saying that all of your effects inherit from
If you're having trouble understanding the above, you may want to read up on polymorphism, which is one of the most important principles in object-oriented programming. For starters, here's an MSDN guide on override methods.
And, finally, if you can't get that working, there is always
answered Jun 23 '12 at 06:59 PM