#Creating a chat, messages show up in the editor, but not when the game runs.

45 messages · Page 1 of 1 (latest)

hearty delta
#

I' m working on a chat box and for some reason when I send messages, they don't show up.
If I add the messages as an object in the editor, they show up. (Picture 1)
I can add more and they correctly get displayed. (Picture 2)
But, when I run my scene, the message doesn't show up. If went into the debug tool, and the messages are correctly added by the code I created. (Picture 3)

If have the feeling it has something to do with the sizes. Like the object is added, but the size is x:0, y:0 (the debug tool says it is correct but I have a feeling some setting that is outside of my knowledge is overwriting it), which results into the chat message not showing. Does someone have some idea what problem it is or how I can debug this?

paper orbit
#

Hey this could be an issue with container sizing. You're adding your message node to a container, so the container controls its size. Play around with these values, maybe:

#

Although it seems strange that in editor it shows up fine.. maybe it's something else

#

Have you set a minimum size on your ScrollContainer?

hearty delta
#

Hey! Thank you so much for taking the time to help me out! Ill check the minimum size on my scrollcontainer right now

#

Minimum size is both 0

#

for x and y

#

All containers have a minimum size of x:0 and y:0 (and with all containers i mean the ScrollContainer, MarginContainer, HBoxContainer)

#

My ChatBox container has the folllowing Container Sizing settings:

#

If I play around with the Container Sizing like you mentioned, I sadly still don't get the messages showing up in the game (it still works in the editor)

#

If it can maybe help, I made a short video on all the settings and that it works in my editor but no when I load up the game:

#

Oh wait, I just noticed is doesnt not show the whole screen, one sec

#

Is is a screen recording showing that it doesn't work in game, but does work in the editor

paper orbit
hearty delta
#

Oh amazing! Ill try this soon and let you know if I found the problem and how I fixed it

faint beacon
#

Your scroll container is hidden

#

@hearty delta

hearty delta
#

Wait is that it...

faint beacon
#

It's always the simple things that send us spiralling for hours

hearty delta
#

Yeahh that is why I want to figure it out and not restart haha

#

But this _h_scrolls shows up in the debug, how can I set this to visible again?

#

Oh wait, no I am looking wrong

faint beacon
#

Yeah, top node

#

Need a button to open chat or something similar

#

Or if it's supposed to be visible at all times, figure out what code is causing it to hide

hearty delta
#

Yeah my goal is to keep the LineEdit visible at all times, but when you type, the scroll containers shows up till the LineEdit is not focused anymore. So there is a timer that checks when you stop selecting the LineEdit, it will make it invisable again

faint beacon
#

Then I'd say that's where your issue lies

hearty delta
#

Yeah, Ill try to fix it now, hopefully that is it

#

No, sadly this is not the case...

#

I removed the whole part where it will go invisable, but still no chat

#

@paper orbit I also compared our project, but I see no difference accept you having 1920/1820 window sizes, and I have 240/135 window size

#

Oh no I found it I think..

#

I made 2 functions: HideChat, and ShowChat, In my Init function i did HideChat (so when the games start up, you dont instantly open chatbox. And here comes the dumb and (fun) part, I am never calling ShowChat..

paper orbit
#

Might wanna call ShowChat then 8)

hearty delta
#

Yeahhh hahha

#

Thank you so much for investing time into my problem @paper orbit and also @faint beacon for helping out. I think I can manage it from here

paper orbit
#

Great, no problem. Good luck with your project

hearty delta
#

Thank you so much!

#

Is there a way for me to finish this Thread by ending it? like marking it as complete?

paper orbit
#

Not sure.. i would guess you'd have to delete it

#

There doesnt seem to be a "completed" tag

hearty delta
#

Ah okay, then ill let it open for people that may come into similair issues

hearty delta
#

@paper orbit Oh I also liked to thank you for showing your chat code! I was also looking for a way to keep the scrollbar down and I saw it in your code. I see how you edited it and now I also implemented it :) Thank you!