Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Exporting to output within project folder creates pck with embedded .deps.json contents if export folder is not empty. C# version #96035

Open
jcvw75 opened this issue Aug 24, 2024 · 4 comments

Comments

@jcvw75
Copy link

jcvw75 commented Aug 24, 2024

Tested versions

Tested in latest 4.3 C# release 64-bit.

System information

Godot v4.3.stable.mono - Windows 10.0.19045 - Vulkan (Forward+) - dedicated NVIDIA GeForce GTX 1650 SUPER (NVIDIA; 32.0.15.5599) - AMD Ryzen 3 3100 4-Core Processor (8 Threads)

Issue description

if i have a C# project say d:\godotprojects\helloworld and if i export to d:\godotprojects\helloworld\export\ , the first time I get proper .pck file , say 10kb if the export folder is blank. But if I export again (no changes to settings or code) to the same export folder, it will create 40kb .pck file because *.deps.json gets embedded into the .pck file.

This does not happen if i export to folders outside of d:\godotprojects\helloworld\

Steps to reproduce

Just a simple 2D project, create a button, and a sprite2d. Attach script to scene, connect event to button to turn sprite visible/invisible by toggling the .visible property.

Must be C# code.

Minimal reproduction project (MRP)

using Godot;
using System;

public partial class main : Node2D
{
	// Called when the node enters the scene tree for the first time.
	public override void _Ready()
	{
	}

	// Called every frame. 'delta' is the elapsed time since the previous frame.
	public override void _Process(double delta)
	{
	}
	
	private void _on_button_pressed()
	{
	// Replace with function body.		
		Sprite2D sprite = GetNode<Sprite2D>("logo");
		sprite.Visible = !sprite.Visible;
	}
}
@AThousandShips
Copy link
Member

Please create a project for an MRP, this is something that could easily be a configuration issue so getting all the details of what your case is is important

@jcvw75
Copy link
Author

jcvw75 commented Aug 24, 2024

I attach the project zip file (without the .godot contents) with the \export\ folder blank. Export to that folder 1st time, look at the .pck file, then export again and watch the .pck file grow.

hello43.zip

@raulsntos
Copy link
Member

Likely a consequence of #65295 since JSON files are now imported as Resources, and by default every Resource is included in exports. You should be able to exclude these JSON files using the exclude filters:

Alternatively, you could try adding an empty .gdignore file to the export folder. This will prevent Godot from importing any of the Resources in that directory.

@jcvw75
Copy link
Author

jcvw75 commented Aug 25, 2024

Likely a consequence of #65295 since JSON files are now imported as Resources, and by default every Resource is included in exports. You should be able to exclude these JSON files using the exclude filters:

Alternatively, you could try adding an empty .gdignore file to the export folder. This will prevent Godot from importing any of the Resources in that directory.

But it's grabbing data from the destination export folder in export\data_hello43_windows_x86_64\*.json

This shouldn't happen. You should not be taking data from the output path specified. I tried to export to the same path but delete the .json files in data_hello43_windows_x86_64 and sure enough pck file doesn't get packed with the json.

But it only works if the export path is within the project folder. It doesn't work if the export folder is outside the project folder.

The behaviour of when to pack in the json files are inconsistent.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants