Skip to content

Commit a87c1eb

Browse files
committed
doc: Update README and .gitignore.
1 parent 50873ff commit a87c1eb

File tree

2 files changed

+24
-15
lines changed

2 files changed

+24
-15
lines changed

.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -352,4 +352,4 @@ MigrationBackup/
352352
.idea/
353353

354354
**/protos/*.cs
355-
**/Plugins/*/*.meta
355+
VisualPinball.Engine.Mpf/machine/data/

README.md

Lines changed: 23 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,14 @@ a single binary. So, what Unity is getting is:
2929
all its .NET dependencies
3030
- `grpc_csharp_ext.dll`, which is the native gRCP library used by the C# wrapper.
3131

32+
### Unity Package
33+
34+
The goal of this repo is to use it within Unity. In order to do that, open the
35+
Package Manager in Unity, and add `org.visualpinball.engine.missionpinball` under
36+
*Add package from git URL*.
37+
38+
The Unity package is build and published to our registry on every merge to master.
39+
3240
## Setup
3341

3442
You currently need Python and MPF installed locally.
@@ -42,23 +50,24 @@ Or, if you already have it:
4250

4351
After that, `mpf --version` should return at least **MPF v0.55.0-dev.37**.
4452

45-
## Usage
46-
47-
Test code in the repo. Init:
48-
49-
```cs
50-
var mpfApi = new MpfApi(@"path\to\machine\folder");
51-
52-
// spawn MPF and connect to it
53-
await mpfApi.Launch();
53+
## Development Setup
5454

55-
// start MPF
56-
mpfApi.Start();
55+
In order to import the package locally instead from our registry, clone and
56+
compile it. This will copy the necessary binaries into the Unity folder. Only
57+
then, import the project into Unity.
5758

58-
// retrieve machine configuration
59-
var descr = await mpfApi.GetMachineDescription();
59+
Since the Unity folder contains `.meta` files of the binaries, but not the
60+
actual binaries, `.meta` files of uncompiled platforms are cleaned up by Unity.
61+
In order to not accidentally commit those files, we recommend to ignore them:
6062

61-
Console.WriteLine($"Description: {descr}");
63+
```bash
64+
git update-index --assume-unchanged VisualPinball.Engine.Mpf.Unity/Plugins/linux-x64/libgrpc_csharp_ext.so.meta
65+
git update-index --assume-unchanged VisualPinball.Engine.Mpf.Unity/Plugins/osx-x64/VisualPinball.Engine.Mpf.dll.meta
66+
git update-index --assume-unchanged VisualPinball.Engine.Mpf.Unity/Plugins/osx-x64/libgrpc_csharp_ext.dylib.meta
67+
git update-index --assume-unchanged VisualPinball.Engine.Mpf.Unity/Plugins/win-x64/VisualPinball.Engine.Mpf.dll.meta
68+
git update-index --assume-unchanged VisualPinball.Engine.Mpf.Unity/Plugins/win-x64/grpc_csharp_ext.dll.meta
69+
git update-index --assume-unchanged VisualPinball.Engine.Mpf.Unity/Plugins/win-x86/VisualPinball.Engine.Mpf.dll.meta
70+
git update-index --assume-unchanged VisualPinball.Engine.Mpf.Unity/Plugins/win-x86/grpc_csharp_ext.dll.meta
6271
```
6372

6473
## License

0 commit comments

Comments
 (0)