I have a dialogue in which the last dialogue entry triggers a scene transition. It transitions well but the dialogue system won't trigger any of my BoltEvents in the new scene. It gives me the error:
Dialogue System: Lua code 'BoltEvent("Target", "PressButton")' threw exception 'Tried to invoke a function call on a non-function value. If you're calling a function, is it registered with Lua?'
UnityEngine.Debug:LogError (object)
Do I have to manually change something before transitioning to the next scene? I'm not using the save system so I guess it uses Unitys scene manager, right?
I've added a Dialogue System Saver, PlayerPrefs Saved game Data Storer, a Json Data Serializer and the Save System Component to the DIalogue Manager now. So now it should automatically use your save system, right?
Unfortunatelly it still gives me the same Lua-Error.
Did you add the DialogueSystemBoltLua script to your Dialogue Manager? Or did you add it to a GameObject in the first scene that gets destroyed when you leave the scene? If you added it to a GameObject in the first scene, try adding it to the Dialogue Manager instead.
Hi Tony,
The Dialogue System Bolt Lua component is already added to the dialogue manager. I just played the scene with the Dialogue Manager set to Info and there is nothing about it unregistering the Bolt Functions in the console.
I use the "LoadLevel()" sequencer command to switch scenes.
When I try to untick the Dont destroy on Load checkbox on the DM it doesn't let me because of the save system. I've attached a screenshot on the previous post. Shouldn't I put the save system on the DM then?
Ok, sry I missread the part about "dont destroy on load".
Both of the components you mentioned are only on the DM.
Would it be possible to manually reregister the Bolt Lua functions per script in the new scene?
Unfortunatelly I can't code and I only use Bolt so I'm really lost right now. I'm sorry to take up so much of your time, but your help is much appreciated.
There was another object with the "DIalogue System Bolt Lua" component on it which caused the Functions to be unregistered when the scene transition happened because it only existed in the first scene.
I'm so sorry to have taken up your time Tony.
I don't know if you already mentioned this in the documentation, but just so coding dummies like me won't bother you in the future. Maybe you could mention somwhere that there only should be a "DIalogue System Bolt Lua" component on the DM and nowhere else in the scene.
Thank you so much for your time and again, thank you for creating this great asset so even dummies like me can create games!