Add C# script to csproj when attaching it to an object
This commit is contained in:
parent
b4d758e067
commit
df22bbd7ed
3 changed files with 50 additions and 18 deletions
|
|
@ -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)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue