// this is code
public class Foo1Parent
{
}
public delegate void CallBack<T>(T arg1);
public delegate void CallBack();
public class Foo
{
public void openWindow<T>(CallBack<T> onWindowAwake) where T:Foo1Parent
{
Debug.Log("test");
onWindowAwake(T);
}
//I use reflection to call methods "openWindow"
public void openCWindow(CallBack onback, string dialogName)
{
Type t = Assembly.GetExecutingAssembly().GetType(dialogName);
MethodInfo meth1 = this.GetType().GetMethod("openWindow");
object[] obj = new object[] { null }
meth.Invoke(this, obj );
}
} //
Blockquote
The parameters of a generic is CallBack onWindowAwake I don't know how to do it