Exemplo n.º 1
0
    public void OnEnable()
    {
        dialogue = target as Dialogue;

        gameObject = EditorUtility.CreateGameObjectWithHideFlags(
            "Dialogue Preview",
            HideFlags.HideAndDontSave,
            typeof(AudioSource)
            );

        source          = gameObject.GetComponent <AudioSource>();
        editorCoroutine = EditorCoroutine.Setup();

        dialogue.SubtitleSystem.OnShowText  += this.OnShowText;
        dialogue.SubtitleSystem.OnClearText += this.OnClearText;
    }