Hello there, I’m developing a collectible interaction system for my game and when hovering over a collectible it should glow, it was glowing and working fine before I rebuilt the lighting and now it’s throwing Branch errors at me, and I’ve tried to fix it but at this point I’m out of solutions.
I keep receiving the error “Blueprint Runtime Error: “Accessed None trying to read property CallFunc_BreakHitResult_HitActor” . Node Branch Graph EventGraph: EventGraph Function: Execute Ubergraph BP First Person Character Blueprint: BP_FirstPersonCharacter” on runtime and it’s not glowing how it should instead it displays the default material texture instead.
If you have any solutions please hit me up! I’m getting desperate..
Access None means you’re trying to read from a reference that is NULL (not valid/not set).
I followed the logic here for a bit. The first thing would be after your hit result is false, you should exit, there isn’t anything else to do, since you will only exit on validated get, because it’s not set in this chain of execution anyway.
Then I noticed that you have Multiplayer logic in there, so the error might be coming from it being run on the wrong “side” (server/client) where Target reference has not been set yet.
In fact it probably runs on both, hence the error.
I would recommend you try running this logic on server side, if this indeed is a multiplayer project. Material change should happen on server side and be replicated to clients.
Apart from that, nothing else immediately stands out to me.
Oh, this is a single player project, and I’ve noticed it spits out these errors exclusively on sphere objects while with cube objects there is no errors displayed and it glows like it should. which is odd
Try disconnecting all the logic on squence node (0) pin. This is the part that removes the material since nothing is set there.
You can probably loose the != check too. Less logic there is, easier it will be to debug, you can always reconnect it later, for now I would disconnect everything and only do the most basic stuff.
If something is hit, has the right tag, change material.
Strange, it should work on sphere too. Have you tried deleting the sphere and placing a new one in? What about other shapes? Have you tried changing the material on mesh instead of overlay material?
I’ll try mesh, I deleted the objects and replaced them and gave them the tag “Collectible” and suddenly the system is working, but when I rebuilt the lighting the system breaks and shows them having the default texture instead of my glowing material.