Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

[Feature Request] Scripting with C++ Hot Reload

Discussion in 'Scripting' started by PatitoMaster, Dec 3, 2019.

?

Create a feature request for C++ Hot Reload?

  1. Yes

    33.3%
  2. No

    66.7%
  1. PatitoMaster

    PatitoMaster

    Joined:
    May 20, 2018
    Posts:
    3
    Hi there, a question!

    How we can do a feature request? If you try c++ hot reload from www.hotreload.tech have the same system as Unity3d C# but with C++, natively built with C++ for PC and macOS.

    Is there a way to file a feature request for Unity3d Engineers?
    Thanks!
     
  2. Yoreki

    Yoreki

    Joined:
    Apr 10, 2019
    Posts:
    2,605
    I'm not sure i understand you correctly. Are you effectively saying they should swap out C# for C++ with hot reload? Why? Sure, C++ is a tad more efficient, but we now have DOTS for efficiency, and replacing an entire language would be more than a feature request.
     
  3. PatitoMaster

    PatitoMaster

    Joined:
    May 20, 2018
    Posts:
    3
    DOTS it's a great addition but is like kick the ball forward and C++ will not be against DOTS. If you have direct connection with the internal GameFramework of Unity3d in C++ instead of pass through the layers of multiple wires until C# can be more than an optimization. C# and Mono add on top size and other things... not against it! but be connected directly with the Unity3d C++ engine could be really appreciate it.

    We cannot forget that Unity3d internally is written in C++ also and all the stack of C# technology on top is not making the performance closer to UE4 or Crytek or other custom game engine technologies.
     
  4. PatitoMaster

    PatitoMaster

    Joined:
    May 20, 2018
    Posts:
    3
    Oh! to answer specifically this: "Are you effectively saying they should swap out C# for C++ with hot reload?"

    No, no need to swap out C#, you can still using C# and C++, just C++ can be connected directly to the C++ implementation of the Unity3d GameFramework.
     
  5. PencilBow

    PencilBow

    Joined:
    Jun 23, 2017
    Posts:
    131
    You don’t need to really touch any of the internal C++ to get some hot reload functionality working with Unity.

    We built a C# Hot Reload extension for Unity which we just recently made public, and it works pretty much as you’d expect Unity’s default “hot reload” functionality to work but with lightning fast compiling and no domain reload (so your variables stay intact). Basically we made a C# compiler which only compiles the specific method that changed (which is very fast, milliseconds), and then we swap just that function in playmode. Now we have < 1 second iteration times in our project rather than 2-3 minutes.

    Feel free to check it out on our website hotreload.net or on our Unity Forum post.