-
-
Notifications
You must be signed in to change notification settings - Fork 15
Unreal
Julian Benda edited this page Jul 21, 2022
·
4 revisions
For the usage in Unreal a plugin is provided which allows including ink json files as assets.
Its provides the following objects:
- AInkRunner: loading a story and managed threads
- UInkThread: can be started by connecting to a story. Has different Events which can be triggert, most important:
- OnLine(FString line, const TArray& tags): a line of story output was generated attention: tags are collected until a choice is taken, then cleared if this is a bad way to handle it feel free to state your opinion in a github issue
- OnChoice(const TArray<UChoice*>& choices): a choice is to be taken, this are the options.
- PickChoice(int index): select a choice
- UChoice: a choice to select
- GetIndex() get index for PickChoice
- GetText() get text contained in the choice
- FInkVar: because the plugin must be compiled without knowlagde of the usage, template decution is no way to for determining external function arguments. Therfore all external functions must take FInkVars, which then can be queryied what kind of type they include, and this type can be readed.