This commit is contained in:
CortexCore
2024-01-23 04:14:54 +08:00
parent f41d512247
commit e2fbb14dd5
4 changed files with 29 additions and 22 deletions

View File

@@ -23292,7 +23292,7 @@ PrefabInstance:
objectReference: {fileID: 0}
- target: {fileID: 627812465856688283, guid: c8d49b5a439dbc34dac722054bdd4d0f, type: 3}
propertyPath: m_IsActive
value: 0
value: 1
objectReference: {fileID: 0}
m_RemovedComponents: []
m_RemovedGameObjects: []

View File

@@ -48,16 +48,6 @@ namespace BITKit.Console
private (MethodInfo[] methods,int currentIndex) _currentCommands;
private void OnEnable()
{
Application.logMessageReceivedThreaded += LogCallback;
}
private void OnDisable()
{
Application.logMessageReceivedThreaded -= LogCallback;
}
private void Start()
{
singleton = this;
@@ -88,6 +78,12 @@ namespace BITKit.Console
{
BIT4Log.OnNextLine -= OnNextLine;
});
Application.logMessageReceivedThreaded += LogCallback;
destroyCancellationToken.Register(() =>
{
Application.logMessageReceivedThreaded -= LogCallback;
});
}
private void OnNextLine()
@@ -99,7 +95,6 @@ namespace BITKit.Console
private void OnDestroy()
{
_inputActionGroup.allowInput.RemoveElement(this);
Application.logMessageReceivedThreaded -= LogCallback;
}
public async void Toggle(bool active)
{