From 7036629577937e69c8f0b96c2aed17b3818d65b7 Mon Sep 17 00:00:00 2001 From: Cake <65981767+CakeVR@users.noreply.github.com> Date: Fri, 26 Jan 2024 10:15:03 +0100 Subject: [PATCH] Add entry about freezes when loading timelines. --- documentation/faq.md | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/documentation/faq.md b/documentation/faq.md index 31909b1..9db6278 100644 --- a/documentation/faq.md +++ b/documentation/faq.md @@ -71,3 +71,17 @@ if Dialogic.Text.is_textbox_visible(): else: Dialogic.Text.show_text_boxes() ``` + + +## I encounter a small lag or freeze when starting the dialogue! + +Preloading a style can be very useful using its `prepare` method.\ +This can be called on all styles you will need during the splash screen of your game. + +```gdscript +var style: DialogicStyle := load("res://path/to/my/style.tres") +style.prepare() +``` + +Last, be aware that Godot's shader compiler runs on demand; whenever new shaders need to be loaded in a style, it will compile, causing a freeze.\ +Hence, it's recommended to compile these ahead of time if you still run into problems still.