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

.ogg files path change after Exporting game #70266

Closed
LavandePotions opened this issue Dec 18, 2022 · 1 comment
Closed

.ogg files path change after Exporting game #70266

LavandePotions opened this issue Dec 18, 2022 · 1 comment
Labels

Comments

@LavandePotions
Copy link

LavandePotions commented Dec 18, 2022

Godot version

3.5

System information

Windows 10

Issue description

With gdscript you can load an .ogg file by its path like this one :

var music_path = 'res://Symphony-Nr-5-in-C-Minor-(1st-Movement).ogg'

But when you export the game, without telling you, Godot change the path inside the .pck from .ogg to .oggstr with some md5 hash

var exported_path_in_pck = 'res://.import/Symphony-Nr-5-in-C-Minor-(1st-Movement).ogg-ddee16cf28ebd776db9cd88d611ab1f8.oggstr'

I had to load the .pck with GodotPckExplorer to notice the change.

After some discutions on the Godot Engine Discord, one the Godot dev tell me :

Godot does some preprocessing on the ogg stream [...], so the preprocessed-serialized stream gets put into an oggstr file and then that's what gets included in the export

Steps to reproduce

  1. Import an .ogg file.
  2. Export the game.
  3. Open the .pck file (with program like GodotPckExplorer)
  4. Compare the path before and after export.

Minimal reproduction project

In this project there is one scene with an AudioStreamPlayer
The .ogg file is loaded by script

image

Run from the editor the game load the .ogg correctly.
But if you run the exported .exe the .ogg path is broken.

GodotOggExportIssue.zip
or link to the repo
https://github.com/LavandePotions/lpGodotOggExportIssue

@KoBeWi
Copy link
Member

KoBeWi commented Dec 18, 2022

Duplicate of #25672
Use load() and ResourceLoader.exists() for files within the project.

@KoBeWi KoBeWi closed this as not planned Won't fix, can't repro, duplicate, stale Dec 18, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants