Trying to generate project files against 4.19 I get:
error CS0122: 'UnrealBuildTool.BuildConfiguration' is inaccessible due to its protection level
This is from a plugin bulid.cs with the following code:
Path.GetFullPath(BuildConfiguration.RelativeEnginePath)
It seems UnrealBuildTool.BuildConfigiration is no longer accessible from build.cs files? What is the correct way to get things like RelativeEnginePath in 4.19?
1 Like
Figured it out:
These are now exposed through properties of the ReadOnlyTargetRules Target argument
1 Like
So what exactly was the problem can you give the example.(Where you want to add the code )
yxiaojiang
(yxiaojiang)
September 20, 2018, 5:58am
5
Please tell me how to do it in detail,i don’t kown how to exposed through properties,thank you!
Change this:
Path.GetFullPath(BuildConfiguration.RelativeEnginePath)
To this;
Path.GetFullPath(Target.RelativeEnginePath)
Where Target is the ReadOnlyTargetRules argument passed into the constructor.
2 Likes
slabs37
(slabs37)
September 21, 2018, 11:25am
7
thanks alot! i’ve been trying to get it working for 2 weeks.
and also for
string PluginPath = Utils.MakePathRelativeTo(ModuleDirectory, BuildConfiguration.RelativeEnginePath);
you can change it into
string PluginPath = Utils.MakePathRelativeTo(ModuleDirectory, Target.RelativeEnginePath);
to fix that issue
1 Like