Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Does not work when you have a source build and a project #11

Open
ughstudios opened this issue Mar 5, 2022 · 22 comments
Open

Does not work when you have a source build and a project #11

ughstudios opened this issue Mar 5, 2022 · 22 comments

Comments

@ughstudios
Copy link

So if you are using unreal game sync, you are required to have an Engine and a path together
image
You can see in the image. If I setup vscode i get the squiggles. I tried this extension and it didn't do anything.

@ughstudios
Copy link
Author

ughstudios commented Mar 5, 2022

Searching for *.uproject file...
No *.uproject file found!

It's basically unable to find the uproject because it's in the ugh1 folder. Could you add a project selector maybe? Otherwise maybe I just add a symlink?

@ughstudios
Copy link
Author

If I create a symlink I get the following error:

Searching for *.uproject file...
Extension "UE Intellisense Fixes" is now active!

Found Unreal Engine v4.27.1

** Error **: This fixable project hasn't been initialized properly and is invalid.

@boocs
Copy link
Owner

boocs commented Mar 5, 2022

Sorry! This is the first I've heard of UGS so this could take awhile.

So UGH1 is a project inside the UE folder?

Can you show a picture of everything that's in the UGH1 folder?

@ughstudios
Copy link
Author

ughstudios commented Mar 5, 2022

image
The project is in UGH1/UGH1, I created a symlink to the file in C:\repos\Perforce\daniel_main\UGH1\UGH1\UGH1.uproject

UGH1 is the root where the engine is and the project which has the Engine source in Engine/ and then UGH1/ is the actual game project. Does that make sense?

@boocs
Copy link
Owner

boocs commented Mar 5, 2022

Yep makes sense!

What about a pic of what's in UGH1/UGH1?

@ughstudios
Copy link
Author

image
Just a normal unreal project.

@ughstudios
Copy link
Author

I should mention that the sym link does NOT fix the problem at all, so I'm deleting it.

@boocs
Copy link
Owner

boocs commented Mar 5, 2022

I think you need to create a vscode project for the UGH1/UGH1 project.

The first UGH1 folder has a vscode workspace file inside but that's a workspace project for modifying the unreal engine source code not for modifying a individual project.

In the script or scripts folder of UGH1/UGH1 is there a script for creating a vscode workspace project for UGH1/UGH1?

@boocs
Copy link
Owner

boocs commented Mar 5, 2022

If not, you might be able to right click on the UGH1/UGH1 UGH1.uproject file and select the option Generate Visual Studio project files....

Is it there? What happens if you choose it?

@ughstudios
Copy link
Author

image
There's nothing there. Also, if you try to generate project files, nothing happens.

@ughstudios
Copy link
Author

image
Also it looks like it creates the UGH1 folder here for the project in the .vscode directory

@boocs
Copy link
Owner

boocs commented Mar 5, 2022

That compile commands folder should be for the first UGH1 folder not the second UGH1 project folder.

Can you double click the UGH1.uproject file, to open the project in the Unreal Engine, and then switch the engine to use VSCode?

It's in Editor Preferences -> Source Code -> Source Code Editor : Switch it to VSCode

@ughstudios
Copy link
Author

ughstudios commented Mar 5, 2022 via email

@boocs
Copy link
Owner

boocs commented Mar 6, 2022

Now again try double clicking the UGH1/UGH1 UGH1.uproject file, to load the project into the UE, and in the File menu there should be something that says Refresh Visual Studio Code Project. I believe it's in another menu for UE5 but in UE4 it should be there.

@boocs
Copy link
Owner

boocs commented Mar 6, 2022

Another thing, are there any C++ files in the UGH1/UGH1 Source folder/subfolders? If not then UE might think it's a Blueprint project and won't setup the project with VSCode/C++ config files.

@ughstudios
Copy link
Author

ughstudios commented Mar 6, 2022 via email

@boocs
Copy link
Owner

boocs commented Mar 6, 2022

I guess it could be some weird/different UGS config thing.

If you open the UE4.code-workspace in a text editor can you post what's inside. Just to see if it even mentions the UGH1/UGH1 folder.

@ughstudios
Copy link
Author

{
	"folders": [
		{
			"name": "UE4",
			"path": "."
		}
	],
	"settings": {
		"typescript.tsc.autoDetect": "off"
	},
	"extensions": {
		"recommendations": [
			"ms-vscode.cpptools",
			"ms-dotnettools.csharp"
		]
	}
}

@ughstudios
Copy link
Author

image

@boocs
Copy link
Owner

boocs commented Mar 7, 2022

Check out this post from NicholasMont to generate project file from the command line. Maybe it'll give you some message that helps with not creating project files for UGH1/UGH1.

https://forums.unrealengine.com/t/why-cant-i-generate-visual-studio-project-files/434992/6

@ughstudios
Copy link
Author

image
Doesn't seem like it did anything

@boocs
Copy link
Owner

boocs commented Mar 7, 2022

I believe this is the same thing you're doing: https://forums.unrealengine.com/t/whats-a-native-project/264986

UE4-Main is your first UGH1 folder and VanillaProj is your UGH1/UGH1 folder. In the VanillaProj it has a .vs and a VanillaProj.sln.

So I'm guessing I'm correct in saying that they should be there. In your case a .vscode and .code-workspace file.

You'll probably have better luck asking in another forum on how to generate project files for native projects.

My last suggestion would be deleting(or moving just in case) these folders in UGH1/UGH1 and trying the same thing with creating project file on the command line. You can skip the part you already did with setting the source code setting to VSCode in UE.

https://forums.unrealengine.com/t/generate-visual-studio-project-files-not-working/417083

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants