Skip to content
This repository was archived by the owner on Sep 11, 2024. It is now read-only.

Commit 6890f7f

Browse files
committed
add 'pluginVersion' in jsb module and update the version tag to 1.7.4
1 parent 33fe70c commit 6890f7f

4 files changed

Lines changed: 8 additions & 1 deletion

File tree

Packages/cc.starlessnight.unity-jsb/Source/Native/JSApi.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,7 @@ namespace QuickJS.Native
8585

8686
public partial class JSApi
8787
{
88+
public const int VERSION = 0x010704;
8889
public const int CS_JSB_VERSION = 0xa; // expected dll version
8990
public static readonly int SO_JSB_VERSION; // actual dll version
9091

Packages/cc.starlessnight.unity-jsb/Source/ScriptContext.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -792,6 +792,7 @@ public static ClassDecl Bind(TypeRegister register)
792792
ns_jsb.AddConstValue("isOperatorOverloadingSupported", JSApi.IsOperatorOverloadingSupported);
793793
ns_jsb.AddConstValue("engine", JSApi.JSBDLL);
794794
ns_jsb.AddConstValue("version", JSApi.SO_JSB_VERSION);
795+
ns_jsb.AddConstValue("pluginVersion", JSApi.VERSION);
795796
{
796797
var ns_hotfix = register.CreateClass("JSBHotfix");
797798
ns_hotfix.AddFunction("replace_single", hotfix_replace_single, 2);

Packages/cc.starlessnight.unity-jsb/Typings/jsb.d.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -187,6 +187,11 @@ declare module "jsb" {
187187
*/
188188
let version: number;
189189

190+
/**
191+
* The version of this plugin itself (in hex)
192+
*/
193+
let pluginVersion: number;
194+
190195
/**
191196
* Calls Thread.Sleep()
192197
*/

Packages/cc.starlessnight.unity-jsb/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "cc.starlessnight.unity-jsb",
3-
"version": "1.7.3",
3+
"version": "1.7.4",
44
"description": " It brings Javascript runtime capability to Unity3D by integrating QuickJS. It's highly integrated with Unity3D, and possible to implement MonoBehaviour/ScriptableObject/Editor/EditorWindow in typescript.",
55
"displayName": "unity-jsb",
66
"unity": "2018.4",

0 commit comments

Comments
 (0)