Skip to content

Commit 977ea8f

Browse files
committed
fix build error
1 parent 6f15564 commit 977ea8f

File tree

4 files changed

+11
-2
lines changed

4 files changed

+11
-2
lines changed

CHANGELOG.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,9 @@ All notable changes to this package will be documented in this file.
44
The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/)
55
and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html).
66

7+
## [2.18.2] - 2025-10-15
8+
- fix: Unity Build error
9+
710
## [2.18.1] - 2025-10-15
811
- fix: visibility animation tracks changed to unsigned byte data type (0 = false, >0 = true) and STEP interpolationtype
912
- add: Interactivity: merging on export of onSelect, onHoverIn and onHoverOut with same target (spec allows only once per target)

Runtime/Scripts/Interactivity/Export/CleanUp/PointerEventsReductionCleanUp.cs

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
#if !UNITY_EDITOR
2+
using UnityEngine;
3+
#endif
4+
15
using System.Linq;
26
using UnityGLTF.Interactivity.Schema;
37

@@ -8,7 +12,7 @@ public class PointerEventsReductionCleanUp : ICleanUp
812
#if UNITY_EDITOR
913
[UnityEditor.InitializeOnLoadMethod]
1014
#else
11-
[RuntimeInitializeOnLoadMethod]
15+
[UnityEngine.RuntimeInitializeOnLoadMethod]
1216
#endif
1317
private static void Register()
1418
{

Runtime/Scripts/SceneExporter/ExporterAnimationPointer.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -109,6 +109,7 @@ public void AddAnimationData(Object animatedObject, string propertyName, GLTFAni
109109
string extensionName = null;
110110
var propertyType = values[0]?.GetType();
111111
bool isBoolean = propertyType == typeof(bool);
112+
#if UNITY_EDITOR
112113
if (TryGetCurrentValue(animatedObject, propertyName, out var currentValue))
113114
{
114115
// For bool, we always want to export as byte (0,255). Unity is using float for animation curves of bool properties.
@@ -118,6 +119,7 @@ public void AddAnimationData(Object animatedObject, string propertyName, GLTFAni
118119
interpolation = InterpolationType.STEP;
119120
}
120121
}
122+
#endif
121123

122124
var animationPointerExportContext = _plugins.FirstOrDefault(x => x is AnimationPointerExportContext) as AnimationPointerExportContext;
123125

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "org.khronos.unitygltf",
33
"displayName": "UnityGLTF",
4-
"version": "2.18.1",
4+
"version": "2.18.2",
55
"unity": "2021.3",
66
"description": "Import and export glTF 2.0 assets, both in the editor and at runtime. Excellent support for animations, materials, extensions. Can be extended with plugins for both import and export use cases.",
77
"repository": {

0 commit comments

Comments
 (0)