{!See https://docs.google.com/document/d/1takg_GmIBBKKTj-GHZCwzxohpQz7Bhekivkk72kYMtE/edit for reference implementation of OneTrust, dataLayer and GTM} {!OneTrust Cookies Consent} {!OneTrust Cookies Consent end} {!dataLayer initialization push} {!dataLayer initialization push end} {!Google Tag Manager} {!Google Tag Manager end} Constructor RecompileScripts | Test Framework | 2.0.1-exp.2
docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Constructor RecompileScripts

    RecompileScripts()

    Creates a new instance of the RecompileScripts yield instruction.

    [UnitySetUp]
    public IEnumerator SetUp()
    {
        using (var file = File.CreateText("Assets/temp/myScript.cs"))
        {
            file.Write("public class ATempClass {  }");
        }
        AssetDatabase.Refresh();
        yield return new RecompileScripts();
    }
    Declaration
    public RecompileScripts()

    RecompileScripts(bool)

    Creates a new instance of the RecompileScripts yield instruction.

    Declaration
    public RecompileScripts(bool expectScriptCompilation)
    Parameters
    Type Name Description
    bool expectScriptCompilation

    This parameter 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.

    RecompileScripts(bool, bool)

    Creates a new instance of the RecompileScripts yield instruction.

    Declaration
    public RecompileScripts(bool expectScriptCompilation, bool expectScriptCompilationSuccess)
    Parameters
    Type Name Description
    bool expectScriptCompilation

    This parameter 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.

    bool expectScriptCompilationSuccess

    This parameter indicates if you expect a script compilation to succeed. If not succeeded then an exception will be thrown.

    In This Article
    Back to top
    Copyright © 2023 Unity Technologies — Trademarks and terms of use
    • Legal
    • Privacy Policy
    • Cookie Policy
    • Do Not Sell or Share My Personal Information
    • Your Privacy Choices (Cookie Settings)