You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
-[Contribution and Development](#contribution-and-development)
@@ -1118,6 +1119,41 @@ function App() {
1118
1119
}
1119
1120
```
1120
1121
1122
+
## Providing Debugging Symbols
1123
+
1124
+
> Available since version 8.8.0
1125
+
1126
+
This is set to the filename of the JSON file containing debug symbols when the current build is using debug symbols, otherwise it is set to an empty string. If the Debug Symbols option is enabled and the Development Build option is disabled then the Debug Symbols will be generated automatically.
1127
+
1128
+
```tsx
1129
+
<IUnityConfig>{
1130
+
symbolsUrl: string,
1131
+
};
1132
+
```
1133
+
1134
+
#### Example implementation
1135
+
1136
+
A basic implementation could look something like this. In the following example we'll set the streaming assets url to the "streamingassets" directory.
1137
+
1138
+
```jsx
1139
+
// File: App.jsx
1140
+
1141
+
import React from "react";
1142
+
import Unity, { UnityContext } from "react-unity-webgl";
1143
+
1144
+
const unityContext = new UnityContext({
1145
+
loaderUrl: "build/myunityapp.loader.js",
1146
+
dataUrl: "build/myunityapp.data",
1147
+
frameworkUrl: "build/myunityapp.framework.js",
1148
+
codeUrl: "build/myunityapp.wasm",
1149
+
symbolsUrl: "build/debug-symbols.json",
1150
+
});
1151
+
1152
+
function App() {
1153
+
return <Unity unityContext={unityContext} />;
1154
+
}
1155
+
```
1156
+
1121
1157
## JavaScript to UnityScript types
1122
1158
1123
1159
Simple numeric types can be passed to JavaScript in function parameters without requiring any conversion. Other data types will be passed as a pointer in the emscripten heap (which is really just a big array in JavaScript). For strings, you can use the Pointerstringify helper function to convert to a JavaScript string.
0 commit comments