Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
godot
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
community
godot
Commits
6389b68c
Unverified
Commit
6389b68c
authored
Jun 02, 2020
by
Rémi Verschelde
Committed by
GitHub
Jun 02, 2020
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #39214 from EricEzaM/improve-add-autoload-errors
Improved warning shown when autoload cannot be added.
parents
82da6aab
58caa2c4
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
3 deletions
+3
-3
editor_autoload_settings.cpp
editor/editor_autoload_settings.cpp
+3
-3
No files found.
editor/editor_autoload_settings.cpp
View file @
6389b68c
...
@@ -674,18 +674,18 @@ bool EditorAutoloadSettings::autoload_add(const String &p_name, const String &p_
...
@@ -674,18 +674,18 @@ bool EditorAutoloadSettings::autoload_add(const String &p_name, const String &p_
String
error
;
String
error
;
if
(
!
_autoload_name_is_valid
(
name
,
&
error
))
{
if
(
!
_autoload_name_is_valid
(
name
,
&
error
))
{
EditorNode
::
get_singleton
()
->
show_warning
(
error
);
EditorNode
::
get_singleton
()
->
show_warning
(
TTR
(
"Can't add autoload:"
)
+
"
\n
"
+
error
);
return
false
;
return
false
;
}
}
const
String
&
path
=
p_path
;
const
String
&
path
=
p_path
;
if
(
!
FileAccess
::
exists
(
path
))
{
if
(
!
FileAccess
::
exists
(
path
))
{
EditorNode
::
get_singleton
()
->
show_warning
(
TTR
(
"
Invalid path."
)
+
"
\n
"
+
TTR
(
"File does not exist."
));
EditorNode
::
get_singleton
()
->
show_warning
(
TTR
(
"
Can't add autoload:"
)
+
"
\n
"
+
TTR
(
vformat
(
"%s is an invalid path. File does not exist."
,
path
)
));
return
false
;
return
false
;
}
}
if
(
!
path
.
begins_with
(
"res://"
))
{
if
(
!
path
.
begins_with
(
"res://"
))
{
EditorNode
::
get_singleton
()
->
show_warning
(
TTR
(
"
Invalid path."
)
+
"
\n
"
+
TTR
(
"Not in resource path."
));
EditorNode
::
get_singleton
()
->
show_warning
(
TTR
(
"
Can't add autoload:"
)
+
"
\n
"
+
TTR
(
vformat
(
"%s is an invalid path. Not in resource path (res://)."
,
path
)
));
return
false
;
return
false
;
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment