Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Bevy Micro LDTK
Manage
Activity
Members
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Model registry
Analyze
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Microhacks
Bevy Micro LDTK
Commits
3dd73b79
Verified
Commit
3dd73b79
authored
1 year ago
by
Louis
Browse files
Options
Downloads
Patches
Plain Diff
Fix external level loading for non-root project files
parent
477d3b3a
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/ldtk/mod.rs
+5
-1
5 additions, 1 deletion
src/ldtk/mod.rs
with
5 additions
and
1 deletion
src/ldtk/mod.rs
+
5
−
1
View file @
3dd73b79
...
...
@@ -209,9 +209,13 @@ impl AssetLoader for LdtkLoader {
.map
(|
path
|
(
level
.identifier
.clone
(),
path
))
});
let
parent_path
=
load_context
.path
()
.parent
()
.map
(|
pp
|
pp
.to_path_buf
());
for
(
id
,
path
)
in
levels
{
load_context
.labeled_asset_scope
(
id
,
|
lc
|
{
lc
.load
::
<
Level
>
(
path
);
match
&
parent_path
{
Some
(
parent
)
=>
lc
.load
::
<
Level
>
(
parent
.join
(
path
)),
None
=>
lc
.load
::
<
Level
>
(
path
),
};
});
}
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment