Topic: How to Set the Rendering Order of Multiple Poly

I have multiple poly and markers. How can I customize their rendering order? For example, I want a poly to be displayed on the third floor. I saw the official case "Tileset Marker DepthExample", but it seems that only the order of multiple markers can be set?

Post's attachments

Attachment icon picture.PNG 23.66 kb, 64 downloads since 2018-12-13 

Re: How to Set the Rendering Order of Multiple Poly

Hello.

To change the order of drawing elements you can use OnlineMapsDrawingElement.renderQueueOffset.
If this is not suitable for you, we can discuss the implementation of some other way.

Kind Regards,
Infinity Code Team.

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

Re: How to Set the Rendering Order of Multiple Poly

Hello, I'm sorry I don't understand what you mean. How to use OnlineMaps Drawing Element is one of the ways? Can you give me an example? Thank you. I have multiple Markers, lines, poly. I want to customize their display order.

Re: How to Set the Rendering Order of Multiple Poly

thank you

Re: How to Set the Rendering Order of Multiple Poly

Example:

using UnityEngine;

public class DrawingElementOrderExample : MonoBehaviour
{
    private void Start()
    {
        OnlineMapsDrawingLine frontLine = new OnlineMapsDrawingLine(new double[]
        {
            -5, -5, 5, 5
        }, Color.blue, 3);
        frontLine.renderQueueOffset = 1;

        OnlineMapsDrawingLine normalLine = new OnlineMapsDrawingLine(new double[]
        {
            -5, 5, 5, -5
        }, Color.green, 3);

        OnlineMapsDrawingRect backRect = new OnlineMapsDrawingRect(-3, -3, 6, 6);
        backRect.borderColor = Color.yellow;
        backRect.borderWidth = 3;
        backRect.backgroundColor = Color.red;
        backRect.renderQueueOffset = -1;

        OnlineMaps.instance.AddDrawingElement(frontLine);
        OnlineMaps.instance.AddDrawingElement(normalLine);
        OnlineMaps.instance.AddDrawingElement(backRect);

    }
}
Kind Regards,
Infinity Code Team.

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

Re: How to Set the Rendering Order of Multiple Poly

Hello, I have completed part of the effect according to your case. But when I dynamically generate multiple polys, they will override markers. How to keep marker at the top? Thank you

Re: How to Set the Rendering Order of Multiple Poly

By default, drawing elements uses Tileset DrawingElement shader.
It has Queue = "Transparent-50" (2950).
This means they will conflict with the markers after renderQueueOffset = 49.
Are you sure you need so many sorted drawing elements?
If you are sure that you need it:
You can create a new material with a shader that has a Render Queue visible (for example, Unlit / Transparent or Legacy / Transparent / Diffuse), increase Render Queue and use it in Online Maps Tileset Control / Materials & Shaders / Marker Material.

Kind Regards,
Infinity Code Team.

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