1
0
mirror of https://github.com/godotengine/godot.git synced 2025-11-07 12:30:27 +00:00

Add C# script to csproj when attaching it to an object

This commit is contained in:
Ignacio Etcheverry
2017-10-05 00:10:51 +02:00
parent b4d758e067
commit df22bbd7ed
3 changed files with 50 additions and 18 deletions

View File

@@ -27,12 +27,15 @@ namespace GodotSharpTools.Project
return false;
}
public static void AddItemChecked(this ProjectRootElement root, string itemType, string include)
public static bool AddItemChecked(this ProjectRootElement root, string itemType, string include)
{
if (!root.HasItem(itemType, include))
{
root.AddItem(itemType, include);
return true;
}
return false;
}
public static Guid GetGuid(this ProjectRootElement root)