YarnSpinnerTool / YSDocs

Source code to the documentation for Yarn Spinner.
https://docs.yarnspinner.dev
6 stars 27 forks source link

Unity: Dialogue Advance Input doc page instructs to put the Dialogue Advance Input component on a new game object instead of the Line View #57

Open hsandt opened 4 months ago

hsandt commented 4 months ago

Page: https://docs.yarnspinner.dev/using-yarnspinner-with-unity/components/dialogue-view/dialogue-advance-input

says:

Dialogue Advance Input isn't a Line View itself, but it's designed to work with other line views, to interrupt and control the flow of dialogue.

To use a Dialogue Advance Input, create a new game object, and attach a Dialogue Advance Input component to it using the Add Component button.

instructs to put the Dialogue Advance Input component on a new game object. But looking at the code:

        internal void Start()
        {
            if (dialogueView == null)
            {
                dialogueView = GetComponent<DialogueViewBase>();
            }
            ...
        }

it should be placed on a game object that already has some DialogueViewBase child class component. In this case, the Line View with a LineView component, on the Dialogue System prefab instance.

I tried it and it worked. It should be explained, esp. as there is also the Options List View game object with an OptionsListView component that inherits from DialogueViewBase.