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

Source control checkout #182

Open
eddiebeazer opened this issue Sep 11, 2023 · 6 comments
Open

Source control checkout #182

eddiebeazer opened this issue Sep 11, 2023 · 6 comments
Assignees

Comments

@eddiebeazer
Copy link

eddiebeazer commented Sep 11, 2023

I'm not sure if I missed this in the documentation or another issue but every single time I open my project, Perforce wants me to checkout all of the shaders inside of the Content/Materials folder of this plugin. Not a big issue, my problem that I'm having with them is that when I try to run the DerivedDataCache -fill commandlet I get this issue due to the those files

[09:47:54 ] Directory mappings are:
[09:47:54 ]   /Engine -> ../../../Engine/Shaders
[09:47:54 ]    /ShaderAutogen -> C:/BuildAgent/work/3fef798aa8768f91/Intermediate/ShaderAutogen
[09:47:54 ]   /Plugin/GLTFExporter -> ../../../Engine/Plugins/Enterprise/GLTFExporter/Shaders
[09:47:54 ]    /Plugin/FX/Niagara -> ../../../Engine/Plugins/FX/Niagara/Shaders
[09:47:54 ]    /Plugin/ExrReaderShaders -> ../../../Engine/Plugins/Media/ImgMedia/Shaders
[09:47:54 ]  /Plugin/Experimental/ChaosNiagara -> ../../../Engine/Plugins/Experimental/ChaosNiagara/Shaders
[09:47:54 ]  [2023.09.11-13.47.54:795][  0]LogShaders: Error: Can't map virtual shader source path "/DarkerNodes/Button.usf".

That above error pops up for every file in the Content/Materials folder,

I'm able to run that commandlet if I delete the Plugins/DarkerNodes/Content/Materials folder. I just have two questions

  • What is the purpose of those files? Seems like the editor/plugin compiles fine when they aren't even there
  • Is there a way for me to fix the above error without having to delete those folders?
@hugoattal
Copy link
Owner

Sorry for this...

Hum, so to prevent bugs, Darker Nodes recompile its shaders at the launch. That's why Perforce would want to checkout shaders (as UE probably add some kind of timestamp to the compiled shader?), but you could add it to your p4ignore without any problem.

The DarkerNodes/Button.usf and everything in DarkerNodes/Content/Material are the material shaders used for updated UI on the Darker Nodes theme. So it's pretty useful: if you delete them, you might have weird black or bliking glitches on some elements of the engine.

I admit I'm not familiar with the "DerivedDataCache" commandlet... Could you guide me through a minimal reproduction on a blank project, so that I can try to fix this?

@hugoattal hugoattal self-assigned this Sep 12, 2023
@eddiebeazer
Copy link
Author

Thanks for the response and nothing to be sorry about, the plugin works great and I feel like my use case is definitely not the majority.

DDC Documentation, scroll down to "Building Derived Data" to find the command to run it. I'm using the third person template, have the DarkerNodes plugin installed. I do have the plugin in my project folder rather than engine, not sure if that will cause an issue in terms of replicating the bug.

All that being said, I wouldn't mind this issue being closed if you don't have the time to work on an edge case like this. I mostly opened to see if it was something you were aware of and if there was a more permanent solution. So far my solution of deleting that folder during builds has worked well since I run that commandlet only on a build machine and my actual workstation has the correct files.

@hugoattal
Copy link
Owner

I do have the plugin in my project folder rather than engine, not sure if that will cause an issue in terms of replicating the bug.

Could you try using the engine folder instead? This is more the intended use (having the plugin in the Engine/Plugins/Marketplace folder).

I'll have a look anyway.

@eddiebeazer
Copy link
Author

I also missed some details. I run the command with

UnrealEditor.exe -run=DerivedDataCache  -projectonly -targetplatform=Windows -nullrhi

The command in the documentation will try to build the DDC for the entire engine with the default command. I didn't think about using the engine folder instead, I can say that if I did I would not have this issue because that command would not load the shaders since its only looking at the projects plugin and content folders

@AWildErin
Copy link

Hi, this issue is a few months old but it seems related to what I'm having.

I have the plugin in my project, but when I package the project, I always get the same error above. I've narrowed it down to it not loading the module for commandlets, which is because the plugin is specified not to.

I've fixed it in my project by replacing the module type with Editor instead of EditorNoCommandlet, but I'm not 100% sure if this is the best fix. I assume the issue is that, because the module isn't loaded, Unreal isn't being given the directory through AddShaderSourceDirectoryMapping.

@hugoattal
Copy link
Owner

Sorry for this... I'll be unavailable for the next week, I'll take a look the week after.

Maybe linked to #131

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

3 participants