Page 1 of 1

Decals code troubleshooting

Posted: 24 Jul 2021, 16:02
by jammer64
Hi!

What's the general consensus as to when decals can crash the engine? And when decals are saved with game state and when not? Honestly, I cannot figure out entirely when decal should exactly be attached, detached, when can it be destroyed etc. My decal handler used to work well but after recent changes I got back to constant crashes :/ Wiki is not very robust on this, sadly.

Re: Decals code troubleshooting

Posted: 24 Jul 2021, 16:05
by AlCapowned
What patch are you using? My 227i is very crash happy when it comes to decals (though this has been completely fixed in 227j from what I've seen).

Re: Decals code troubleshooting

Posted: 24 Jul 2021, 16:06
by jammer64
Regular UT build 4.36 as my mod is written for it :)

Re: Decals code troubleshooting

Posted: 24 Jul 2021, 16:16
by UB_
It's probably the same number that triggers crashes when it comes to certain other actor types - 1116. But could be lower.
Decals in EXU2 are set to disappear due to this reason.

Re: Decals code troubleshooting

Posted: 24 Jul 2021, 16:27
by jammer64
Nono, I totally don't mean number of instances. When I handle attach/detach/destroy cycle improperly, engine crashes right away after a few decals placed and that's where I need to know how decals work EXACTLY against actor cycle, tick, engine timing and order of things in render pipeline etc., and at what exact circumstances they are prone to crash. Large number of decals rarely was problem when my decal handler was working properly, actually. I should mention that I don't base my decal actors on oldskool subclasses etc. - I root straight from engine's decal and it's handled from scratch.

Re: Decals code troubleshooting

Posted: 24 Jul 2021, 16:47
by AlCapowned
I haven't used custom decals enough to know what's going wrong. What are you doing differently with them compared to regular decals? Could you post your code?

Re: Decals code troubleshooting

Posted: 24 Jul 2021, 17:01
by jammer64
Phew, I got them working again! :O Apparently I have to watch when I detach decals (I assume precisely before I intend to attach them again and under no other occasion) and, apparently, final DetachDecal() has to stay in Destroyed() so I shouldn't dare to detach them earlier and leave like that.

Re: Decals code troubleshooting

Posted: 28 Jul 2021, 11:56
by jammer64
Still, has anyone here really indepth knowledge of decals' implementation in engine?