Page 1 of 1

Issues after moving project

Posted: Sun Apr 30, 2023 1:38 pm
by robloxillian
I'm running into some issues after moving my project to a new computer and re-importing the pixelcrushers plugin. One warning I get is:

"The referenced script on this behaviour (Game Object 'Subtitle Text') is missing!"

This happens at PixelCrushers.DialogueSystem.DialogueSystemController:GetDialogueUI(). I can see that DialogueManager loads the DialogueCanvas at launch and populates its children, but I'm not sure what change I need to make to these children to fix the warning.

The other issue happens when I start a conversation in game. I get a null reference exception at PixelCrushers.DialogueSystem.ConversationView:StartSubtitle(Subtitle, Boolean, Boolean) at line 16. It seems like it's unable to find a Typewriter. Where should I set one?

Re: Issues after moving project

Posted: Sun Apr 30, 2023 4:46 pm
by Tony Li
Hi,

Are you using TextMesh Pro? If so, check the Dialogue System Welcome Window. You probably need to tick the TMP_PRESENT checkbox and any others that are missing. Next time you move a project, make sure to include the Packages and ProjectSettings folders to copy over the Scripting Define Symbols.

If you've saved anything (including opening a prefab such as a dialogue UI), check any UIs that use TextMeshProUGUI elements. Make sure the assignments are still correct, such as the StandardUISubtitlePanel's Subtitle Text field.

Re: Issues after moving project

Posted: Mon May 01, 2023 8:27 am
by robloxillian
Thank you. Looking at the subtitle text field, I do see that for its typewriter component, it says "the associated script can not be loaded. Please fix any compile errors and assign a valid script." The script is my custom script which inherits from UnityUITypewriterEffect. However, looking at my custom script, there don't seem to be any compile errors, and it does eventually inherit from Monobehavior. I'm wondering if I'm using an outdated way of setting up the typewriter effect. What is currently the correct process for doing so?

Re: Issues after moving project

Posted: Mon May 01, 2023 8:49 am
by Tony Li
Are there any errors or warnings in the Console window? (Make sure you're not filtering out visibility of warnings or errors.)

As a test, can you add the original UnityUITypewriterEffect to a GameObject?

Re: Issues after moving project

Posted: Mon May 01, 2023 2:46 pm
by robloxillian
That does solve the problem, though now I'm running into an issue where some (but not all) conversations do not end when the text has finished displaying. I also noticed that my custom typewriter class does not show up as a possible script when I try to add it to a gameobject. What does the process look like for setting a custom typewriter?

Re: Issues after moving project

Posted: Mon May 01, 2023 2:56 pm
by Tony Li
Just add it. If you moved the script without its corresponding .meta file, its Unity GUID would have changed, which means the subtitle text GameObject wouldn't be able to find the script any more. That may be what happened.

Re: Issues after moving project

Posted: Wed May 03, 2023 4:32 pm
by robloxillian
Thank you! I recreated it and everything seems to be working now. Regarding the issue where a conversation wouldn't end, it was because there was an "END" node with no scripts, text, etc. Deleting that node fixed the issue.

Re: Issues after moving project

Posted: Wed May 03, 2023 5:14 pm
by Tony Li
Glad you got it working!