How to install Visual Studio on Mac?

I’ve been struggling almost two weeks trying to use different IDEs with UE4 on Mac. I’ve tryed QTCreator and CLion as alternatives to XCode and VS for Windows. But all my efforts were idle.
REALLY: there is no better IDE for UE4 than VS 2015!

##In thins solution the idea is to use UE4Editor on your Mac OS, but Visual Studio 2015 on virtual Windows machine in parallel.

As some guys mentioned in course they have some problems with very slow intelli sence in VS there is only one solution: install Visual Assist extension for VS as Ben kindly mentioned. He even provided us with license key for Students version!

FOR THOSE OF YOU WHO ARE USING MAC BUT DON’T KNOW HOW TO INSTALL VS ON VIRTUAL MACHINE: (this solution is not perfect and requires much hard drive memory and high CPU and RAM consumption, so if your Mac is old probably this won’t help you)


My system info is:
MacBook Pro (Retina, 15-inch, Mid 2015)
processor: 2.5 GHz Intel Core i7
memory: 16 GB 1600 MHz DDR3
graphics: AMD Radeon R9 M370X 2048 MB


#Cooking VS on Mac (Instruction):

  1. Install latest version of Virtual Box.

  2. Install Windows 7,8,10 in VirtualBox (and adjust more ram for virtual system 4GB would be enough and all of your CPU cores to enhance VS performance and installation, also you must create virtual disk for system not less than 60 GB!!!).

  3. Install Visual Studio with Common Tools for C++.

  4. Install Unreal Engine on your Windows Virtual Machine (this is for your VS project files ability to read all headers macros etc.)

  5. Install Visual Assist X extension for VS on virtual machine.(it makes your VS fly like a bird trust me!)

  6. Make sure you’ve installed UE4 on your mac.

  7. Install Guest Additions for VirtualBox (this helps you to create Shared folders between your Mac and your virtual Windows machine, also allows you to make your virtual machine screen resolution fullscreen as you really running native windows system, it is very comfortable when you use VS in virtual machine).

  8. Create shared folder for Virtual Box and access it from your virtual Windows after installing guest additions. (the folder must be in Network tab in FileExplorer)

  9. Put your project in Shared Folder. Now you are able to access it from Mac and virtual Windows at the same time. But if you generate solution files for VS in Shared Folder (in Network) VS will not recognize it as a UE4 project. It is not over yet, still something to do. :wink:

  10. Install Synkron or some alternative app which will help you quickly sync between two folders in virtual Windows machine.

  11. Copy your entire project folder from Shared Folder somewhere to your virtual Windows system.

  12. Use Synkron or other tool to sync two folders: 1. From your Shared Folder with Mac (in Network 2. Fresh copied folder. You need to sync every time you make changes in your project. You can adjust Scheduler in Synkron by the way

  13. Now finally you are ready to generate your .sln files for VS in Windows run cmd and go to: C:/Program Files/Epic Games/4.10/Engine/Binaries/DotNET

  14. in this folder in command line run: UnrealBuildTool.exe -projectfiles -project="path\to\your\.uproject file" -game -rocket -progress
    (it will generate .sln file in your project folder. ATTENTION!: generate project files for your virtual folder you’ve just copied to Windows machine! not the Shared Folder!

  15. Open .sln file in VS, waint untill Visual Assist parse through all files, it will take a while but still fast if you use all af your cores for virtual Windows.

VOILA!

Now you can simply edit your project and sync folders between Mac and Windows

Use UE4 on Mac to test your code and game. It is faster and more comfortable. Also after changes in code in virtual Windows VS compile your code directly in Unreal Engine Editor.

P.S. I know this is not very clean solution but I finally get VS with it beautiful features working on Mac. If you have another ways feel free to share it. Also this is not very detailed explanation on how to get it working if you really face some problems following this instruction I can help or even share MORE detailed instruction here on forums.

Thank you for your attention. Have Fun! :slight_smile:

#UPDATE:

There is no actually need to use Synchron for creating new folder for your project in Windows. VS2015 works fine using file from Shared virtual folder.

##One more thing!
Every time you add new C++ class you need to regenerate .sln file in order VS2015 to see it in solution.

1 Like

Hi, I’ve created a VM with Windows 10 Enterprise (as I have a Volume License available) using VirtualBox 5.1.6 on macOS Sierra. I installed VisualStudio Community 2015 without issues, but it seems like the Epic Launcher doesn’t work (I installed it, but I cannot run it, nothing happens and no errors are shown). I’m wondering which exact settings you’ve used on VirtualBox and which Windows you’ve used (I can use another one if that simplifies the process).

I really need to try this because there is a serious known issue with XCode 8 and UE4 which makes impossible to use it until Apple fixes the problem.

Thanks in advance.

Just for the record you don’t need to go to all this trouble for using VS on Mac.

There are a ton of IDEs for C++ on Macos

Recently I tried CodeLite a free open source IDE dedicated to C++ , it took a bit of setup but I got it working and can autocomplete unreal API.

Others include Eclipse , emacs , vim , Netbeans , QT creator , Code::Blocks , CLion, Geany and many more.

They are free and native Mac apps .

Is VS the best IDE for Unreal ? Nope far from it… IDEs like emacs and vim are far more powerful and the rest of them at least as capable

So there is very little reason to use VS on Mac other than that is the IDE that this course uses.

Hello, thanks a lot for your answer.

The usage of a Windows VM with VS2015 was just an experiment to see if that was a viable solution, but I’m happy with any alternative. Unfortunately, I haven’t found a procedure about how to create and maintain the project files for another IDE.

For me any solution that doesn’t involve Windows is always preferred, as I’ve been using MacOS/Linux as my main operating systems for years. I’m happy to hear I can use any other IDE, specially Eclipse (as I use it every day for my main job).

I don’t have preferences on a specific IDE, I just want an alternative to both VisualStudio and XCode. For VisualStudio because I’m not (and never will be) a Windows user, and for XCode, because XCode 8 doesn’t work with UE4 and it doesn’t seem we’re going to have a fix soon, besides the limitations that XCode has compared to other IDEs (I regret upgrading from El Capitan to Sierra just because of this).

I’m just looking for an alternative with code completion as I’m learning C++. I’m a senior Java developer, so I’m sure that get used to C++ won’t be a problem, but I can’t just use VIM like I do with other programming languages until I’m fluent enough with C++ :wink:

I’m also new for UE4 in general so any pointers about how to use any other IDE would be very appreciated, as for now, I was even thinking on finish the course with just Blueprints and ignore the fact that this is a C++ course :wink:

Thanks!

I think I found how to do it with CodeLite. Take a look at what I said here:

https://answers.unrealengine.com/questions/494374/unrealbuildtool-cannot-find-its-csproj-file.html#answer-502950

It seems like I should run UBT every time I create a new class from within the UE4 Editor. Does this make sense to you ? I haven’t played enough well with this yet.

It would be wonderful if I can do something similar with Eclipse, as that editor is more familiar to me, but for now CodeLite is a good alternative.

That wont be necessary , because I use now

/Users/Shared/UnrealEngine/4.13/Engine/Build/BatchFiles/RunUAT.sh BuildCookRun -project="/Users/kilon/Documents/Unreal Projects/Periastron/Periastron.uproject" -noP4 -platform=mac -clientconfig=Development -allmaps -build  

UAT is also what the editor uses, which in turn is using UnrealBuilderTool and some other tools

Download Codelite and you can create a workspace, then a project , add the folder with your C++ files (Source) and you can right click on the project go to setting, go to build and enable custom build and add the above line

http://www.codelite.org/

Still this is unnecessary since Unreal advises not to use the build facilities of the IDE but rather use the compile button from inside the editor for proper hot reload.

You will be wanting also some nice autocompletion go to file -> open directory and choose the /Users/Shared/UnrealEngine/4.13/Engine/Source folder will add several folders to your project and will start parsing the header files for auto completion. You will see a “Worksapce parsing” down bellow the tree folder view , you will have to let it finish for the autocompletion, but it wont do it again as long as you save the workspace. It may take some time , be patient.

I have also added the following sub folders for even more auto completion , in Settings -> Autocompletion Settings -> Ctags -> Shared Paths

/Users/Shared/UnrealEngine/4.13/Engine/Source
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1
/usr/local/include
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/clang/8.0.0/include
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include
/usr/include
/System/Library/Frameworks
/Library/Frameworks
/usr/include/c++/4.2.1/backward

Codelite comes with a nice documentation but is very simple to use and unlike XCODE has very powerful refactoring capabilities.

I have not tested debugging but most likely I will be moving to Emacs which is even more powerful and is what I am familiar with.

On the other hand I really like Codelite so maybe I will use both :slight_smile:

Oh by the way you will be needing VS anyway for building your game on windows

CodeLite works on windows , mac and linux. So if you want one IDE to rule them all Codelite fits the bill.

Should be similar process for other IDEs but I have only played around with CodeLite, so you are on your own.

I will continue to explore Unreal build process to speed up the compile times and link time because they are ridiculously slow. This is also a good reason why you should avoid using C++.

The general rule of thumb is the following:

If something can be done with Blueprints , it should be done in Blueprints, if its proven too slow after some profiling then make sure its not your code that is the culprit , if yes then improve if no then its the right time to use C++ for that piece of code.

1 Like

Thank you very much for the details. That’s a very good start point for using CodeLite for now, but I agree about Blueprints vs C++ :wink:

I really appreciate your help!

2 Likes

I just started this course and did a lot of research on C++ on a MAC. I looked at setting up a Windows VM, but decided that would be an absolute last resort. I am brand new to coding so a free IDE assumed I had knowledge that i don’t, yet.

I decided to pay the annual fee for AppCode. It supports all types of languages, including many that Xcode does not support. In addition, i was able to edit the ‘HelloWorld’ app in both IDE’s w/o issue.

Look into AppCode for those who are still deciding.

Privacy & Terms