Refresh After You Upload to S3!
Objective: Reset your scene after you upload your files!
In the previous tutorial we set up our app to be able to upload .dat files to S3. Now, after we upload the case, we want to return to the main menu. Instead of deactivating the panels and returning to the menu that way, I suggest we reset the scene to keep everything in the state it is when it is first loaded in.
Inside the overview panel we are going to determine if we successfully done this. Inside the AWS Manager class, upon completion we can reset the scene. First, we need to access the Scene Manager so we need to add the namespace.
Now that we have access to the Scene Manager we can control the scenes. When we successfully upload to the server we check if the exception is null. If it is null then we can load the default scene.
Head into the Unity build settings and make sure your scene is listed and is the right int value that you are calling.
Now when you press the submit button we will reload the scene which will bring us back to the main menu where we could create a new case or find a case.
I’ll see you in the next tutorial!