Hi,
I am little bit confuse in type casting through Generic Type.
Here in my below code if my mainClassObject of Type T is a type of SignInEventHandler. I want to typecast T in SignInEventHandler type so i can access the SignInEvenHandler Members.
Here SignInEventHandler is a Monobehaviour Class.
public override IEnumerator OnButtonClickEvent (Button buttonType, T mainClassObject){
//...............if mainClassObject type is SignInEventHandler...........//
if (mainClassObject.GetType () == typeof(SignInEventHandler)) {
// i want to do something like this//
SignInEventHandler signIn = (SignInEventHandler)mainClassObject.
}
yield return new WaitForSeconds (0.0f);
}