You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-19 14:31:59 +00:00
Added mono module
This commit is contained in:
17
modules/mono/editor/GodotSharpTools/Project/ProjectUtils.cs
Normal file
17
modules/mono/editor/GodotSharpTools/Project/ProjectUtils.cs
Normal file
@@ -0,0 +1,17 @@
|
||||
using System;
|
||||
using System.IO;
|
||||
using Microsoft.Build.Construction;
|
||||
|
||||
namespace GodotSharpTools.Project
|
||||
{
|
||||
public static class ProjectUtils
|
||||
{
|
||||
public static void AddItemToProjectChecked(string projectPath, string itemType, string include)
|
||||
{
|
||||
var dir = Directory.GetParent(projectPath).FullName;
|
||||
var root = ProjectRootElement.Open(projectPath);
|
||||
root.AddItemChecked(itemType, include.RelativeToPath(dir).Replace("/", "\\"));
|
||||
root.Save();
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user