Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit c2087b1

Browse filesBrowse files
committed
feature: Warn on unknown language.
1 parent 040cc4a commit c2087b1
Copy full SHA for c2087b1

File tree

Expand file treeCollapse file tree

1 file changed

+8
-0
lines changed
Filter options
  • crates/bevy_mod_scripting_core/src
Expand file treeCollapse file tree

1 file changed

+8
-0
lines changed

‎crates/bevy_mod_scripting_core/src/asset.rs

Copy file name to clipboardExpand all lines: crates/bevy_mod_scripting_core/src/asset.rs
+8Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -225,6 +225,14 @@ pub(crate) fn dispatch_script_asset_events(
225225
let script_id = converter(path);
226226

227227
let language = settings.select_script_language(path);
228+
if language == Language::Unknown {
229+
let extension = path
230+
.path()
231+
.extension()
232+
.and_then(|ext| ext.to_str())
233+
.unwrap_or_default();
234+
warn!("A script {:?} was added but its language is unknown. Consider adding the {:?} extension to the `ScriptAssetSettings`.", &script_id, extension);
235+
}
228236
let metadata = ScriptMetadata {
229237
asset_id: *id,
230238
script_id,

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.