Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. Dismiss Notice

Not able to build and run with HDRP

Discussion in 'Editor & General Support' started by Saxxoo, Aug 23, 2020.

  1. Saxxoo

    Saxxoo

    Joined:
    Aug 15, 2020
    Posts:
    3
    I'm running Unity 2020.1.3f1

    This happened with the HDRP option enabled on the project
    When I try to build and run, I get the error below. I also tried doing a build and run from a fresh start with nothing added or removed, same error received.
    If I run with the 3D option, I have no issues with build and run.

    I'm rather new to Unity so not sure why or how to fix this issue.


    unity_error.jpg
     
  2. AlanMattano

    AlanMattano

    Joined:
    Aug 22, 2013
    Posts:
    1,500
    Hellow. Welcome to this forum! I'm a user like you.
    So looking the first error looks like il2cpp is triggering the problem.

    HDRP is a more advanced topic: I suggest using the build-in default rendering instead of URP or HDRP.
    Anyway: Here is a tutorial on how to set it up:
    https://learn.unity.com/project/up-and-running-with-hdrp

    Returning to your problem,
    Do you have installed the package il2cpp?
    Is IL2CPP installed and set up correctly?

    https://docs.unity3d.com/Manual/IL2CPP.html

    As to how I understand, essentially C# is more simple to use but slower to run. IL2CPP converts the Unity C# to C++. So it runs faster becue uses the C++ compiler. "IL2CPP" is the conversion system. For example, if you divide 0/0 in c++ you get an error. Not controlling that the game runs faster. But sometimes is not what you what and it has some checkbox that need to be configured:

    https://docs.unity3d.com/Manual/IL2CPP-CompilerOptions.html

    The "emit null checks" in the message warning error: can be that need some of these booleans to be setup?
     
    Last edited: Aug 24, 2020
  3. Saxxoo

    Saxxoo

    Joined:
    Aug 15, 2020
    Posts:
    3
    Hi AlanMattano
    Everything is installed from the Hub with as far I know no issues.
    il2cpp is also installed as a module from there (it would say il2cpp not installed if I tried to build without it).
    I wasn't aware that it was possible to click the error and see full details on the error and here I could see that to build it wanted to have visual studio 2015 and 2017 installed... after those installed, build and run worked perfectly.
    Thanks for taking the time in helping!