diff --git a/Annotations/TestHelper.Monkey.Annotations.asmdef b/Annotations/TestHelper.Monkey.Annotations.asmdef index dee84c7..3b1a7ec 100644 --- a/Annotations/TestHelper.Monkey.Annotations.asmdef +++ b/Annotations/TestHelper.Monkey.Annotations.asmdef @@ -8,7 +8,9 @@ "overrideReferences": false, "precompiledReferences": [], "autoReferenced": false, - "defineConstraints": [], + "defineConstraints": [ + "UNITY_INCLUDE_TESTS || COM_NOWSPRINTING_TEST_HELPER_ENABLE" + ], "versionDefines": [], "noEngineReferences": false -} +} \ No newline at end of file diff --git a/README.md b/README.md index 1c23177..5f084d2 100644 --- a/README.md +++ b/README.md @@ -240,6 +240,14 @@ public class MyIntegrationTest +## Use in runtime code + +The "Define Constraints" is set to `UNITY_INCLUDE_TESTS || COM_NOWSPRINTING_TEST_HELPER_ENABLE` in this package's assembly definition files, so it is generally excluded from release builds. + +To use the feature in release builds, add `COM_NOWSPRINTING_TEST_HELPER_ENABLE` to the "Define Symbols" at build time. + + + ## Installation You can choose from two typical installation methods. diff --git a/Runtime/TestHelper.Monkey.asmdef b/Runtime/TestHelper.Monkey.asmdef index c9db582..345b094 100644 --- a/Runtime/TestHelper.Monkey.asmdef +++ b/Runtime/TestHelper.Monkey.asmdef @@ -13,7 +13,9 @@ "overrideReferences": false, "precompiledReferences": [], "autoReferenced": false, - "defineConstraints": [], + "defineConstraints": [ + "UNITY_INCLUDE_TESTS || COM_NOWSPRINTING_TEST_HELPER_ENABLE" + ], "versionDefines": [], "noEngineReferences": false } \ No newline at end of file