Topic: Buildings not cleaned up when map deactivated

I've got a map with these components:

Online Maps
Online Maps Tile Set Control
Online Maps Buildings

Every time I deactivate the game object that is parent to the map, and then reactivate it, the map gets an entirely new set of buildings.  The old buildings stick around, but no longer scroll with the map.

Post's attachments

Attachment icon online maps buildings.png 162.97 kb, 123 downloads since 2017-08-18 

Re: Buildings not cleaned up when map deactivated

Hello.

Thank you for bug report.
We'll check it out and release the update as quickly as possible.

Kind Regards,
Infinity Code Team.

Boost your productivity a lot and immediately using Ultimate Editor Enhancer. Trial and non-commerce versions available.

Re: Buildings not cleaned up when map deactivated

The problem is fixed.
The new version is already available through the built-in update system.
In Unity Asset Store, a new version will be available within two weeks (due to the long approval time for new versions).

Kind Regards,
Infinity Code Team.

Boost your productivity a lot and immediately using Ultimate Editor Enhancer. Trial and non-commerce versions available.

Re: Buildings not cleaned up when map deactivated

I have downloaded and applied the new version.

Now, buildings are removed when the map is deactivated, but they don't come back when I re-activate the map.

Re: Buildings not cleaned up when map deactivated

I rechecked disabling/enabling of the buildings component, and this works correctly.
Video:
https://www.dropbox.com/s/6lv03704nsoui … 1.mp4?dl=0

Perhaps some extra action is required to stop this work?

Kind Regards,
Infinity Code Team.

Boost your productivity a lot and immediately using Ultimate Editor Enhancer. Trial and non-commerce versions available.

Re: Buildings not cleaned up when map deactivated

Your video shows you disabling the component.

I am deactivating a parent GameObject.

It looks like the latest version of OnlineMapsBuildings.cs has defined an OnDisable() function (which Unity will automatically call if the GameObject becomes inactive), and that function is ultimately (on line 192) setting "enabled = false", which disables the component and prevents it from running anything when the GameObject is subsequently made active again.

Removing that line appears to fix the issue.

Re: Buildings not cleaned up when map deactivated

I see.
The problem is fixed, and now it will work correctly when disabling GameObject.
The new version will be available soon.

Kind Regards,
Infinity Code Team.

Boost your productivity a lot and immediately using Ultimate Editor Enhancer. Trial and non-commerce versions available.