24 lines
725 B
C#
24 lines
725 B
C#
|
|
using System.Collections;
|
|
using System.Collections.Generic;
|
|
using UnityEngine;
|
|
|
|
namespace Ether
|
|
{
|
|
public static class TempTools
|
|
{
|
|
/// <summary>
|
|
/// 生成类
|
|
/// </summary>
|
|
public static void GenerateClass(string className, string baseClassName, string content, string generatePath)
|
|
{
|
|
string tempClassStr = FileTools.ReadFile(PathTools.TempClassPath);
|
|
tempClassStr = tempClassStr.Replace("$ClassName$", className);
|
|
tempClassStr = tempClassStr.Replace("$BaseClassName$", baseClassName);
|
|
tempClassStr = tempClassStr.Replace("$Content$", content);
|
|
|
|
FileTools.WriteFile(generatePath, tempClassStr);
|
|
}
|
|
}
|
|
}
|