onejs-core 1.0.26 → 1.0.28

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -27,6 +27,8 @@ declare const onejs: {
27
27
  ): CS.System.Action
28
28
 
29
29
  subscribe(eventName: string, handler: () => void): CS.System.Action
30
+
31
+ teardown(action: CS.System.Action): void
30
32
  }
31
33
 
32
34
  declare function require(name: string): any
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "onejs-core",
3
3
  "description": "The JS part of OneJS, a UI framework and Scripting Engine for Unity.",
4
- "version": "1.0.26",
4
+ "version": "1.0.28",
5
5
  "main": "./dist/index.js",
6
6
  "types": "./typings.d.ts",
7
7
  "dependencies": {
@@ -127,10 +127,10 @@ async function getOneJSUnityDir() {
127
127
 
128
128
  // Normalize path separators for cross-platform compatibility
129
129
  const normalizedIncludePath = includePath.replace(/\\/g, '/');
130
- const searchIndex = normalizedIncludePath.indexOf('Assets/OneJS');
130
+ const searchIndex = normalizedIncludePath.indexOf('OneJS/Runtime/Engine/ScriptEngine.cs');
131
131
 
132
132
  if (searchIndex !== -1) {
133
- oneJSPath = normalizedIncludePath.substring(0, searchIndex + 'Assets/OneJS'.length);
133
+ oneJSPath = normalizedIncludePath.substring(0, searchIndex + 'OneJS'.length);
134
134
  oneJSPath = path.resolve(projectDir, oneJSPath);
135
135
  return oneJSPath;
136
136
  }