重构前夕
This commit is contained in:
@@ -642,12 +642,16 @@ namespace Demo
|
||||
/// </summary>
|
||||
public partial class ScriptableObject
|
||||
{
|
||||
|
||||
private bool isEnableScript = false;
|
||||
|
||||
public string SourcePath = "";
|
||||
public string ScriptName = "";
|
||||
public string ScriptPath;
|
||||
public string ScriptTypename;
|
||||
|
||||
public void EnableScript(string sourcePath, string scriptPath, string scriptType, ScriptableObject parent)
|
||||
{
|
||||
#if UNITY_EDITOR||true
|
||||
#if UNITY_EDITOR||Using_ProfilerMarker
|
||||
s_PreparePerfMarker = new(ScriptName);
|
||||
#endif
|
||||
if (isEnableScript)
|
||||
@@ -690,6 +694,15 @@ namespace Demo
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 脚本解析与Update执行
|
||||
/// </summary>
|
||||
public partial class ScriptableObject
|
||||
{
|
||||
|
||||
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// <para>使用<see cref="ScriptableCallAttribute"/>标记可编辑脚本所能够调用的函数,并附加注释</para>
|
||||
/// <para>使用<see cref="DefaultScriptAttribute"/>标记派生类,并附加默认模板</para>
|
||||
@@ -700,12 +713,7 @@ namespace Demo
|
||||
public static Dictionary<string, Type> FastScriptableObjectTypen = new();
|
||||
public static bool IsAutoPlay = false;
|
||||
|
||||
public string SourcePath = "";
|
||||
public string ScriptName = "";
|
||||
public string ScriptPath;
|
||||
public string ScriptTypename;
|
||||
|
||||
#if UNITY_EDITOR||true
|
||||
#if UNITY_EDITOR||Using_ProfilerMarker
|
||||
public ProfilerMarker s_PreparePerfMarker;
|
||||
#endif
|
||||
public ScriptableObject Parent;
|
||||
@@ -861,7 +869,7 @@ namespace Demo
|
||||
return DoLoadSubScriptAsync(type, path, null);
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
/// <summary>
|
||||
/// 异步加载子脚本
|
||||
/// </summary>
|
||||
@@ -878,6 +886,7 @@ namespace Demo
|
||||
{
|
||||
StartCoroutine(DoLoadSubScriptAsync(type, path, null));
|
||||
}
|
||||
*/
|
||||
|
||||
private enum ParseStats
|
||||
{
|
||||
@@ -1147,7 +1156,7 @@ namespace Demo
|
||||
return;
|
||||
if (gameObject.activeInHierarchy == false)
|
||||
return;
|
||||
#if UNITY_EDITOR||true
|
||||
#if UNITY_EDITOR||Using_ProfilerMarker
|
||||
s_PreparePerfMarker.Begin(this);
|
||||
#endif
|
||||
if (tickType == TickType.Reset)
|
||||
@@ -1166,7 +1175,7 @@ namespace Demo
|
||||
{
|
||||
child.ScriptUpdate(currentTime, deltaTime, tickType);
|
||||
}
|
||||
#if UNITY_EDITOR||true
|
||||
#if UNITY_EDITOR||Using_ProfilerMarker
|
||||
s_PreparePerfMarker.End();
|
||||
#endif
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user