Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature/expose create mesh colliders in unityevents #1

Merged
merged 4 commits into from
Feb 12, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 12 additions & 5 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,21 @@ All notable changes to this package will be documented in this file.
The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/)
and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html).

## 1.0.0

## [1.1.0] - 2024-02-24

### Added

- moved tileHandler and layers to its own repo
- Serialized property for createMeshcollider bool, in order to change bool as Dynamic Bool from UnityEvents

## [1.0.1] - 2023-11-01

### Fixed

## 1.0.1
- changed namespace to work with changed namespace of SubObjects package

### fixed
## [1.0.0] - 2023-10-18

- changed namespace to work with changed namespace of SubObjects package
### Added

- moved tileHandler and layers to its own repo
7 changes: 5 additions & 2 deletions Runtime/Scripts/Layers/BinaryMeshLayer/BinaryMeshLayer.cs
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@ public class BinaryMeshLayer : Layer
public string removeFromID;
#endif
public List<Material> DefaultMaterialList = new List<Material>();
public bool createMeshcollider = false;
public ShadowCastingMode tileShadowCastingMode = ShadowCastingMode.On;

public string brotliCompressedExtention = ".br";
Expand All @@ -31,6 +30,10 @@ public class BinaryMeshLayer : Layer
private Mesh mesh;
private MeshRenderer meshRenderer;

[System.Obsolete("This field is obsolete, use the CreateMeshColliders property instead.")]
public bool createMeshcollider = false;
sambaas marked this conversation as resolved.
Show resolved Hide resolved
public bool CreateMeshColliders { get => createMeshcollider; set => createMeshcollider = value; }

public override void HandleTile(TileChange tileChange, System.Action<TileChange> callback = null)
{
TileAction action = tileChange.action;
Expand Down Expand Up @@ -256,7 +259,7 @@ private GameObject CreateNewGameObject(string source, byte[] binaryMeshData, Til
meshRenderer.sharedMaterials = materialList.ToArray();
meshRenderer.shadowCastingMode = tileShadowCastingMode;

if (createMeshcollider)
if (CreateMeshColliders)
{
container.AddComponent<MeshCollider>().sharedMesh = mesh;
}
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "eu.netherlands3d.cartesiantiles",
"version": "1.0.1",
"version": "1.1.0",
"displayName": "Netherlands3D - Cartesian Tiles",
"description": "Loads and unloads datasets in a cartesian coordinateSystem",
"unity": "2022.2",
Expand Down