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
{{ message }}
This repository was archived by the owner on Sep 4, 2024. It is now read-only.
Copy file name to clipboardExpand all lines: README.md
+16Lines changed: 16 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -52,6 +52,22 @@ public class MagicUnity : MonoBehaviour
52
52
}
53
53
```
54
54
55
+
For macOS editor support, you'll need to pass an additional parameter `macCanvas` to properly render Magic components. The object you pass in should be the name of your app's primary canvas.
56
+
57
+
```c#
58
+
publicclassMagicUnity : MonoBehaviour
59
+
{
60
+
// Attach this script when you start the canvas
61
+
voidStart()
62
+
{
63
+
Magicmagic=newMagic("YOUR_PUBLISHABLE_KEY", macCanvas: GameObject.Find("Magic Example 1"));
64
+
65
+
// Append the instance here, so that it can be shared across the project
0 commit comments