Accessed None trying to read property SkeletalMesh.

I know this warning is due to the property not existing, but I’m not sure why it’s happening in my case.

I am using an editor utility widget’s event graph to modify the “Skeletal Mesh Component” of an existing blueprint asset. After getting its CDO the cast is successful, but when trying to “Set Skeletal Mesh Asset”, it warns the “Skeletal Mesh” property is none, despite us casting to “The”, which we know has a “Skeletal Mesh Component” as seen in the image of its blueprint.

My assumption was that we wouldn’t ever get none because the blueprint already has the property as a component, but it appears I am wrong, or have a misunderstanding of CDO. Can anyone help me be able to modify the asset correctly?

Edit: Another thing to note. The base C++ class that this blueprint is derived from has a static mesh and a few other properties, all of which I am successfully able to set from the method I am using in the blueprint. The issue occurs when I add a skeletal mesh component on the “The” blueprint which derives from the C++ class, and then derive from “The” to create “The_Child”, where I can’t modify the skeletal mesh component that was added in the “The” blueprint. It seems the issue is that I can’t modify the CDO of components that were exclusively added from blueprint?

I would test that the script works properly. I think that the error means that you are trying to access the skeletal mesh on a “none” which means that the “The” is not valid but I could be wrong

When I run it the print statement gets called, which I assume means that “The” must be valid. I’m also able to set variables that were on the base C++ class, but just not the “Skeletal Mesh Component” that I’ve added in the blueprint shown in the second image.

The edit includes what I believe is the main issue I am encountering.

This is interesting.
I would guess that your pythin script is returning a “Testing…” something object and not a “The” Object. So the polymorphism (casting) is trying to force a parent object to a child object.