cooking problem

Hi everybody,

I have problems with cooking.
I’m using UE4.12.5 / project no code (porpous archiviz) / engine version come from the Epic Games Launch / PC win10 .

I added a blank code class, but can not find .sln file?!, looks like that it was not created, I did searcz on all machine?
but message I have got was
“Successfully added class ‘TomaszDevClass’, however you must recompile the ‘XXXXXX2’ module before it will appear in the Content Browser. Failed to generate project files.Would you like to open the Output Log to see more details?”

Output log in attachement.

Can you advise pls?
(I’m archivis designer with no programming background)

Hello Bimbachi,

Whenever the editor tells you that you need to recompile the module, it’s because something failed in Visual Studio. In this case, it seems that the project files themselves are having issues being generated due to an issue in your XXXXXX2.Target.cs.

Can you open that file in Visual Studio and copy/paste the content here or, if it’s too long, on pastebin and provide the link? I’ll need to take a look so I can see what may be wrong.

If you’re curious, here is the error message that led me to that:

c:\Users\HyperWorks\Documents\Unreal Projects\xxxxxx2\Intermediate\Source\XXXXXX2.Target.cs(6,14) : error CS0101: The namespace '<global namespace>' already contains a definition for 'XXXXXX2Target'

Hi Mathhew,
Here is what in VisualStudio shows in XXXXXX2.Target.cs file.

<<
// Fill out your copyright notice in the Description page of Project Settings.

using UnrealBuildTool;
using System.Collections.Generic;

public class XXXXXX2EditorTarget : TargetRules
{
	public XXXXXX2EditorTarget(TargetInfo Target)
	{
		Type = TargetType.Editor;
	}

	//
	// TargetRules interface.
	//

	public override void SetupBinaries(
		TargetInfo Target,
		ref List<UEBuildBinaryConfiguration> OutBuildBinaryConfigurations,
		ref List<string> OutExtraModuleNames
		)
	{
		OutExtraModuleNames.AddRange( new string[] { "XXXXXX2" } );
	}
}
>>

hmm? :slight_smile: I can only try guessing - is this something about naming inside my project?
maybe I used some letters from east-European polish language coding? sometimes it makes problems

regards

in case, I’m posting screen shot also

That could likely be the cause. Unreal doesn’t deal very well with special characters in the names of classes/projects/assets. It seems that from the error that the issue may be elsewhere, as it seems like XXXXXX2Target is being declared in multiple places at once. I would suggest making a new project without these special characters to see if you get different results.

Meanwhile I checked - project has NO special characters :slight_smile: this time.

What do you mean “seems like XXXXXX2Target is being declared in multiple places at once”? I dont understand this :frowning: if you can expain this.

I apologize, I used the wrong terminology. I meant “definition”, not “declaration”. Line 6 in the code that you posted would be the class declaration for XXXXXX2Target, while the rest of the file, all the way down to line 25, is the definition of the class.

Could you upload the source code from this project? What I would need is the Source folder in the project’s main directory (c:\Users\HyperWorks\Documents\Unreal Projects\xxxxxx2). This seems like an issue that could be anywhere in the project so it would be best to look at the whole thing.

ok here it is

link text

Nothing seems wrong with the code so the issue shouldn’t be there. Please try the following:

  1. Delete your Binaries, Intermediates, and Saved folders.
  2. Close the Editor and Visual Studio if they’re open
  3. Right-click the .uproject file for the project and select "Generate Visual Studio project files

This should regenerate the Intermediates folder and create the .sln for the project. If it doesn’t, does it give you any errors? If it does, please open the .sln, compile the project, and then try opening the project and packaging.

" Delete your Binaries, Intermediates, and Saved folders."
I dont have “Binaries” folder?

That’s fine, that just means that the project hasn’t been successfully compiled before. You can ignore it if it isn’t there any continue with the steps.

after step 3., I have error:

Running C:/Program Files/Epic Games/4.12/Engine/Binaries/DotNET/UnrealBuildTool.exe -projectfiles -project=“C:/Users/HyperWorks/Documents/Unreal Projects/xxxxxx2/XXXXXX2.uproject” -game -rocket -progress
Discovering modules, targets and source code for project…
ERROR: Couldn’t find module rules file for module ‘SpaceNav3D’.

“SpaceNav3D” I have plugin for 3dconnection. I did try with plugin switched-off, - and error message was the same.
I found this plugin on Forum, here is a link:

If this plugin has been added directly to this project, I suggest making a copy of the plugin elsewhere and deleting the plugin from your project and trying again.

If the plugin is installed to your engine installation, try right-clicking the .uproject file and editing it with a Text Editor like Notepad. There may be an entry about this plugin in there. If so, it should say “true” below the name, indicating that it is activated. Change this to false and then save the file and try again from step 1 in my previous comment.

If this does work successfully, you’ll need to speak to the developer of this plugin about how to fix the issues you’re encountering.

done
and error still is :frowning:

" speak to the developer of this plug-in about how to fix the issues you’re encountering "
I think it will be difficult to have solution.

? Can I create new project with no plug-in installed and move my Content folder in to avoid starting from zero??

You can create a new project and not lose anything. Create the new project and then open your existing one. In the Content Browser, right-click the Content folder and select “Migrate…”. It should show you all of the assets that it is going to migrate. Hit Ok and it’ll come up with a file browser. Locate your new project and select its Content folder and then hit Ok. After the migration is complete, your new project should be good to go. This way works better than directly copying the assets as it ensures that all of the references stay intact.

Hi ,

I’m back - well I did migrate, problem with cooking continued.So I started switch off other plug-ins. And after turning off Substance (I think? :-)) adding empty class succeeded.

And when I added empty class all started. Afterwards I think, I was not able to Cook so I tried Package (build for development) win64, and - It was done finally :-).
So know I have a game in the folder that I indicated when Packed and … I found other one (?) in > Project/Binaries folder.

so 1st question - why I have 2 location for game and what is a difference between this in Binaries and that in Packed destination folder?
next…
My game has split screen to 2 same-content screens - something like for stereo-viewing?

so my 2nd question is - how to exit this to normal (one) screen … and what are the interface commands in Game? what I can do when I’m in Game beside moving around? (I noticed for example - F5 key shows green screen and two some of my meshes in with a scale of good - bad colour indication. I cant find documentation on that :frowning: )
regards

I’m glad to hear that you were able to fix the packaging issue.

For your first question, you can ignore the one in the binaries folder. This is part of UE4’s structure and you should run the one that is in the main folder. If you’re seeing two screens, is it possible that you packaged for a Virtual Reality setting?

For your second question, it would be best to take a look at Editor Preferences → Keyboard Shortcuts to see a lot of different keybindings. You can see visualization keyboard shortcuts at this link as well.

OK, so

1./ what is a difference between Cooking and Packaging? are this producing same .exe game file?
I want check result of changes in Game and not to spend time on rebuilding final exe.

2./ in terms of work progressing with Project - in Editor there are buttons Build, Play, Launch and in menu “File” Packing Project, Generate Visual Studio Project and Cooking, and after first Packaging button “Compile” is added.
In what order I should use them when progressing on project?
regards

3./ " If you’re seeing two screens, is it possible that you packaged for a Virtual Reality setting? " where I chang that for normal screen.

Cooking and Packaging are two separate processes, although Cooking is usually done during the Packaging process. Cooking is the process of making the content available for the platform that it is cooking for so that it is compatible. You can find more information about that process here.

Packaging is the process of having all of the code compiled, assets put into a Pak file, and building the binaries that are needed to run the game without using the editor. More about that process can be found here.

As you progress with your project, you should be able to use Play (Sometimes referenced to as PIE, or Play In Editor) regularly to check your progress but it’s a good idea to try Standalone and Packaging every now and then to make sure that everything is still working correctly. While PIE is a fairly accurate representation of the final product, it has some major differences which could show or hide problems that would or wouldn’t be in the package product.

Generate Visual Studio Project files would be something to run if you ever manually add code files, as the Visual Studio solution needs to be regenerated to include manually added files. Compile will compile any code in the project, which would be the same as going into the project’s Visual Studio solution and pressing the “Build” option.

We first need to have an idea of what is causing it to be two different screens. Can you take a screenshot of the window where you’re seeing the two screens? The look of it should give me an idea.