DUNILOG  1.7
 All Classes Functions Variables Pages
How to control your story with events

1.) Standart:
Go to DUGManager->DUGModel component.
There you will find a list of all node and entry events which you published to the DUGManager.
You can hook up scripts or gameobjects in this list, which will be instantiated when your story reaches the node or the entry.
Please check the tutorial to see more details.

2.) Event based:
You can also use the programmatic way to handle this task (see code below)

using UnityEngine;
using System.Collections;
public class DUGEventTester : MonoBehaviour {
void Start()
{
DUGController.OnEnterNode += OnDUGEventHandle;
DUGController.OnStartDisplayEntry += OnDUGEventHandle;
DUGController.OnSelectEntry += OnDUGEventHandle;
DUGController.OnMaxSelectCount += OnDUGEventHandle;
}
void OnDUGEventHandle( DUGEventDataRunTime evtObj )
{
Debug.Log( evtObj.type+" | "+evtObj.node.name );
}
void OnDestroy()
{
DUGController.OnEnterNode -= OnDUGEventHandle;
DUGController.OnStartDisplayEntry -= OnDUGEventHandle;
DUGController.OnSelectEntry -= OnDUGEventHandle;
DUGController.OnMaxSelectCount -= OnDUGEventHandle;
}
}
See Also
DUGEventDataRunTime