mirror of
https://github.com/bevyengine/bevy
synced 2024-11-22 04:33:37 +00:00
Implement source into Display for AssetPath (#10217)
# Objective When debugging and printing asset paths, I am not 100% if I am in the right source or not ## Solution Add the output of the source
This commit is contained in:
parent
60773e6787
commit
f9ef989def
1 changed files with 3 additions and 0 deletions
|
@ -67,6 +67,9 @@ impl<'a> Debug for AssetPath<'a> {
|
|||
|
||||
impl<'a> Display for AssetPath<'a> {
|
||||
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
|
||||
if let AssetSourceId::Name(name) = self.source() {
|
||||
write!(f, "{name}://")?;
|
||||
}
|
||||
write!(f, "{}", self.path.display())?;
|
||||
if let Some(label) = &self.label {
|
||||
write!(f, "#{label}")?;
|
||||
|
|
Loading…
Reference in a new issue