Hello, I’ve noticed that a generic function for a type only pops up if the constraint is :class, :Object, :Component, :MonoBehaviour. It doesn’t work if the constraint is a :ScriptableObject and its derivatives. The types for ScriptableObject pop up if :Object or :class is the constraint.
Is this an issue or am I missing something? Thanks in advance!
Hmm. I’ve just tried and the methods show up fine.
Does the method you try to call has any return value or parameters?
Also is the type wherein the method is declared added to the Preferred Types list?
Hello,
It doesnt really have to do with the constraint being a ScriptableObject. The problem is that that specified method does not have any return value, neither a parameter and I can confirm that generic “void” methods with no parameters do not show up in the browser. On the other hand however and in a real case, you will either have a return value or a parameter since we are talking about generic methods specifically. I will take a look at this however.
Let me know 🙂
Indeed, the browser does have all the functions, even the void one with no parameters. The problem was that the context menu for methods for that class (when dragging from a port that is that class) defaults the generic <T> to the class itself. Since the class isn’t a scriptable, the other methods don’t show up.
Thanks a lot, overall this is an amazingly built asset.
P.S : If you are Greek, “Σε ευχαριστώ φίλε, το asset είναι πολύ καλοφτιαγμένο :P”