Build Error

So I’m fallowing everything in the Dialogue script, I had a question about this error I was having in a build.
I’ve taken the Dialogue system and made a kinda test room for Test people to interact like walking up to a shop keeper in Ori or Dust and for some reason it’s not adding the scripted object Dialogue web to the build it only seams to work in Unity Editor and not a stand alone build.

Am I doing something wrong on making a build or is there something I can do to fix it?

I can’t remember the lecture, but there is an issue we didn’t take into account that OnValidate() is not called in a built game. The simple fix for this is to make sure that you call OnValidate() in Awake() (make sure that Awake() is not in the #if UNITY_EDITOR block.)

So instead of Void Awake calling the players Converstaion it should be Void OnValidate?

No, in the Dialogue.cs, you’ll be adding this:

void Awake()

Or if you already have an Awake method, add OnValidate(); as the first line of the method.

1 Like

This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.

Privacy & Terms