正在为RScript更新内容(已通过编译)
This commit is contained in:
@@ -84,12 +84,7 @@ namespace Demo.Game
|
||||
var childName = type;
|
||||
int childIndex = 1;
|
||||
var childFullNameWithoutExtension = childName;
|
||||
var extension = so.GetRoot().RootGameController.CurrentProjectDefaultFileStyle switch
|
||||
{
|
||||
ProjectDefaultFileStyle.CPP => ".h",
|
||||
ProjectDefaultFileStyle.PY => ".py",
|
||||
_ => ""
|
||||
};
|
||||
var extension = ".h";
|
||||
if (childDir.Exists())
|
||||
{
|
||||
childFullNameWithoutExtension = $"{childName}{(childIndex == 1 ? "" : childIndex.ToString())}";
|
||||
@@ -125,7 +120,7 @@ namespace Demo.Game
|
||||
// 新建时添加模板内容
|
||||
using var childFileStream = File.AppendText(childFile);
|
||||
{
|
||||
DefaultScriptUtility.WriteDefaultScript(childFileStream, ScriptableObject.FastScriptableObjectTypen[type]);
|
||||
//ScriptUtility.WriteDefaultScript(childFileStream, ScriptableObject.FastScriptableObjectTypen[type]);
|
||||
childFileStream.Close();
|
||||
}
|
||||
//不刷新世界,直接加载
|
||||
@@ -134,7 +129,7 @@ namespace Demo.Game
|
||||
// 打开手动编辑
|
||||
try
|
||||
{
|
||||
DefaultScriptUtility.OpenScriptFile(targetChildSO);
|
||||
ScriptUtility.OpenScriptFile(targetChildSO);
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
@@ -217,7 +212,7 @@ namespace Demo.Game
|
||||
// Open Script
|
||||
new("Open",_=>
|
||||
{
|
||||
DefaultScriptUtility.OpenScriptFile(self);
|
||||
ScriptUtility.OpenScriptFile(self);
|
||||
}),
|
||||
new("<color=red>----------</color>",_=>{ })
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user