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
Copy file name to clipboardExpand all lines: README.md
+12-12Lines changed: 12 additions & 12 deletions
Original file line number
Diff line number
Diff line change
@@ -7,7 +7,7 @@ This is a _reference project_ for those that want to use [Unity as a Library](ht
7
7
## Requirements
8
8
9
9
- Physical device with iOS 17.5 or later.
10
-
- Unity Editor 2022.3.36f1 - latest LTS at time of this writing - with iOS build support installed in Unity Hub.
10
+
- Unity Editor 2022.3.37f1 - latest LTS as of Jul 9, 2024 - with iOS build support installed in Unity Hub.
11
11
12
12
## Instructions
13
13
@@ -22,7 +22,7 @@ This is a _reference project_ for those that want to use [Unity as a Library](ht
22
22
mkdir -p UnityProject/Builds/iOS
23
23
```
24
24
25
-
3. **Open Unity project**
25
+
3. **Open and build Unity project**
26
26
- Use Unity Hub to open `UnityProject` directory.
27
27
- Go to `File > Build Settings`.
28
28
- In platform menu, select`iOS` and click `Switch Platform`.
@@ -35,16 +35,16 @@ This is a _reference project_ for those that want to use [Unity as a Library](ht
35
35
- Edit `UnitySwiftUI` target's signing settings with valid bundle identifier and signing team ID.
36
36
- Switch to `UnitySwiftUI` scheme.
37
37
38
-
6. **Run app on a physical device**
39
-
- Connect your physical device to Xcode.
38
+
6. **Run on physical device**
39
+
- Connect your device to Xcode.
40
40
- Build and run `UnitySwiftUI` scheme to your device.
41
41
42
42
## Key features
43
43
44
-
- **Control of Unity view** as a SwiftUI element that can be repositioned and resized. Unity's [documentation](https://docs.unity3d.com/2022.3/Documentation/Manual/UnityasaLibrary-iOS.html) says "Unity as a Library only supports full-screen rendering, and doesn’t support rendering on part of the screen." We have fixed this limitation.
45
-
- **Touches and gestures** on Unity view are processed within Unity.
46
-
- **Restarting** the Unity player.
47
-
- **State data** is sent from native Swift to Unity C# as a struct with members including string, boolean, floating point, integer, and MTLTexture types.
44
+
- Control of Unity view as a SwiftUI element that can be repositioned and resized. Unity's [documentation](https://docs.unity3d.com/2022.3/Documentation/Manual/UnityasaLibrary-iOS.html) says "Unity as a Library only supports full-screen rendering, and doesn’t support rendering on part of the screen." We have fixed this limitation.
45
+
- Touches and gestures on Unity view are processed within Unity.
46
+
- Restarting the Unity player.
47
+
- State is sent from native Swift to Unity C# as a struct with members including string, boolean, floating point, integer, and MTLTexture types.
48
48
49
49
## Key files
50
50
@@ -55,12 +55,12 @@ This is a _reference project_ for those that want to use [Unity as a Library](ht
55
55
56
56
### Unity Project
57
57
58
-
- [**NativeStateManager.cs**](UnityProject/Assets/Scripts/NativeStateManager.cs): Class for receiving and storing native state data.
59
-
- [**RootBehavior.cs**](UnityProject/Assets/Scripts/RootBehavior.cs): Script that renders content - a cube and a spotlight - reacting to state updates and touch events.
60
-
- [**NativeState.h**](UnityProject/Assets/Plugins/iOS/NativeState.h), [**NativeState.m**](UnityProject/Assets/Plugins/iOS/NativeState.m): Plugin enabling flow of state data from native Swift to Unity C#.
58
+
- [**NativeStateManager.cs**](UnityProject/Assets/Scripts/NativeStateManager.cs): Class for receiving and storing native state.
59
+
- [**RootBehavior.cs**](UnityProject/Assets/Scripts/RootBehavior.cs): Script that renders sample scene - cube and spotlight - reacting to state updates and touch events.
60
+
- [**NativeState.h**](UnityProject/Assets/Plugins/iOS/NativeState.h), [**NativeState.m**](UnityProject/Assets/Plugins/iOS/NativeState.m): Plugin enabling flow of state from native Swift to Unity C#.
61
61
- [**UnityFramework.modulemap**](UnityProject/Assets/Plugins/iOS/UnityFramework.modulemap): Custom modulemap for plugin interoperability with Swift.
62
62
- [**PostProcessBuild.cs**](UnityProject/Assets/Editor/PostProcessBuild.cs): Script automating integration of Unity generated Xcode project.
63
63
64
64
## Known issues
65
-
- After building Unity project, Xcode workspace may not always reflect latest files and be unable to build. Close and reopen workspace to fix this bad state.
65
+
- After building Unity project, Xcode workspace may not always reflect latest files and be unable to build. Close and reopen workspace to fix this.
66
66
- When running while attached to Xcode, there may be some noticeable delay between device orientation change and UI layout. There should be no such delay when running detached.
0 commit comments