djblooky / WitchesBrew

MIT License
0 stars 0 forks source link

Randomizer will break when leaving a scene and returning #81

Closed TheAlexanderEnriquez closed 3 years ago

TheAlexanderEnriquez commented 3 years ago

Leaving and returning to a scene with the randomizer implemented will cause the game to give a NullRefrenceException error. Folder I made to test this is the RandomTest folder. In order to recreate this error, go to RandomTest4, create empty object, place randomizer script in it, go to order manager and put object with the randomizer into "Randomize Order", run the game (not sure if this step is actually needed), save the scene, leave to another scene (any scene) and come back to RandomTest4.

dantogno commented 3 years ago
TheAlexanderEnriquez commented 3 years ago

In master branch:

  1. Navigate to RandomTest4 (Assets > Scenes > RandomTests)
  2. Create empty object
  3. Put RandomizeOrder script in empty object
  4. Go to OrderManager in the Hierarchy
  5. Put object with RandomizeOrder script into randomizeOrder field
  6. Click play, you may stop it at anytime.
  7. Save RandomTest4 scene
  8. Go to any other scene file in Unity project
  9. Return to RandomTest4 scene file