Skip to content

Change the scene without code

When something happens in a scheme, an object in your scene reacts: a door opens, a banner appears, a light goes out.

  1. Create a signal with Create > MrW > Intrigues > Signal. In Description, write when it is sent and what should react.
  2. In the scheme, add a Send Signal node where the thing happens, and pick your asset in Signal. The field has a New button.
  3. In the scene, add Add Component > Intrigues > Signal Receiver to an object that stays active.
  4. Click Add Reaction and choose your asset in Signal.
  5. In Do This, add an action to the Unity event, for example the object to show and its SetActive call with the box checked.
  6. Play the scene and run the scheme.

The reaction runs when the signal is sent.

The receiver reads Listening for signals. Every reaction to the signal runs, from top to bottom.

The asset’s Inspector lists the nodes that send it under SENT BY and the receivers under LISTENERS IN OPEN SCENES. In Play mode, Send Now sends the signal by hand, and Run Now on a reaction card runs that reaction as if the signal had come. The card says how often it ran, or not run yet.

For a sound, the Play Sound node plays one straight from a scheme, with no receiver. Its Audience starts as Players Taking Part, so it plays only when a player takes part. A reaction can also call AudioSource.Play on a scene object, since Do This is a Unity event.

  • A reaction with no signal never runs. The card says so.
  • The object is switched off. A receiver on an inactive object, or with its component off, does not listen. It can still switch another object on.
  • A reaction switches off the receiver’s own object. After that the receiver stops listening. The card warns.
  • The effect is gone after a load. Reactions are not saved, so send the signal again from On Game Loaded, as in Restore the scene after a load.
  • An action fails. It is logged, the later actions of that reaction are skipped, and the other reactions still run.
  • Send Signal with no signal chosen shows Sends nothing and an error.