Skip to content

Commit 95b31d1

Browse files
committed
Sample code PhysicMaterial for Unity 2022.3
1 parent 1d72856 commit 95b31d1

File tree

2 files changed

+7
-0
lines changed

2 files changed

+7
-0
lines changed

Runtime/Engine/ScriptEngine.cs

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -177,6 +177,10 @@ public void Refresh() {
177177
}
178178
}
179179

180+
/// MARK: Init
181+
/// <summary>
182+
/// Initializes the JS environment, sets up the DOM bridge, and exposes global objects to JavaScript.
183+
/// </summary>
180184
void Init() {
181185
if (_jsEnv != null) {
182186
_jsEnv.Dispose();
@@ -187,6 +191,9 @@ void Init() {
187191
#if UNITY_WEBGL && UNITY_STANDALONE
188192
_jsEnv.Eval("globalThis.ONEJS_WEBGL = true;");
189193
#endif
194+
#if UNITY_6000_0_OR_NEWER
195+
_jsEnv.Eval("globalThis.UNITY_6000_0_OR_NEWER = true;");
196+
#endif
190197

191198
// Some default UsingActions here. Please use OnPreInit to add more if needed (in your own code).
192199
_jsEnv.UsingAction<Action>();

Samples/sample-outputs.tgz.bytes

156 KB
Binary file not shown.

0 commit comments

Comments
 (0)