Skip to content

Commit 397902a

Browse files
committed
Use IEffectConstructor<FogEffect> only in .Net 7 or greater
1 parent c60b50f commit 397902a

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

Ab4d.SharpEngine.Samples.Common/Advanced/FogEffect.cs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,10 @@
1111

1212
namespace Ab4d.SharpEngine.Samples.Common.Advanced;
1313

14-
public class FogEffect : Effect, IEffectConstructor<FogEffect>
14+
public class FogEffect : Effect
15+
#if NET7_0_OR_GREATER
16+
, IEffectConstructor<FogEffect> // interface with static method is required for native AOT compilation of EffectManager class
17+
#endif
1518
{
1619
private static readonly string LogArea = typeof(FogEffect).FullName!;
1720

0 commit comments

Comments
 (0)