Changes made in Engine C++ Config not displaying in Editor

Hello UE4 community, I’ve hit a stump in my project and need your help.

TL;DR: I can’t get the editor to display the changes I made to AISenseConfig_Sight.h in Visual studio.

Basically my game has AI that uses the AI Perception component’s “Sight radius” but the problem is I need to change the sight radius for each AI based off level so I figure I’ll do that within the construction script but the catch is the variables that I need access to (“Sight Radius” and “Lose Sight Radius”) is not exposed to blueprint so I’ve embarked on a journey to learn enough C++ to dig in and expose this variable.

I found these lines in Visual studio under Engine\Source\Runtime\AIModule\Classes\Perception\AISenseConfig_Sight.h - Which was locked to read only but I disabled that so I could save my changes.

/**Maximum sight distance to notice a target. */
UPROPERTY(EditDefaultsOnly, BlueprintReadOnly, Category = "Sense", config)
float SightRadius;

/** Maximum sight distance to see target that has been already seen. */
UPROPERTY(EditDefaultsOnly, BlueprintReadOnly, Category = "Sense", config)
float LoseSightRadius;

So I figure the solution would be to make the following changes. (EditAnywhere, BlueprintReadWrite).

alt text

The Zs in the comment were put there to let me know in the editor if my changes took effect since I should see that change in the description of “sight radius” within the editor.

/storage/temp/138257-z1z2z.png

Unfortunately I cannot get the editor to recognize any of my changes, at least the change of adding the Zs in the comment should display so my current hold up is getting the editor to react to these changes. I’ve built it with the UE4 project open and closed several times, rebuilt and cleaned, built in UE4, pressed compile in UE4, Refreshed Visual studio project, and rebooted dozens of times. I just can’t get the changes to take effect. Surely I’m doing something completely wrong but I just can’t figure it out, any help will be greatly appreciated!

Help me please, this is a big hold up for me.

Thank you very much! It works! Thank you to everyone who is the type of person who takes time and energy out of their day to help someone you don’t even know. I truly appreciate you, this wasn’t the first time you’ve saved the day and it probably won’t be the last. On behalf of my entire team THANK YOU ALL! we won’t forget it.

Are you using the binary version of the engine or did you build from source?

I think it’s built from source with source cpp files. I see now that it says they cannot be modified or rebuilt. Is there another way to do what I want with a source version and if not is there a relatively easy way to convert my project to the binary version of the engine? If so and my code adjustment works that’s a solution I’d be happy with despite losing some debugging features.

Edit: I may be confused with the binary/source build, my engine has the source cpp files but I haven’t built the engine from UE4’s full source code nor have I connected it to source code inside the editor. What exactly defines the 2 different versions of the engine? I looked online and best I could tell source would be building from the source code? Sorry for being a noob I really appreciate your help.

You need to checkout the version of the Engine you want to build with, from github.com/EpicGames/UnrealEngine
check the release tags to get the version you need.

Follow this guide to compile the engine. Then base your game on that version that you are building, and put your changes in there.