I have a function in a function library that is supposed to return a skeletal mesh. I set up an array as a local variable that contains all the possible return values as its default. When I run the game and debug the function, the array is just filled with None values (ie it has the correct length but each value is None instead of the meshes I set up as the default). I’ve also found that if I create non-array variables they are reset as soon as the function library is compiled.
This happened with all the variable types I tried in the “Object Reference” section of the type dropdown, but not with any of the other categories.
I was unable to reproduce this issue on our end. I tried setting up a function library and I created a local variable (float). I then tried printing this value to the screen and received the default value that I had applied. I have a few questions that will help narrow down what issue it is that you are experiencing.
Quick questions:
Can you reproduce this issue in a clean project?
If so, could you provide a detailed list of steps in order to reproduce this issue on our end?
Could you provide a screen shot of any blueprints that may be involved.
I was able to reproduce this issue on our end. I have written up a report ( UE-18404) and I have submitted it to the developers for further consideration. I will provide updates with any pertinent information as it becomes available. Thank you for your time and information.