summaryrefslogtreecommitdiff
path: root/Library/PackageCache/com.unity.test-framework@1.1.11/Documentation~/reference-recompile-scripts.md
diff options
context:
space:
mode:
authorAndrew Lee <alee14498@protonmail.com>2020-04-19 17:19:32 -0400
committerAndrew Lee <alee14498@protonmail.com>2020-04-19 17:19:32 -0400
commitc55fba8ab2a1c9d3df65eda4a5a1e957f4aa1f78 (patch)
treeee4d51c7c1d633e11f46453ef1edd3c77c4ef9f7 /Library/PackageCache/com.unity.test-framework@1.1.11/Documentation~/reference-recompile-scripts.md
downloadProject-Sandbox-c55fba8ab2a1c9d3df65eda4a5a1e957f4aa1f78.tar.gz
Project-Sandbox-c55fba8ab2a1c9d3df65eda4a5a1e957f4aa1f78.tar.bz2
Project-Sandbox-c55fba8ab2a1c9d3df65eda4a5a1e957f4aa1f78.zip
Inital commit
Diffstat (limited to 'Library/PackageCache/com.unity.test-framework@1.1.11/Documentation~/reference-recompile-scripts.md')
-rw-r--r--Library/PackageCache/com.unity.test-framework@1.1.11/Documentation~/reference-recompile-scripts.md22
1 files changed, 22 insertions, 0 deletions
diff --git a/Library/PackageCache/com.unity.test-framework@1.1.11/Documentation~/reference-recompile-scripts.md b/Library/PackageCache/com.unity.test-framework@1.1.11/Documentation~/reference-recompile-scripts.md
new file mode 100644
index 0000000..adead8e
--- /dev/null
+++ b/Library/PackageCache/com.unity.test-framework@1.1.11/Documentation~/reference-recompile-scripts.md
@@ -0,0 +1,22 @@
+# RecompileScripts
+`RecompileScripts` is an [IEditModeTestYieldInstruction](./reference-custom-yield-instructions.md) that you can yield in Edit Mode tests. It lets you trigger a recompilation of scripts in the Unity Editor.
+
+## Constructors
+
+| Syntax | Description |
+| ------------------------------------------------------------ | ------------------------------------------------------------ |
+| `RecompileScripts(bool expectScriptCompilation = true, bool expectScriptCompilationSuccess = true)` | Creates a new instance of the `RecompileScripts` yield instruction. The parameter `expectScriptCompilation` indicates if you expect a script compilation to start (defaults to true). If a script compilation does not start and `expectScriptCompilation` is `true`, then it throws an exception. |
+
+## Example
+``` C@
+[UnitySetUp]
+public IEnumerator SetUp()
+{
+ using (var file = File.CreateText("Assets/temp/myScript.cs"))
+ {
+ file.Write("public class ATempClass { }");
+ }
+ AssetDatabase.Refresh();
+ yield return new RecompileScripts();
+}
+``` \ No newline at end of file