feat: run hook inside a thread

develop
paring 2022-11-05 00:54:42 +09:00
parent 6c5bf6bdd0
commit 15466d165b
Signed by: pikokr
GPG Key ID: 2C097B03E9D823C4
5 changed files with 61 additions and 9 deletions

View File

@ -58,6 +58,11 @@ namespace SkyHook
}
private void _StartHook()
{
var started = false;
Exception exception = null;
new Thread(() =>
{
if (_started) return;
@ -65,10 +70,21 @@ namespace SkyHook
if (result != null)
{
throw new SkyHookException(result);
exception = new SkyHookException(result);
}
_started = true;
started = true;
}).Start();
while (!started && exception == null)
{
}
if (exception != null)
{
throw exception;
}
}
private void _StopHook()

Binary file not shown.

View File

@ -11,17 +11,53 @@ PluginImporter:
isExplicitlyReferenced: 0
validateReferences: 1
platformData:
- first:
: Any
second:
enabled: 0
settings:
Exclude Editor: 1
Exclude Linux64: 0
Exclude OSXUniversal: 0
Exclude Win: 0
Exclude Win64: 1
- first:
Any:
second:
enabled: 1
enabled: 0
settings: {}
- first:
Editor: Editor
second:
enabled: 0
settings:
CPU: AnyCPU
DefaultValueInitialized: true
OS: AnyOS
- first:
Standalone: Linux64
second:
enabled: 1
settings:
CPU: AnyCPU
- first:
Standalone: OSXUniversal
second:
enabled: 1
settings:
CPU: None
- first:
Standalone: Win
second:
enabled: 1
settings:
CPU: x86
- first:
Standalone: Win64
second:
enabled: 0
settings:
CPU: None
userData:
assetBundleName:
assetBundleVariant:

Binary file not shown.

View File

@ -6,7 +6,7 @@ PluginImporter:
iconMap: {}
executionOrder: {}
defineConstraints: []
isPreloaded: 0
isPreloaded: 1
isOverridable: 1
isExplicitlyReferenced: 0
validateReferences: 1
@ -34,7 +34,7 @@ PluginImporter:
settings:
CPU: AnyCPU
DefaultValueInitialized: true
OS: Windows
OS: AnyOS
- first:
Standalone: Linux64
second: