Topic: quickly disable/enable large sets of markers, Drawing Elements, and..

Hi - I have large sets of OnlineMapsMarker, OnlineMapsMarker3D, and OnlineMapsDrawingElement, and am looking for a way to quickly enable and disable them.

I see that all the Markers under a single Markers parent, all drawing elements other under a single Drawings parent, and then all the makers3d objects are childed directly under the map objects itself.

It seems that iterating through all the objects to enable/disable 
- Markers and enabling/disabling
- Drawing Elements and 3dMarkers, setting instance.SetActive(false)
takes quite some time visually for the map to update. Not sure why, as it seems the object states change quickly, but the update on the map takes much longer 

Is there a way to group makers/elements under different parent objects to quickly enable/disable or ?

Thanks

Re: quickly disable/enable large sets of markers, Drawing Elements, and..

Hello.

2D markers do not have a single parent.
2D markers are drawn in one mesh.

To be honest, I never thought that 3D markers needed a single parent.
But, you are right, and in the next version 3D markers will have a single parent.

Unfortunately, the current version of Online Maps has no way to enable / disable all 3D markers.
And instance.SetActive (false) won't work.
Sooner or later, the map (depending on your interaction with the map) will enable them.

What you can do right now:
// Create a new container for 3D markers.
GameObject container = new GameObject ("Container");
container.transform.SetParent (map.transform, false);
// When creating 3D markers, change the parent.
marker3d.instance.transform.SetParent (container.transform);
// All your 3d markers will be grouped in one parent, which you can disable / enable when you need it.

Kind Regards,
Infinity Code Team.

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