From 1b833f4d818f3151ba44b15693d882f8a784841f Mon Sep 17 00:00:00 2001 From: Antoine Lassauzay Date: Sat, 10 Dec 2016 17:23:48 -0500 Subject: [PATCH] Change required for Unity builds --- csharp/Facebook.CSSLayout/CSSNode.Create.cs | 2 ++ csharp/tests/Facebook.CSSLayout/CSSLayoutRoundingTest.cs | 6 +++++- csharp/tests/Facebook.CSSLayout/CSSNodeCreateTest.cs | 2 ++ 3 files changed, 9 insertions(+), 1 deletion(-) diff --git a/csharp/Facebook.CSSLayout/CSSNode.Create.cs b/csharp/Facebook.CSSLayout/CSSNode.Create.cs index 1b88342..65edd33 100644 --- a/csharp/Facebook.CSSLayout/CSSNode.Create.cs +++ b/csharp/Facebook.CSSLayout/CSSNode.Create.cs @@ -19,6 +19,7 @@ namespace UnityEngine.CSSLayout internal partial class CSSNode // END_UNITY { +#if ENABLE_CS_OPT_ARGS // Optional C# arguments are not supported by some Unity builds public static CSSNode Create( CSSDirection? styleDirection = null, CSSFlexDirection? flexDirection = null, @@ -241,5 +242,6 @@ namespace UnityEngine.CSSLayout return node; } +#endif //ENABLE_CS_OPT_ARGS } } diff --git a/csharp/tests/Facebook.CSSLayout/CSSLayoutRoundingTest.cs b/csharp/tests/Facebook.CSSLayout/CSSLayoutRoundingTest.cs index cfd11f1..26fa28e 100644 --- a/csharp/tests/Facebook.CSSLayout/CSSLayoutRoundingTest.cs +++ b/csharp/tests/Facebook.CSSLayout/CSSLayoutRoundingTest.cs @@ -11,8 +11,12 @@ using System; using NUnit.Framework; +// BEGIN-UNITY +using UnityEngine.CSSLayout; -namespace Facebook.CSSLayout +// namespace Facebook.CSSLayout +// END-UNITY +namespace CSSLayoutTests { [TestFixture] public class CSSLayoutRoundingTest diff --git a/csharp/tests/Facebook.CSSLayout/CSSNodeCreateTest.cs b/csharp/tests/Facebook.CSSLayout/CSSNodeCreateTest.cs index da942c5..4fb4e4a 100644 --- a/csharp/tests/Facebook.CSSLayout/CSSNodeCreateTest.cs +++ b/csharp/tests/Facebook.CSSLayout/CSSNodeCreateTest.cs @@ -20,6 +20,7 @@ using UnityEngine.CSSLayout; namespace CSSLayoutTests // END-UNITY { +#if ENABLE_CS_OPT_ARGS // Optional C# arguments are not supported by some Unity builds [TestFixture] public class CSSNodeCreateTest { @@ -145,4 +146,5 @@ namespace CSSLayoutTests Assert.AreEqual(26, node.MaxHeight); } } +#endif //ENABLE_CS_OPT_ARGS }