Removing the current rscTitles resource should call onUnload of that resource. Please read steps to reproduce.
Description
Description
Details
Details
- Legacy ID
- 3323827118
- Severity
- None
- Resolution
- Open
- Reproducibility
- Have Not Tried
- Operating System
- Windows 7
- Category
- Scripting
Steps To Reproduce
0. Create myClass in rscTitles, add onUnload to myClass
- ("myClass" call BIS_fnc_rscLayer) cutRsc ["myClass","PLAIN"];
- Execute the code from step 1 again, onUnload is not called (onLoad called twice at this point) <<<--- BUG HERE
- ("myClass" call BIS_fnc_rscLayer) cutRsc ["myClass","PLAIN"];
- ("myClass" call BIS_fnc_rscLayer) cutText ["","PLAIN"]; - layer removed (please read Killzone_Kid's comment about cutText here - https://community.bistudio.com/wiki/cutRsc ), but onUnload is not called <<<--- BUG HERE
- ("myClass" call BIS_fnc_rscLayer) cutRsc ["myClass","PLAIN"];
- ("myClass" call BIS_fnc_rscLayer) cutRsc ["Default","PLAIN"]; - layer removed, but onUnload is not called <<<--- BUG HERE
Event Timeline
Comment Actions
Confirmed. It looks like both unloads (config and scripted) are broken:
class rsctitles
{
class rsc
{
idd = 12345; onload = "_d = _this select 0; _d displayAddEventHandler ['unload', {player sidechat 'unload scripted'}]; player sidechat str ['load', _d, finddisplay 12345];"; onunload = "player sidechat 'unload config'"; fadein = 0; fadeout = 0; duration = 5; class controls { class text: rscText { idc = 12345; text = "okwerewrewrewr"; x = 0; y = 0; w = 1; h = 1; }; };
};
};
Comment Actions
Killzone_Kid: Thanks for you comment. Btw, I think onUnload should be also called after 'duration' seconds.
Comment Actions
It should as if you run test on created display it ceases to exist after indicated duration. The interesting thing is, although display is created, it cannot be found with finddisplay, I think this is the reason "unload" is not fired.
This comment was removed by Dwarden.