[1.12] [bug] visibility calculation in editor stop working after every play testing.

Using zone, portals and occluders component I noticed that on playtesting in the editor the visibility stop working and you need to reload the level to make it work again.

Another issue with them is that an entity that doesn’t get activated at the level start seems to have all its zones and portals working from the beginning.

Thanks for capturing this bug @Gamely – I’ve sent it over to our team to look into ASAP :slight_smile:

Hey @Gamely,

Could you provide some additional information?

  • For visibility, do you mean that the components in the viewport disappear from the level?
  • For the entity that isn’t activated, do you mean that the zones and portals that should not be activated at start are being set to active when you run the level?
    Thank you for any extra information you can give us so we can investigate this further.

Sorry ,I’ll try to explain better.

For visibility I mean that objects inside vis areas results always not visibile from outside even if they were visible trough a portal before the playtesting.

For the second issue Ajia got perfectly the point they should be deadtivated as the owner entity but they simply works as they were active.

@Gamely,

Thank you for the clarification. The bug has been filed and sent to the team.

Hey @Gamely,

Apologies that this took some time to hear back on.

We cannot activate/deactivate the visibility related components in run time, so it’s technically working as designed.

In the engine, these components are all created by the legacy Cry VisArea. While
the VisArea itself can only be created at editor time and saved in the level, we don’t have any way to manipulate the VisArea during runtime. It turns out, it would also be very expensive when it comes to performance as well.

As an alternative, you could destroy the VisArea component with the component’s destructor instead of trying to Deactivate it.The reason why it’s like that is all
the editor components will call Deactivate function when switching from
editor time to runtime. If the VisArea is destroyed, there won’t be any effect in runtime.

So just to recap, once a VisArea is created in the level, it can only be “deactivated” by deleting/destroying the entity, and the effects of the VisArea cannot be altered during run time.

Let us know if that helps.

Hey @Gamely,

We believe the visibility issue is fixed in 1.15 now, so when you run the game and then come back to the portals, they should still work as expected.

Let us know if that’s not the case for you though.