How can I make a skip button in a storytelling in fungus?

Hi, my game has storytelling at the beginning of the game only, but I cannot create a skip button for the users to use such a button if they got bored with the storytelling. I hope anyone helps me out. Thanks a lot!

First, create a block that will be called when skipping intro. Let’s name it “Skipping”.

You can put it in your current flowchart or in another one, as you like.

Put whatever you want in this block (or even nothing) ; you’ll probably want to put a call to a method that starts the actual gaming.

Then create your Skip button in a canvas.

Now create the following script that you can attach to whatever you want, an empty GO or even the button itself.

Don’t forget to populate its fields in the inspector : choose the flowchart, and type the name of the block you want to reach (we named it “Skipping”).

Finally, call the SkipIntro() method of this script in your button’s OnClick event.

The script :

using UnityEngine;
using Fungus;

public class Example : MonoBehaviour {

    public Flowchart skipFc;
    public string skipBlock;

    public void SkipIntro() {
        skipFc.ExecuteBlock(skipBlock);
    }
}