Hi,
I am using EasyTouch to trigger the MaterialUI transition function, but I am getting a null reference error on the line where I call it.
public Gesture thisGesture;
private static bool swiped;
public static ScreenView screenView;
void OnEnable () {
EasyTouch.On_SwipeEnd += On_SwipeEnd;
}
void OnDestroy () {
EasyTouch.On_SwipeEnd -= On_SwipeEnd;
}
public void On_SwipeEnd(Gesture gesture){
if (gesture.isOverGui){
if (gesture.pickedUIElement == gameObject){
print ("This works");
swiped = true;
StartCoroutine(waitTransition(swiped));
}
}
}
IEnumerator waitTransition(bool swiped){
if ( swiped == true) {
print ("this also works");
yield return new WaitForSeconds (.05f);
screenView.Transition ("screenTwo", ScreenView.Type.In);
}
}
}
Both print line statements go to the console. I'm getting a Null Reference Error on this line
screenView.Transition ("screenTwo", ScreenView.Type.In);
What am I doing wrong?