Topic: Markers hidden by overlay

Hi Alex,

We are having some issues with our 2D markers (created at runtime) being hidden behind our custom overlay.
I have looked through the api but am unable to find anything that might help - am I missing something obvious here (again wink ) -
Is there a way to ensure that the markers are drawn last / always show on top of the overlay tiles?

Thanks

Re: Markers hidden by overlay

Hello.

You need to increase markersContainer.transform.localPosition.y.
Example:

using UnityEngine;

public class SetMarkersYExample:MonoBehaviour
{
    public float y = 1;

    private Transform markersTransform;
    private float _y;

    private void Update()
    {
        if (markersTransform == null)
        {
            markersTransform = OnlineMaps.instance.transform.FindChild("Markers");
            if (markersTransform != null) UpdatePosition();
        }
        else if (_y != y) UpdatePosition();
    }

    private void UpdatePosition()
    {
        _y = y;
        Vector3 position = markersTransform.localPosition;
        position.y = y;
        markersTransform.localPosition = position;
    }
}
Kind Regards,
Infinity Code Team.

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

Re: Markers hidden by overlay

Thanks for the reply Alex.

Unfortunately this approach doesn't provide us with the effect we are after - I have applied an offset of +10 (anything less and they don't show at all on the bigger zoom values and any bigger applies a perspective skew on the position of the icons that are not directly in the centre of the map) but when moving the map around they flick in and out of view around the edges of the map view.

I've attached a small gif showing what is happening

Any ideas?


Thanks

Post's attachments

Attachment icon ScreenGrab_02.gif 533.88 kb, 131 downloads since 2015-10-30 

Re: Markers hidden by overlay

Please attach (or send to support) your overlay script.
Most likely, the problem is somewhere in this script.

Kind Regards,
Infinity Code Team.

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

Re: Markers hidden by overlay

Hi Alex,

I'm actually using the MaptilerOverlayExample script from the API examples - I wonder if it's the way I'm creating the markers?

I'll attached that script here - if all else fails I'll try and create a stripped-down project and send it to support.

Thanks.

Post's attachments

Attachment icon LoadPanoPositions2D.cs 1.98 kb, 162 downloads since 2015-10-31 

Re: Markers hidden by overlay

This script looks fine.

It is very interesting.
Unfortunately, I have no idea why this is happening.
Please send your project. We'll find and fix the problem.

Kind Regards,
Infinity Code Team.

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

Re: Markers hidden by overlay

Ok thanks Alex - I'll get it to you as soon as I can.

Re: Markers hidden by overlay

Alex,

I have sent you a unity package containing a simple scene showing the issue - interestingly in unity's Scene View the markers are indeed always visible on top of the overlay - just not in the game view through the camera ...

Thanks

Re: Markers hidden by overlay

Hello.

I sent you a solution for this problem.

That was the problem with the ovelap of transparent objects.
To solve this problem need to create of a new shader with the changed order of drawing.

Kind Regards,
Infinity Code Team.

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

Re: Markers hidden by overlay

Excellent - Thanks Alex