I am using this script:
http://wiki.unity3d.com/index.php/CSharpMessenger_Extended
but it throws this warning:
Assets/Messenger.cs(173,28): warning CS0693: Type parameter T' has the same name as the type parameter from outer type
Messenger’
Anyone knows how to fix this?
Thanks in advance.
rutter
October 3, 2014, 3:23am
2
It’s complaining about this function signature:
static public void RemoveListener<T, TReturn>(string eventType, Func<T, TReturn> handler) {
In this case, specifying the T
type on the function is redundant because it was already taken care of at the class level.
You should be able to run with this:
static public void RemoveListener<TReturn>(string eventType, Func<T, TReturn> handler) {
I’ll see about getting that fixed on the wiki, too.