Skip to content

Commit d2f0091

Browse files
committed
WebGL preprocessor macros
1 parent 11e82b7 commit d2f0091

File tree

8 files changed

+19
-11
lines changed

8 files changed

+19
-11
lines changed

SkiaUnity/Assets/SkiaSharp/Editor/HBTextBlockEditor.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#if UNITY_EDITOR
1+
#if UNITY_EDITOR && !UNITY_WEBGL
22

33
using SkiaSharp.Unity.HB;
44
using UnityEngine;
@@ -264,4 +264,4 @@ private static void RenderTextures() {
264264
}
265265

266266
}
267-
#endif
267+
#endif

SkiaUnity/Assets/SkiaSharp/Editor/SVGEditor.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#if UNITY_EDITOR
1+
#if UNITY_EDITOR && !UNITY_WEBGL
22

33
using SkiaSharp.Unity;
44
using SkiaSharp.Unity.HB;

SkiaUnity/Assets/SkiaSharp/Editor/SkottiePlayerEditor.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#if UNITY_EDITOR
1+
#if UNITY_EDITOR && !UNITY_WEBGL
22
using System.Reflection;
33
using SkiaSharp.Unity;
44
using UnityEditor;
@@ -146,4 +146,4 @@ private static void RenderTextures() {
146146
}
147147

148148
}
149-
#endif
149+
#endif

SkiaUnity/Assets/SkiaSharp/Editor/SkottiePlayerV2Editor.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#if UNITY_EDITOR
1+
#if UNITY_EDITOR && !UNITY_WEBGL
22
using System.Reflection;
33
using SkiaSharp.Unity;
44
using UnityEditor;
@@ -177,4 +177,4 @@ private static void RenderTextures() {
177177
}
178178

179179
}
180-
#endif
180+
#endif

SkiaUnity/Assets/SkiaSharp/Runtime/HB_TEXTBlock.cs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
#if !UNITY_WEBGL
12
using System;
23
using System.Collections;
34
using System.Collections.Generic;
@@ -744,4 +745,5 @@ public void RefreshFontFamily() {
744745
}
745746
}
746747
}
747-
}
748+
}
749+
#endif

SkiaUnity/Assets/SkiaSharp/Runtime/SVGLoader.cs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
#if !UNITY_WEBGL
12
using System;
23
using UnityEngine;
34
using Svg.Skia;
@@ -80,4 +81,5 @@ public void CalculateLayoutInputVertical() { }
8081
public float flexibleHeight { get; }
8182
public int layoutPriority { get; }
8283
}
83-
}
84+
}
85+
#endif

SkiaUnity/Assets/SkiaSharp/Runtime/SkottiePlayer.cs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
#if !UNITY_WEBGL
12
using System;
23
using Newtonsoft.Json;
34
using UnityEngine;
@@ -223,4 +224,5 @@ private void OnDestroy() {
223224

224225
}
225226
}
226-
}
227+
}
228+
#endif

SkiaUnity/Assets/SkiaSharp/Runtime/SkottiePlayerV2.cs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
#if !UNITY_WEBGL
12
using System;
23
using System.IO;
34
using System.Text;
@@ -236,4 +237,5 @@ private void OnDestroy() {
236237

237238
}
238239
}
239-
}
240+
}
241+
#endif

0 commit comments

Comments
 (0)