Issues after moving project

Announcements, support questions, and discussion for the Dialogue System.
Post Reply
robloxillian
Posts: 27
Joined: Mon Sep 13, 2021 6:55 pm

Issues after moving project

Post 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?
User avatar
Tony Li
Posts: 21684
Joined: Thu Jul 18, 2013 1:27 pm

Re: Issues after moving project

Post 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.
robloxillian
Posts: 27
Joined: Mon Sep 13, 2021 6:55 pm

Re: Issues after moving project

Post 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?
User avatar
Tony Li
Posts: 21684
Joined: Thu Jul 18, 2013 1:27 pm

Re: Issues after moving project

Post 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?
robloxillian
Posts: 27
Joined: Mon Sep 13, 2021 6:55 pm

Re: Issues after moving project

Post 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?
User avatar
Tony Li
Posts: 21684
Joined: Thu Jul 18, 2013 1:27 pm

Re: Issues after moving project

Post 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.
robloxillian
Posts: 27
Joined: Mon Sep 13, 2021 6:55 pm

Re: Issues after moving project

Post 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.
User avatar
Tony Li
Posts: 21684
Joined: Thu Jul 18, 2013 1:27 pm

Re: Issues after moving project

Post by Tony Li »

Glad you got it working!
Post Reply