Cannot set variables below default values in child actor components

Hello ,

Say I have two blueprints , first one is having a variable X with default value 20;

Now in the second blueprint , I add a child actor component of the first blueprint , try to set the variable X below 20. It doesn’t work. the blueprint is created but works as if X=20. This works perfectly if I set X to be greater that 20;

Test case: Create a blueprint , BP_A , add a static mesh component , and create a public variable length = 1000(default) , and create a function , Setlength() that changes the static mesh length based on the value of length , call Setlength() from construction script, place it in your level and test. Works fine obviously.

Create second blueprint , BP_B, create a public variable LengthB = 1000(default) , add a child actor component with BP_A , cast to BP_A and set length of BP_A with LengthB. Call function Setlength() of BP_A.

Place BP_B in level , you get the static mesh with length 1000. Now you notice that on increasing length the mesh length increases. Nothing happens if you reduce the LengthB below 1000. Change default value of length in BP_A to 0. Now it works fine.

Kindly let me know if this is a bug or if I am making some mistake.

Hello sameek4,

I was unable to reproduce this issue on our end. I have a few questions for you to help narrow down what issue it is that you are experiencing. I have provided an example of my test below.

Quick questions:

  1. Can you reproduce this issue in a clean project?
  2. Could you provide a detailed list of steps including any small steps that may have been left out of your original post?
  3. Could you provide screen shots of any blueprints that may be involved?

Example of my repro:

Hello sameek4,

We have not heard back from you in a few days, so we are marking this post as Resolved for tracking purposes. If you are still experiencing the issue you reported, please respond to this message with additional information and we will offer further assistance.

Thank you.