Cannot open ShooterGame on Mac

I’m trying to open the ShooterGame sample using UE4Editor compiled with Xcode from full source on my mac. It fails to open with the following error:

“The game module ‘ShooterGameLoadingScreen’ could not be found. Please ensure that this module exists and that it is compiled.”

I experience the same issue with my own projects unless I run them by compiling the “[ProjectName]Editor” target in Xcode and running the editor that way. I can’t open them if I run the UE4Editor any other way.

Some people have mentioned similar issues on the forum, however that was resolved for them by building the “Development Editor” target in Visual Studio… I don’t seem to be able to resolve the issue using any of the targets in Xcode. Any help would be awesome!

Thanks.

Did you build ShooterGameEditor target? If you did, please let me know what scheme and configuration are you trying to run, what is your executable to run set in the scheme and what the arguments to run are set to.

Ah, OK, now I know more and should be able to help you :slight_smile:

First of all, if you right click on a .uproject file, you should be able to generate Xcode project for it using one of Services UE4 provides.

But, for what you’re trying to do, that may not be necessary, depending on what you want. Here’s what’s going on:

When you build the editor in Xcode, by default the project is set to build and run Debug. It also, if I remember correctly, sets -debug as one of the launch arguments. This means that when you try to run the editor for ShooterGame using default project settings, it’s trying to load debug ShooterGame binaries. It can’t do this, though, because the samples you download from Marketplace only contain Development binaries.

To make it work, you have two options:

  1. Use .uproject file’s generate project option to generate an Xcode project for ShooterGame and build Debug binaries compatible with Debug editor you have, or

  2. [As it turned out, this is not working in UE4 4.0.1 - sorry! It will work this way in 4.1] Switch the editor you build to Development. To do this, you have to edit UE4Editor scheme - change config to Development, executable to Run to UE4Editor.app (you may need to built it first - Xcode doesn’t make setting that easy) and make sure that arguments to launch do not include -debug

Hope this helps.

Hi Michael,

The ShooterGame sample doesn’t come with an .xcodeproj file… But this is what I have been doing with my own projects… Is there a way to generate it?. I am completely new at UE so am still trying to grasp how the build system works etc.

Thanks for being so helpful Michael.

I did manage to get it to open using method 1, I did not know about the service to generate the Xcode project… so this was useful to learn!

I did however initially try method 2, but couldn’t get it to work that way. These are the steps I followed:

  1. Opened UE4.xcodeproj that is in the root of the UnrealEngine (the one that’s generated from GenerateProjectFiles.command.

  2. Set scheme to UE4Editor - Mac, and changed the Build Configuration to Development, set the Executable to [UnrealEngineRoot]/Engine/Binaries/Mac/UE4Editor.app and ensured the arguments didn’t include -debug.

  3. Cleaned the project, and rebuilt.

  4. I then ran UE4Editor.app, but got the same error when attempting to open the ShooterGame.uproject file.

It’s not a huge deal, as I’ve managed to get it working through the other method, but I’d be interested to know if I’ve done something wrong, or am missing something as it is quite confusing!

Glad I could help. As for the method 2, it seems you did everything right, so I’m confused. Let me try to reproduce this. Maybe I’m forgetting about something.

I tried method 1 but I can’t see -debug anywhere. I tried setting the Scheme to debug and development but the results are the same in both cases. I would very much like to use method one but it just doesn’t seem to make any difference…

Any assistance, please?

Could I please get some clarity on point 2 mentioned in the above post by Aaron, please:
Set the Executable to [bla]
When I am editing the scheme, below the Build Config that I set to Development, it offers me a dropdown box named “Executable”. Inside here I have various things like StateViewer, UE4Client, UE4Game etc and there is one option called “UE4Editor-Mac-Debug.app”. there is no "UE4Editor like Aaron said he set the Executable to… Does that mean I have to set that somewhere else or where/how do I do that step?

Also, you said to make sure -debug is not set and he said he did so but I don’t see -debug in either debug or development Scheme… Where, exactly, is this setting I am supposed to verify? I can;t just assume that if I can’t FIND it then it doesn’t exist since my experience with XCode is so limited it took me nearly half an hour to figure out how to get to the Schemes so for all I know this is set somewhere else inside a third level submenu somewhere… :frowning:

Please… can you help a guy out? :frowning:

i have the same problem.
i think you got /Binaries/Mac/UE4Editor-ShooterGame-Mac-DebugGame.dylib as result of compilation
and editor expects UE4Editor-ShooterGame.dylib. the same thing with shootergameloadingscreen module.
just remove that -Mac-DebugGame, and editor will run =)
p.s. if you press ‘run’ from xcode, it will run editor passing actual compiled name( with that -Mac-DebugGame postfix) and it will start

Here’s some explanation on how these things work. Hope it’ll help.

First of all, currently dylib version numbers from binary builds and source code builds are incompatible. This means that if you want to open ShooterGame sample with the editor you compiled yourself, you need to generate ShooterGame Xcode project and build new binaries for it.

Also, the build configuration (Debug, Development) of your editor must match build configuration of the game dylibs. There’s one exception - if you run the editor with -debug, it’ll always try to load debug game dylibs, regardless of editor build config. This is to allow debugging game without sacrificing the editor’s performance.

I’m currently working on major changes to Xcode projects layout, configurations etc., so hopefully some of this stuff will get cleaner and better soon. I’ll post an update here with info about the changes once we release them.

Yes, I did forget something - dylib version numbers from binary builds and source code builds are currently incompatible, to open a sample in source build, you need to recompile them. See my other post on this page. Sorry for misleading you earlier.

What am I doing wrong here?

http://www.mybadstudios.com/ImageHosting/Shot2.png

http://www.mybadstudios.com/ImageHosting/Shot3.png

http://www.mybadstudios.com/ImageHosting/ShotError.png

You need to use Other… in this menu and browse to UE4Editor.app to run it in Development. It’s one of few very annoying things in Xcode that I hope Apple will fix one day.

Interesting… Who knew…?

I knew there was a reason why I avoided using Xcode all these may years :stuck_out_tongue: Thanks. I’ll give that a go a little later tonight.