SceneAction - CodingDino/Dino-Unity-Toolkit GitHub Wiki

The SceneAction component unloads the current scene and loads a new one. It can also be used to reload the current scene. This is used primarily for doors, start buttons, and player death.

This is an Action component, and therefore must be triggered by a separate Activator component. Actions, Activators, and Data make up the core system for the Dino Unity Toolkit.

Image: SceneAction attached to an enemy. It is triggered by an OnCollision2DActivator component when the player touches the enemy.

Actions

This component has several Action functions that can be triggered by Activators.

ActionLoadScene()

This action will load the specified scene. This name must match the name of the scene EXACTLY to work. The scene must also be added to the build settings - do this by going to File > Build Settings, and drag the scene file from your project panel into the scene list.

Parameter: Description:
Scene To Load The name of the scene that should be loaded. This must match the scene's name EXACTLY.

ActionReloadCurrentScene()

This action will reload the current scene. The scene must still be added to the build settings - do this by going to File > Build Settings, and drag the scene file from your project panel into the scene list.