I am trying to simulate the case in where the user has no internet connection, so that i can show him a message asking him to check his connection and press the retry button.
What I am doing right now is, on the EventListenerAssetsManagerEx call a method that shows a button when i get the “EventAssetsManagerEx::EventCode::ERROR_DOWNLOAD_MANIFEST” Error.
Then on that button press i can’t seem to get the update to refresh.
I have tried:
_am->update();
and
_am->downloadFailedAssets();
But none call my EventListenerAssetsManagerEx again.
I also tried releasing it and recreating it. but that doesnt call the listener again either. Am i supposed to create a new listener? I thought the listener is not connected to the assets manager instance since its directly added to the event dispatcher so it should be able to listen to any asset manager instance as long as i don’t unregister it:
Director::getInstance()->getEventDispatcher()->addEventListenerWithFixedPriority(_amListener, 1);