# How to use Core Redirects with C++ variable?

**URL:** <https://forums.unrealengine.com/t/how-to-use-core-redirects-with-c-variable/2263418>\
**Category:** Programming & Scripting\
**Tags:** redirector, unreal-engine, CPP, Blueprint, question\
**Created:** [January 6, 2025, 10:35pm UTC](https://forums.unrealengine.com/t/how-to-use-core-redirects-with-c-variable/2263418 "2025-01-06T22:35:50Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![Denis.Sion](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Denis.Sion](https://forums.unrealengine.com/u/Denis.Sion)\
**Post date:** [January 6, 2025, 10:35pm UTC](https://forums.unrealengine.com/t/how-to-use-core-redirects-with-c-variable/2263418/1 "2025-01-06T22:35:50Z")

</div>

I’m having trouble replacing a blueprint variable with a C++ one from the parent class of the blueprint. I tried using redirects as:

```auto
[CoreRedirects]
+PropertyRedirects=(OldName="BP_DoorActor_C.Length",NewName="/Script/LevelModule.DoorActor.Length")

```

I tried changing the name of the blueprint variable to Length\_OLD and also in the redirect, but it doesn’t seem to work. Do you have any idea on how to make it work?

I tried using “Replace references” in the blueprint variable, but for the target it won’t show my C++ variable. The C++ variable has both BlueprintReadWrite and EditAnywhere. I don’t know if this matters, but it is also in the same category as the blueprint variable.

---

<div class="post-metadata">

**Author:** ![AlienRenders](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@AlienRenders](https://forums.unrealengine.com/u/AlienRenders)\
**Post date:** [January 6, 2025, 11:35pm UTC](https://forums.unrealengine.com/t/how-to-use-core-redirects-with-c-variable/2263418/2 "2025-01-06T23:35:19Z")

</div>

If the property is the same name, you shouldn’t have to do anything.

As for C++ class names, I’ve used the name by itself without the prefix letter. So AMyCharacter is just MyCharacter.

Also, what is CoreRedirects section? All my redirects are in the [/Script/Engine.Engine] section in DefaultEngine.ini

---

<div class="post-metadata">

**Author:** ![Denis.Sion](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Denis.Sion](https://forums.unrealengine.com/u/Denis.Sion)\
**Post date:** [January 6, 2025, 11:43pm UTC](https://forums.unrealengine.com/t/how-to-use-core-redirects-with-c-variable/2263418/3 "2025-01-06T23:43:45Z")

</div>

Everywhere I’ve looked I found that I should put my redirects in the [CoreRedirects] in the DefaultEngine.ini file. The property has the same name, but it just doesn’t work. When I build and open Unreal I get an error about the variables having the same name and it renames the blueprint variable to “Length\_0”.

Edit: [Core Redirects in Unreal Engine | Unreal Engine 5.3 Documentation | Epic Developer Community](https://dev.epicgames.com/documentation/en-us/unreal-engine/core-redirects-in-unreal-engine?application_version=5.3) This is what I mean

---

<div class="post-metadata">

**Author:** ![AlienRenders](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@AlienRenders](https://forums.unrealengine.com/u/AlienRenders)\
**Post date:** [January 6, 2025, 11:49pm UTC](https://forums.unrealengine.com/t/how-to-use-core-redirects-with-c-variable/2263418/4 "2025-01-06T23:49:05Z")

</div>

You completely rejected everything I’ve indicated. Not much anyone can do for you I’m afraid.

---

<div class="post-metadata">

**Author:** ![Denis.Sion](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Denis.Sion](https://forums.unrealengine.com/u/Denis.Sion)\
**Post date:** [January 6, 2025, 11:51pm UTC](https://forums.unrealengine.com/t/how-to-use-core-redirects-with-c-variable/2263418/5 "2025-01-06T23:51:41Z")

</div>

What do you mean? I tried just having the same name for the variable in both the blueprint and the c++ class, but it doesn’t work. It just renames the blueprint variable to Length\_0.

I’m not using the prefix letter for the C++ class name as you said, it’s not ADoorActor, it’s just DoorActor.Length.

The CoreRedirects section is what Unreal indicated using for the redirects in the BaseEngine.ini file. I tried putting it in [/Script/Engine.Engine] and it still doesn’t work.

I’m just not sure what I’m doing wrong.

---

<div class="post-metadata">

**Author:** ![AlienRenders](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@AlienRenders](https://forums.unrealengine.com/u/AlienRenders)\
**Post date:** [January 7, 2025, 12:02am UTC](https://forums.unrealengine.com/t/how-to-use-core-redirects-with-c-variable/2263418/6 "2025-01-07T00:02:36Z")

</div>

Try these. Only use one at a time.

```auto
+PropertyRedirects=(OldName="/Script/MyGameName/BP_DoorActor_C.Length",NewName="DoorActor.Length")

```

If that doesn’t work, you can be more forceful.

For this, you need the exact FULL path of your BP.

```auto
+ActiveGameNameRedirects=(OldGameName="/Script/MyGameContent/Blueprints/Doors/BP_DoorActor_C.Length",NewGameName="DoorActor.Length")

```

Another thing you could try is reparent to the base class of the C++ class and then reparent back. You’ll lose all the defaults values of anything in the C++ class though (edit: … in any instances).

I have all my redirects in the [/Script/Engine.Engine] section and they all work fine.

edit: Actually, you don’t need the full path in ActiveGameNameRedirects. If you have nothing else called DoorActor, you can actually just use “BP\_DoorActor\_C.Length”. Try that. You could also try “BP\_DoorActor.Length”. The \_C is usually for generated classes. So you may not need it.

```auto
+PropertyRedirects=(OldName="BP_DoorActor.Length",NewName="DoorActor.Length")

```

or

```auto
+ActiveGameNameRedirects=(OldGameName="BP_DoorActor.Length",NewGameName="DoorActor.Length")

```

---

<div class="post-metadata">

**Author:** ![AlienRenders](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@AlienRenders](https://forums.unrealengine.com/u/AlienRenders)\
**Post date:** [January 7, 2025, 12:16am UTC](https://forums.unrealengine.com/t/how-to-use-core-redirects-with-c-variable/2263418/7 "2025-01-07T00:16:05Z")

</div>

Been reading up on this a bit. It seems that automatic redirect to a base class property is only done when reparenting. So if you just add the same name to the base class, you’ll get a conflict. So you could reparent to the base class of the C++ class and then back and perhaps that would work. Again, you’ll lose any defaults you set in any instances.

---

<div class="post-metadata">

**Author:** ![Denis.Sion](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Denis.Sion](https://forums.unrealengine.com/u/Denis.Sion)\
**Post date:** [January 7, 2025, 12:20am UTC](https://forums.unrealengine.com/t/how-to-use-core-redirects-with-c-variable/2263418/8 "2025-01-07T00:20:38Z")

</div>

I’ve tried both methods (ActiveGameNameRedirects and PropertyRedirects) with and without the \_C but I keep geting the same errors no matter what and the renaming to Length\_O. The errors are

```auto
Internal Compiler Error: Tried to create a property Length in scope SKEL_BP_DoorActor_C, but another object (FloatProperty /Script/LevelModule.DoorActor:Length) already exists there.
Found a member variable with a conflicting name (Length) - changed to Length_0.
Could not find a variable named "Length_0" in '/Game/Level/BP_DoorActor.BP_DoorActor_C'.
Make sure '/Game/Level/BP_DoorActor.BP_DoorActor_C' has been compiled for Get Length_0
The property associated with Length could not be found in '/Script/LevelModule.DoorActor'

```

I also tried just reparenting to the base class (Actor) and then back to DoorActor, but same thing happens.

Edit: One more thing. Before compiling the blueprint, the name of the blueprint variable is Length\_ERROR\_DUPLICATE\_0. After compiling it changes it’s name to Length\_0.

---

<div class="post-metadata">

**Author:** ![AlienRenders](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@AlienRenders](https://forums.unrealengine.com/u/AlienRenders)\
**Post date:** [January 7, 2025, 12:29am UTC](https://forums.unrealengine.com/t/how-to-use-core-redirects-with-c-variable/2263418/9 "2025-01-07T00:29:06Z")

</div>

Yeah, duplicates are a pain. I actually have a duplicated class name with something in the codebase and I’ve never been able to use redirects to rename it. It just gives me a warning so I just leave it… but this may be what you’re experiencing. Redirects aren’t for duplicates.

Have you tried renaming your blueprint variable and then using a redirect?

edit: If you can’t get into your project, you may have to comment out the C++ property first. Then bring it back afterwards.

---

<div class="post-metadata">

**Author:** ![Denis.Sion](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Denis.Sion](https://forums.unrealengine.com/u/Denis.Sion)\
**Post date:** [January 7, 2025, 12:31am UTC](https://forums.unrealengine.com/t/how-to-use-core-redirects-with-c-variable/2263418/10 "2025-01-07T00:31:45Z")

</div>

I have tried that earlier. I renamed the blueprint variable to Length\_OLD and then set a redirect for it, but it still didn’t work. Didn’t throw any errors, but it did nothing.

One way I kinda forced it to work was by making a struct in blueprints, setting the type of the variable to that struct, deleting the struct type and then setting the redirector. It worked, but I lost all the values in the Set nodes, and I have a lot of those so I don’t think that’s a good idea.

And yeah, already figured out that out. It would not open the project before if I didn’t comment the C++ variable first sometimes. Thanks!

---

<div class="post-metadata">

**Author:** ![AlienRenders](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@AlienRenders](https://forums.unrealengine.com/u/AlienRenders)\
**Post date:** [January 7, 2025, 12:36am UTC](https://forums.unrealengine.com/t/how-to-use-core-redirects-with-c-variable/2263418/11 "2025-01-07T00:36:56Z")

</div>

So class or struct redirect worked, but not property redirect? Very strange. The docs say property redirects are for deleted properties. But if you delete a property in BP, it removes all uses of it. I’m guessing it’s actually for when you remove a C++ property.

So if you tried to move a property from C++ to BP, redirect would work. And the other way around is supposed to be fixed by reparenting, but it doesn’t work for you. That’s brutal.

In the past, I’ve renamed the BP variable. Added the C++ property. Then I went to delete the BP variable, it’ll give you a list of nodes still in use. I manually go change all those. And then delete the BP variable. Tedious, but you don’t lose anything. (… unless you have instances of the class with different defaults).

Sorry I don’t have any better alternatives.

edit: I’ll try something later. Busy rn. I’ll post back what I find.

---

<div class="post-metadata">

**Author:** ![Denis.Sion](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Denis.Sion](https://forums.unrealengine.com/u/Denis.Sion)\
**Post date:** [January 7, 2025, 12:39am UTC](https://forums.unrealengine.com/t/how-to-use-core-redirects-with-c-variable/2263418/12 "2025-01-07T00:39:29Z")

</div>

Well, I think the struct redirect worked because the variable became invalid. But when the variable is not invalid and is still there (it’s a float, so I have no way to make it invalid afaik), it won’t replace it.

Thank you for taking the time to try to help me though!

If you find anything else let me know!

---

<div class="post-metadata">

**Author:** ![AlienRenders](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@AlienRenders](https://forums.unrealengine.com/u/AlienRenders)\
**Post date:** [January 7, 2025, 12:45am UTC](https://forums.unrealengine.com/t/how-to-use-core-redirects-with-c-variable/2263418/13 "2025-01-07T00:45:02Z")

</div>

Dunno if it’ll work, but I read a post that someone claims this works. They comment out the C++ property. Load up the project. Uncomment the C++ property and while still in the editor, do a live compile and the variable automatically updated to use the C++ property.

That sounds like voodoo to me if this works, but might be worth a shot.

If it does work, I’d recommend saving, exiting and rebuilding to be safe.

---

<div class="post-metadata">

**Author:** ![Denis.Sion](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Denis.Sion](https://forums.unrealengine.com/u/Denis.Sion)\
**Post date:** [January 7, 2025, 12:57am UTC](https://forums.unrealengine.com/t/how-to-use-core-redirects-with-c-variable/2263418/14 "2025-01-07T00:57:17Z")

</div>

I think I saw the same thread as you did. I tried that before, but I get the same behavior of renaming the blueprint variable to Length\_0.

---

<div class="post-metadata">

**Author:** ![AlienRenders](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@AlienRenders](https://forums.unrealengine.com/u/AlienRenders)\
**Post date:** [January 7, 2025, 12:57am UTC](https://forums.unrealengine.com/t/how-to-use-core-redirects-with-c-variable/2263418/15 "2025-01-07T00:57:32Z")

</div>

Ok, trying some stuff now…

---

<div class="post-metadata">

**Author:** ![AlienRenders](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@AlienRenders](https://forums.unrealengine.com/u/AlienRenders)\
**Post date:** [January 7, 2025, 1:21am UTC](https://forums.unrealengine.com/t/how-to-use-core-redirects-with-c-variable/2263418/16 "2025-01-07T01:21:00Z")

</div>

Here’s one thing that works, but is kind of messy. Give the C++ variable a different name. Then right click on the BP variable and select “Replace References”. Select the C++ variable and it’ll update all the nodes. Unfortunately, it won’t connect them. So you have to manually reconnect all the nodes. Then you delete the BP variable as it’s no longer used. You could theoretically rename it back after saving and using a redirect. Then you need to save once again.

---

<div class="post-metadata">

**Author:** ![Denis.Sion](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Denis.Sion](https://forums.unrealengine.com/u/Denis.Sion)\
**Post date:** [January 7, 2025, 1:32am UTC](https://forums.unrealengine.com/t/how-to-use-core-redirects-with-c-variable/2263418/17 "2025-01-07T01:32:31Z")

</div>

Is the C++ variable showing up for you in the Replace References? I already tried that, but for blueprint variables is only showing other blueprint variables to replace it with and for C++ variables only other C++ variables.

---

<div class="post-metadata">

**Author:** ![AlienRenders](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@AlienRenders](https://forums.unrealengine.com/u/AlienRenders)\
**Post date:** [January 7, 2025, 1:37am UTC](https://forums.unrealengine.com/t/how-to-use-core-redirects-with-c-variable/2263418/18 "2025-01-07T01:37:08Z")

</div>

Worked fine for me. You have to expand the little arrow thing as the list is collapsed, but it’s there.

---

<div class="post-metadata">

**Author:** ![Denis.Sion](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Denis.Sion](https://forums.unrealengine.com/u/Denis.Sion)\
**Post date:** [January 7, 2025, 1:40am UTC](https://forums.unrealengine.com/t/how-to-use-core-redirects-with-c-variable/2263418/19 "2025-01-07T01:40:04Z")

</div>

Hmmm, weird. For me it doesn’t show any C++ variables. I’ll try more things tomorrow since it’s 4AM for me.

Thank you!

Edit: I also remember reading multiple threads that when replacing BP variables it doesn’t show C++ variables for some reason.

---

<div class="post-metadata">

**Author:** ![flashyiyi](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@flashyiyi](https://forums.unrealengine.com/u/flashyiyi)\
**Post date:** [March 6, 2026, 10:29am UTC](https://forums.unrealengine.com/t/how-to-use-core-redirects-with-c-variable/2263418/20 "2026-03-06T10:29:57Z")

</div>

If a Blueprint property has the **same name and same type** as a C++ property, Unreal will now **automatically remove the Blueprint property** and replace all references with the C++ one, only logging a message.

When the names differ, you can still use the **Replace References** feature to do bulk replacements.

**BUT!**

They **must be the same type**. If the types differ, Unreal will force a rename, and you **cannot** use Replace References to fix it.

And here’s the key point:

Blueprint’s **Float** type corresponds to C++’s **double**.
