Create Your Own Controller

Copy

Create a script file on anywhere you are comfortable (outside of the package folder). Copy the contents of «Generic Case Controller» and paste it on your own script.

Change the class name with your own and change the namespace with yours or completely remove it.

Rewire

We are going to delete the «Generic Case Controller» from our panel and add our new script.

Some fields gone missing now because we deleted the script.

  1. Drag and drop your case controller on inspector (not the actual file) to On Animation Start and On Animation Complete fields. Then select the appropriate function from your controller from the dropdown.
  2. Select the Open Button from hierarchy and drop it on the Open Button field on your controller script.
  3. Click on the Open Button and drag Generic Case Opening Panel to button On Click field. Select your controller from the dropdown and select OpenCase function.
  4. Select one of the pre-made configs for Case Config field for testing purposes.
  5. And test opening the case.

We should have a functioning case with our own editable script at this point. Try Debug.Logging something out on animation complete!

Next we are going to create our own case contents.