From 25f5d2a0244794ef09dd21c27686404b4077c9e0 Mon Sep 17 00:00:00 2001 From: Andreas Atteneder Date: Wed, 27 Oct 2021 11:01:43 +0200 Subject: [PATCH] fix: Incorrect preprocessor clause and invalid var names. Solves .NET 4.6 compiler issue. Hashcode is .NET 5 and above (fixes #261) --- ChangeLog.md | 4 ++++ Runtime/Scripts/Export/Constants.cs | 2 +- Runtime/Scripts/Export/GltfWriter.cs | 4 ++-- package.json | 2 +- 4 files changed, 8 insertions(+), 4 deletions(-) diff --git a/ChangeLog.md b/ChangeLog.md index da595e1f..4750ce03 100644 --- a/ChangeLog.md +++ b/ChangeLog.md @@ -4,6 +4,10 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). +## [4.4.1] - 2021-10-27 +### Fixed +- .NET 4.6 compiler issue (#261) + ## [4.4.0] - 2021-10-27 ### Added - Experimental glTF Editor Export (under main menu `File > Export` and via API `GLTFast.Export.GameObjectExport`; #249) diff --git a/Runtime/Scripts/Export/Constants.cs b/Runtime/Scripts/Export/Constants.cs index 4bd0e9b2..9244bf8e 100644 --- a/Runtime/Scripts/Export/Constants.cs +++ b/Runtime/Scripts/Export/Constants.cs @@ -17,6 +17,6 @@ namespace GLTFast.Export { static class Constants { - public const string version = "4.4.0"; + public const string version = "4.4.1"; } } diff --git a/Runtime/Scripts/Export/GltfWriter.cs b/Runtime/Scripts/Export/GltfWriter.cs index 4028cda0..a6873f6a 100644 --- a/Runtime/Scripts/Export/GltfWriter.cs +++ b/Runtime/Scripts/Export/GltfWriter.cs @@ -1206,8 +1206,8 @@ static bool Equals(int[] a, int[] b) { } public override int GetHashCode() { -#if NET_4_6 - return HashCode.Combine(meshId, materialIds); +#if NET_STANDARD + return HashCode.Combine(m_MeshId, m_MaterialIds); #else var hash = 17; hash = hash * 31 + m_MeshId.GetHashCode(); diff --git a/package.json b/package.json index adf28146..aef03dc4 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "com.atteneder.gltfast", - "version": "4.4.0", + "version": "4.4.1", "displayName": "glTFast", "description": "Use glTFast to import and export glTF 3D files efficiently at runtime or in the Editor", "unity": "2019.4",