Return/log an error when attempting to load an empty asset path.#23654
Open
andriyDev wants to merge 4 commits intobevyengine:mainfrom
Open
Return/log an error when attempting to load an empty asset path.#23654andriyDev wants to merge 4 commits intobevyengine:mainfrom
andriyDev wants to merge 4 commits intobevyengine:mainfrom
Conversation
greeble-dev
approved these changes
Apr 4, 2026
Contributor
greeble-dev
left a comment
There was a problem hiding this comment.
Looks good. I would tweak the message slightly - "Attempting to load an asset with an empty path" seems just a bit clearer - but it's not a big deal.
There's a few places that might be missing checks?
AssetServer::reload/reload_internal.LoadContext::read_asset_bytes.- Maybe
ProcessContext::load_source_asset- not sure about that case.
Contributor
Author
|
alice-i-cecile
approved these changes
Apr 4, 2026
kfc35
approved these changes
Apr 4, 2026
github-merge-queue bot
pushed a commit
that referenced
this pull request
Apr 4, 2026
…3656) # Objective - Not setting any value to a handle in BSN results in BSN attempting to load an empty path! This is not handled well (see #23654 for some fixes there). - Even with #23654, we would still get errors in the logs which is not ideal. ## Solution - Use the Handle variant for the template!
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Objective
Solution
load_folder. You could theoretically want to load the root folder!To address some alternative implementations:
AssetPathstill needs to be allowed to parse an empty path, since for stuff like joining asset paths, that needs to support cases like "only a subasset label", or "joining the empty path with some subdir path".Testing
AssetServer.