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

Commit 73dd30b

Browse files
authored
Merge branch 'main' into fix/add-voltstro-dependency
2 parents b6b2e8c + 0b5264c commit 73dd30b

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

README.md

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,22 @@ public class MagicUnity : MonoBehaviour
5252
}
5353
```
5454

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+
public class MagicUnity : MonoBehaviour
59+
{
60+
// Attach this script when you start the canvas
61+
void Start()
62+
{
63+
Magic magic = new Magic("YOUR_PUBLISHABLE_KEY", macCanvas: GameObject.Find("Magic Example 1"));
64+
65+
// Append the instance here, so that it can be shared across the project
66+
Magic.Instance = magic;
67+
}
68+
}
69+
```
70+
5571
### User Authentication
5672

5773
```c#

0 commit comments

Comments
 (0)