hello everyone,
I made a couple of object and assigned to there inspector other objects.
I am trying to create a dialog that would run immediately as I enter a scene.
it works fine in unity but when I build it the dialog won’t show. My dialog is assigned to a “GameManager” object the is not destroyed on load.
Thanks in advance.
Well, I’m going to take a shot in the dark here and guess three things:
- You’re using UI and have improperly placed anchors.
- You’re using GameObjects that are inside of an Empty Object that wasn’t reset before “childing” the objects.
- Your Objects were SetActive(false) but never reset back to true.
You could provide some code and/or screen shots and I’ll be able to help more.
Thank you for responding,
I made a couple more tests and here is what I got:
I have multiple scene when first running the game (intro scene > menu scene > start new game scene). when I run only the ‘start new game’ scene in unity it works fine and the dialog pops up. However when I’m trying to get get to the ‘start new game scene’ from the beginning (intro scene > menu scene > start new game scene) I get the following error:
The referenced script on this Behavior (Game Object '<null>') is missing!
(‘test’ is the name of the dialog)
my dialogs are created using CreateAssetMenu
which refers to my dialog
I hope that is more clear now

Ok, you’re using a scriptable object, I see that now. You need to show me how you’re trying to access this entity in code. Basically, what are you trying to do with it? I need to see this to help you. Otherwise, I can tell you that it looks as though you’re trying to make this a MonoBehavior and attach it to a game object. You can’t do this with a scriptable object. However, you can access this object through a MonoBehavior script. I need to see your approach, how you tried to accomplish this.
If the file doesn’t exist, then perhaps you’ve given an incorrect path value?
I cannot tell based upon what you’ve shown me.
I have a scriptable object name dialog:
[CreateAssetMenu(fileName = "New Dialogs", menuName = "Dialog")]
public class Dialog : ScriptableObject
{
public string myName;
public Sprite Image1;
public Sprite Image2;
public string myText;
public Dialog[] dialogInfo;
}
here I create some dialog, I then made another class that is called multiDialogs which contains the Dialog object.
[System.Serializable]
public class multiDialog
{
public Dialog dialog;
public string Character;
public string Outfit;
}
And finally I have a regular object that have a list of the multiDialog object in which I fill all variables (‘character’ , ‘Outfit’) and I drag the dialogs that I made in the inspector into the dialog variable. but when I run it I get the error that I showed you, I don’t know if it means anything but once I open the dialogs that I made and let’s say edit them (just adding space somewhere) then I can suddenly see that it is working. but when I switch to a new scene and play it again I get the same problem again and I have to open the dialog once more.
I hope it is more clear now
Hi @Timbon77
You should have made more precise question; you don’t even mention ScriptableObjects neither your exact setup and steps you took, and what you did in your original post. But based on your last post…
Error message image.
This could be because you renamed the Dialog ScriptableObject class, it is missing or it is not compiling because of an error. Try to create one more and see if you can create new asset file out of it. If you can, then the issue is probably one of the previous ones.
“multiDialog” class.
Your code isn’t even creating a ScriptableObject - as it is not derived from ScriptableObject class? You have marked it as System.Serializable, it is just a typical class. So did you mistakenly call it a ScriptableObject?
You also say you have a “regular object that have a list of the multiDialog object”, but it can’t be just a GameObject like you say, it must be a MonoBehaviour script where you have this list, but you didn’t show it.
Anyway, if you have created ScriptableObject asset files from your Dialog class, you should be able to drag those into scene object or prefab that has your multiDialog fields (which should be also named MultiDialog).
@eses said it best.
So your setup is something like this? It should work just fine, as all the Dialogs are asset files, and so are the linked other Dialogs, if DialogLine1 has references to other Dialogs, those too should persists, as all of these connections are serialized in assets AFAIK. At least it works here just fine.

Maybe there is something else going as you say you have the problem in your build. Which platform you are targeting?
Thank you eses for responding, sorry for not been to specific about the problem, its because I didn’t know what it was myself. I tried to create a new dialog like you said and everything worked fine.