Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 9 additions & 1 deletion Packages/Ink/InkLibs/InkRuntime/Story.cs
Original file line number Diff line number Diff line change
Expand Up @@ -1816,7 +1816,15 @@ public void ChooseChoiceIndex(int choiceIdx)
public bool HasFunction (string functionName)
{
try {
return KnotContainerWithName (functionName) != null;
Container container = KnotContainerWithName (functionName);
if(container != null) {
return container.content.Any(c =>
c is Ink.Runtime.ControlCommand controlCommand &&
controlCommand.commandType == ControlCommand.CommandType.PopFunction
);
} else {
return false;
}
} catch {
return false;
}
Expand Down