I have a custom blueprint component that encapsulates all the data that I need for my VR character.
From my Character, Where the component is attached, I can read data from my component as expected.
But if I try to store a reference to that component or read values from my animation blueprint, I get an error:
PIE:Error: Error Blueprint Runtime Error: Accessed None trying to read property AvatarComponent from function: 'ExecuteUbergraph_AnimBP' from node: Set Right_Arm_Transform in graph: EventGraph in object: AnimBP with description: Accessed None trying to read property AvatarComponent
The issue happens when I use Dedicated Server (Which is a requirement for this project).
I’ve got my reference to my character, I’m able to cast to the right class. But from there I can’t store the reference to the component NOR can I ‘get by component class’ to populate this variable.
I’ve tried changing the component to a SceneComponent, which didn’t help.
I’ve tried turning on Auto-Activate.
I’ve tried turning on replicates.
It’s like the Animation Blueprint fundamentally can’t access that component.
Hey,
I think Dedicated Server has no animation layer/blueprint data.
Animation play are always simulated things in most games, that means animation playback happens only on clients for active players and other players on map too.
In the most case …
I think you forgot to mark your component for replication and component are invalid on clients
Try to select Compononent in bp editor and set ReplicateComponent true
Hi, I did find a pretty dumb work around to this in 4.16.
My Character would call the function in the custom component, The custom component would do all the calculations, and then the character would copy all of the variables that mattered onto itself.
Then I simply pointed the animation blueprint at the character, instead of at the custom component that was on the character.
I don’t know if this issue still occurs in later versions after 4.16.
I see. It does still happen, unfortunately, though only with Blueprint Components, not with native code components. It makes sense that copying the values to the owner actor and querying those would work but that’s definitely not desired.
My solution is to just convert the component to code and use that. It will probably be more performant anyways.
Ya it’s not ideal. Perhaps you could make a C++ class for your blueprint component to use as a parent class?
Declare all your variables in C++, but do your logic in blueprints.
You could also try making a C++ class for the AnimInstance, and do your logic there.
I found that debugging the pose of a skeletal mesh on the server to be a real pain to work with.
We had lots of issues where certain third party IK packages would silently break on the server, which would cause a variety of very silly problems.