diff options
| author | Ignacio Etcheverry | 2017-10-05 00:10:51 +0200 |
|---|---|---|
| committer | Ignacio Etcheverry | 2017-10-05 00:10:51 +0200 |
| commit | df22bbd7ede088293d92e3c9c30da1fd4c26dccc (patch) | |
| tree | e70a474928eda67fc1c5896bf921eadfa599e44d /modules/mono/editor/GodotSharpTools/Project/ProjectUtils.cs | |
| parent | b4d758e067f65de2f10d116efe0dbf682671317d (diff) | |
| download | godot-df22bbd7ede088293d92e3c9c30da1fd4c26dccc.tar.gz godot-df22bbd7ede088293d92e3c9c30da1fd4c26dccc.tar.zst godot-df22bbd7ede088293d92e3c9c30da1fd4c26dccc.zip | |
Add C# script to csproj when attaching it to an object
Diffstat (limited to '')
| -rw-r--r-- | modules/mono/editor/GodotSharpTools/Project/ProjectUtils.cs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/modules/mono/editor/GodotSharpTools/Project/ProjectUtils.cs b/modules/mono/editor/GodotSharpTools/Project/ProjectUtils.cs index a50b4fb06..6889ea715 100644 --- a/modules/mono/editor/GodotSharpTools/Project/ProjectUtils.cs +++ b/modules/mono/editor/GodotSharpTools/Project/ProjectUtils.cs @@ -10,8 +10,8 @@ namespace GodotSharpTools.Project { var dir = Directory.GetParent(projectPath).FullName; var root = ProjectRootElement.Open(projectPath); - root.AddItemChecked(itemType, include.RelativeToPath(dir).Replace("/", "\\")); - root.Save(); + if (root.AddItemChecked(itemType, include.RelativeToPath(dir).Replace("/", "\\"))) + root.Save(); } } } |
