Tab
This commit is contained in:
@@ -85,30 +85,6 @@ namespace Demo.Game
|
|||||||
}
|
}
|
||||||
if (string.IsNullOrEmpty(clipPath) == false)
|
if (string.IsNullOrEmpty(clipPath) == false)
|
||||||
{
|
{
|
||||||
/*
|
|
||||||
IEnumerator Run()
|
|
||||||
{
|
|
||||||
#if ENABLE_CLASS_Interaction
|
|
||||||
var clipFile = new Interaction(clipPath);
|
|
||||||
#else
|
|
||||||
var clipFile = new ToolFile(clipPath);
|
|
||||||
#endif
|
|
||||||
if (clipFile.Exists() == false)
|
|
||||||
clipFile = new(MainConfig.GetFile(clipPath).GetFullPath());
|
|
||||||
if (clipFile.Exists() == false)
|
|
||||||
{
|
|
||||||
Debug.LogError($"Cannt load {clipPath}", this);
|
|
||||||
yield break;
|
|
||||||
}
|
|
||||||
yield return MainAudio.LoadAudio(clipFile, audioType);
|
|
||||||
content.SongLoadOverCallback(MainAudio);
|
|
||||||
yield return GameAudioSystemInit();
|
|
||||||
}
|
|
||||||
|
|
||||||
StartCoroutine(Run());
|
|
||||||
*/
|
|
||||||
|
|
||||||
|
|
||||||
#if ENABLE_CLASS_Interaction
|
#if ENABLE_CLASS_Interaction
|
||||||
var clipFile = new Interaction(clipPath);
|
var clipFile = new Interaction(clipPath);
|
||||||
#else
|
#else
|
||||||
@@ -139,6 +115,8 @@ namespace Demo.Game
|
|||||||
{
|
{
|
||||||
// Config ScriptableObject
|
// Config ScriptableObject
|
||||||
{
|
{
|
||||||
|
ScriptableObject.EnableScriptableObjectCounter = 0;
|
||||||
|
ScriptableObject.ApplyScriptableObjectCounter = 0;
|
||||||
ScriptableObject.FastScriptableObjectTypen = content.ScriptableObjectTypen;
|
ScriptableObject.FastScriptableObjectTypen = content.ScriptableObjectTypen;
|
||||||
ScriptableObject.IsAutoPlay = content.IsAutoPlay;
|
ScriptableObject.IsAutoPlay = content.IsAutoPlay;
|
||||||
ScriptableObject.OneBarTime = 60.0f / (float)MainConfig.FindItem(nameof(Editor.EditorController.BPM), Editor.EditorController.instance.BPM);
|
ScriptableObject.OneBarTime = 60.0f / (float)MainConfig.FindItem(nameof(Editor.EditorController.BPM), Editor.EditorController.instance.BPM);
|
||||||
|
|||||||
@@ -40,7 +40,6 @@ namespace Demo.Game
|
|||||||
|
|
||||||
public void EnableScript(string sourcePath, GameController parent)
|
public void EnableScript(string sourcePath, GameController parent)
|
||||||
{
|
{
|
||||||
AllScriptableObjectCounter = 0;
|
|
||||||
if (AllScriptableObjectCounterHierarchyItem == null)
|
if (AllScriptableObjectCounterHierarchyItem == null)
|
||||||
{
|
{
|
||||||
AllScriptableObjectCounterHierarchyItem = HierarchyWindow.instance.CreateRootItemEntryWithBinders(typeof(ScriptableObject))[0];
|
AllScriptableObjectCounterHierarchyItem = HierarchyWindow.instance.CreateRootItemEntryWithBinders(typeof(ScriptableObject))[0];
|
||||||
|
|||||||
@@ -270,6 +270,12 @@ namespace Demo
|
|||||||
MyHierarchyItem.GetHierarchyItem().title = this.ScriptName + $"<{m_ScriptType}>";
|
MyHierarchyItem.GetHierarchyItem().title = this.ScriptName + $"<{m_ScriptType}>";
|
||||||
MyHierarchyItem.GetHierarchyItem().target = this;
|
MyHierarchyItem.GetHierarchyItem().target = this;
|
||||||
MyHierarchyItem.GetHierarchyItem().ButtonGameObject.GetComponent<Editor.UI.RightClick>().ScriptObjectMenu = OnHierarchyItemRightClick;
|
MyHierarchyItem.GetHierarchyItem().ButtonGameObject.GetComponent<Editor.UI.RightClick>().ScriptObjectMenu = OnHierarchyItemRightClick;
|
||||||
|
|
||||||
|
// 增数
|
||||||
|
{
|
||||||
|
EnableScriptableObjectCounter++;
|
||||||
|
AllScriptableObjectCounterHierarchyItem.GetHierarchyItem().text = $"SOC: {ApplyScriptableObjectCounter}/{EnableScriptableObjectCounter}";
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#region Hierarchy
|
#region Hierarchy
|
||||||
@@ -295,7 +301,8 @@ namespace Demo
|
|||||||
public partial class ScriptableObject
|
public partial class ScriptableObject
|
||||||
{
|
{
|
||||||
public static Dictionary<string, Type> FastScriptableObjectTypen = new();
|
public static Dictionary<string, Type> FastScriptableObjectTypen = new();
|
||||||
public static int AllScriptableObjectCounter = 0;
|
public static int EnableScriptableObjectCounter = 0;
|
||||||
|
public static int ApplyScriptableObjectCounter = 0;
|
||||||
|
|
||||||
public bool IsParseScript2Expr { get; private set; } = false;
|
public bool IsParseScript2Expr { get; private set; } = false;
|
||||||
protected virtual bool IsSelfEnableUpdate { get => true; }
|
protected virtual bool IsSelfEnableUpdate { get => true; }
|
||||||
@@ -478,8 +485,8 @@ namespace Demo
|
|||||||
yield return DoSomethingDuringApplyScript();
|
yield return DoSomethingDuringApplyScript();
|
||||||
// 增数
|
// 增数
|
||||||
{
|
{
|
||||||
AllScriptableObjectCounter++;
|
ApplyScriptableObjectCounter++;
|
||||||
AllScriptableObjectCounterHierarchyItem.GetHierarchyItem().text = $"ScriptableObjectCount: {AllScriptableObjectCounter}";
|
AllScriptableObjectCounterHierarchyItem.GetHierarchyItem().text = $"SOC: {ApplyScriptableObjectCounter}/{EnableScriptableObjectCounter}";
|
||||||
}
|
}
|
||||||
// 统计更新能力
|
// 统计更新能力
|
||||||
{
|
{
|
||||||
@@ -511,8 +518,9 @@ namespace Demo
|
|||||||
// 清理Cache
|
// 清理Cache
|
||||||
//
|
//
|
||||||
// 减数
|
// 减数
|
||||||
AllScriptableObjectCounter--;
|
ApplyScriptableObjectCounter--;
|
||||||
AllScriptableObjectCounterHierarchyItem.GetHierarchyItem().text = $"ScriptableObjectCount: {AllScriptableObjectCounter}";
|
EnableScriptableObjectCounter++;
|
||||||
|
AllScriptableObjectCounterHierarchyItem.GetHierarchyItem().text = $"SOC: {ApplyScriptableObjectCounter}/{EnableScriptableObjectCounter}";
|
||||||
}
|
}
|
||||||
if (MyHierarchyItem != null)
|
if (MyHierarchyItem != null)
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user