Skip to content

Commit

Permalink
Merge branch 'main' into feature/load-config-from-file
Browse files Browse the repository at this point in the history
# Conflicts:
#	Assets/Scenes/Main.unity
  • Loading branch information
mvriel committed Aug 21, 2023
2 parents c68550c + 1ce7c88 commit e4ff563
Show file tree
Hide file tree
Showing 5 changed files with 52 additions and 6 deletions.
32 changes: 26 additions & 6 deletions Assets/Scenes/Main.unity

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 4 additions & 0 deletions Assets/link.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
<linker>
<assembly fullname="GeoJSON.NET" preserve="all"></assembly>
<assembly fullname="eu.netherlands3d.json.Runtime" preserve="all"></assembly>
</linker>
3 changes: 3 additions & 0 deletions Assets/link.xml.meta

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

16 changes: 16 additions & 0 deletions Packages/eu.netherlands3d.indicators/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,22 @@ or, you have to add `https://package.openupm.com` as a scoped registry with, at
- `eu.netherlands3d` and
- `com.virgis.geojson.net`

### WebGL

When you want to use this package in a build intended for WebGL, do not forgot to add the following to `Assets/link.xml`
in your project. This package relies on (de)serialisation using JSON.net and when Code Stripping is enabled, the linker
will otherwise remove all JsonConverters and elements involved in the (de)serialisation of the code.

```xml
<linker>
<!-- Anything that is already in your link.xml -->
<assembly fullname="GeoJSON.NET" preserve="all"></assembly>
<assembly fullname="eu.netherlands3d.json.Runtime" preserve="all"></assembly>
</linker>
```

If you do not have a `link.xml` file in the root of your `Assets` folder, you can create one with the contents above.

## Usage

To make use of this package, you can follow these steps:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
using System;
using System.Collections.Generic;
using Netherlands3D.Json.JsonConverters;
using Newtonsoft.Json;

Expand All @@ -7,6 +8,8 @@ namespace Netherlands3D.Indicators.Dossiers.Indicators
[Serializable]
public struct Scores
{
public Dictionary<string, float> Values;

[JsonConverter(typeof(UriConverter))]
public Uri graph;
}
Expand Down

0 comments on commit e4ff563

Please sign in to comment.