0 votes

im adding some nodes (lables,containers etc..) via add_child
and when i run the project everything looks fine.
but on the executable i cant see those newly added nodes..

extends Control

func _ready():
var gamesScrollingList = $MainContainer/ScrollContainer/GamesList

var gamesList = get_from_json("GamesList.json")
for game in gamesList:
    var gameContainer = CenterContainer.new();
    var gameContentContainer = VBoxContainer.new()
    gameContentContainer.set("custom_constants/separation", 20)

    var labelToAdd = Label.new()
    labelToAdd.text = "Name: " + game.name
    labelToAdd.align = Label.ALIGN_CENTER

    var imgToAdd = TextureRect.new()
    imgToAdd.texture = getImage(game.cover)




func get_from_json(filename):
var file = File.new()
file.open(filename, File.READ)
var text = file.get_as_text()
var data = parse_json(text);
return data

func getImage(imagePath):
var img = Image.new()
var itex = ImageTexture.new()
return itex

this is in the engine(the scroller on the right side):
enter image description here

but in the exe its missing the scroller and the pics:
enter image description here

in Engine by (14 points)
edited by

A screenshot would be nice. I'd tell you for the looks of it you don't have the json file generated near your executable.

are you adding *.json files to the non-resources export list?

enter image description here

enter image description here

enter image description here

Please log in or register to answer this question.

Welcome to Godot Engine Q&A, where you can ask questions and receive answers from other members of the community.

Please make sure to read Frequently asked questions and How to use this Q&A? before posting your first questions.
Social login is currently unavailable. If you've previously logged in with a Facebook or GitHub account, use the I forgot my password link in the login box to set a password for your account. If you still can't access your account, send an email to [email protected] with your username.