Topic: Initially clustered markers don't have custom image?

Hello Alex,

We're running into an issue with our code which we cannot figure out. We create markers which have a script attached, which on start, sets the marker's image using

GetComponent<SpriteRenderer>().sprite = Sprite.Create(texture, rect, vector2);

This normally works fine and all markers have a correct image.

When markers start out clustered, they do not have the correct image when declustering/zooming in.
For markers that do not start out clustered, clustering and declustering them works correctly and they still have their image afterwards.

So:
Case 1 Startup: Clustermarker(2) -> zooming in -> two individual markers without image
Case 2 Startup: two individual markers (with image) -> zooming out -> Clustermarker(2) -> zooming in -> two individual markers (with image)

This is the process of application start:
1. Get data
2. Create markers with data
3. Marker script's on Start is called and sets image
4. Group3DMarkers is called

Re: Initially clustered markers don't have custom image?

Hello.

Which clustering script are you using?
At various times I published at least four such scripts.
Or you use your own script? If so please send it.

Kind Regards,
Infinity Code Team.

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

Re: Initially clustered markers don't have custom image?

Hey Alex, I've send you the script that we use!

Re: Initially clustered markers don't have custom image?

I checked your code and it looks well.
It is very difficult to say why this works wrong in the first case, and it works well in the second case.

If you make a some scene that demonstrates this behavior and sends it to us by email (support@infinity-code.com), I'll check it and tell you exactly what's wrong.

P.S. Please do not use private messages on the forum. I do not get notifications about new private messages, and the answer can be quite late. If you need private support, please use email.

Kind Regards,
Infinity Code Team.

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

Re: Initially clustered markers don't have custom image?

Hey Alex,

I've just sent you a .unitypackage containing a slimmed down version of our scene and scripts.
I've sent it to support@infinity-code.com through wetransfer so I hope it arrives well!

Re: Initially clustered markers don't have custom image?

The problem is that coroutines (Properties: 26) stop when GameObject is disabled.
http://answers.unity3d.com/questions/34 … -stop.html

What's happening:
1. You create a markers.
2. In the start invoked coroutine, which is waiting for one frame.
3. You group markers, and this disables markers GameObjects, and coroutines do not continue.

The solution is quite simple: you need to change the logic of Properties script.

Kind Regards,
Infinity Code Team.

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