CircleXZ not rendering in WebGL Build

Hi, I recently created a visual countdown circle using both the CircleXZ and the solid circleXZ, and they both render as expected in the Unity Editor play mode, however when running the WebGL build, only the solid circleXZ renders. Why might this be?

How it looks in the editor: Screen-Shot-2022-08-25-at-4-34-59-PM — ImgBB

Hi

Do other line renderings render in the standalone player? Or is it specifically circles that do not work.

Also, do you use a builder for this that has in-game rendering enabled? See Drawing in a game - ALINE

Hey Aron, just replaced the circleXZ with a line and while it did display in the editor play-mode, it also isn’t rendering in the standalone build (webgl). Seems an issue with lines specifically.

Isn’t it safe to assume that if I can see it while in play-mode in the editor, that it should also render in the standalone? I am using the in-game renderer. These are the methods I’m using. I call the “DrawCircle” method when the territory is not being interacted with, and the “DrawFilledCircle” when it is (when the capturing begins). In this method, both Draw commands have the “ingame” modifier, but only the SolidCircleXZ is rendering.

    private void DrawFilledCircle(Vector3 position, float radius, Color color)
    {
        Draw.ingame.CircleXZ(position, radius , color);
        Draw.ingame.SolidCircleXZ(position, radius, _startAngle, _endAngle * _percentageCaptured, color);
    }
    
    private void DrawCircle(Vector3 position, float radius)
    {
        Draw.ingame.CircleXZ(position, radius , _gradient.Evaluate(_percentageCaptured)); 
    }

EDIT: I also just tried again, this time using a custom builder instantiated in awake:

    protected override void Awake()
    {
        _draw = DrawingManager.GetBuilder(true);
    }

And have adapted the functions as such:

    private void DrawFilledCircle(Vector3 position, float radius)
    {
        // Create a new CommandBuilder configured to draw in the game
        using (_draw) {
            Draw.ingame.CircleXZ(position, radius , _gradient.Evaluate(_percentageCaptured));
            Draw.ingame.SolidCircleXZ(position, radius, _startAngle, _endAngle * _percentageCaptured, _gradient.Evaluate(_percentageCaptured));
        }

    }
    
    private void DrawFilledCircle(Vector3 position, float radius, Color color)
    {
        using (_draw)
        {
            Draw.ingame.CircleXZ(position, radius, color);
            Draw.ingame.SolidCircleXZ(position, radius, _startAngle, _endAngle * _percentageCaptured, color);
        }
    }

And the CircleXZ still doesn’t render in the WebGL standalone player.

Hi

Thanks! Indeed, lines in WebGL did not work as expected. I have uploaded a new version of ALINE now which fixes this. Thank you for reporting the bug.

Hey Aron! I removed the previous update and downloaded the new version. But when trying to build, I’m getting these compiler error:

Shader error in ‘Hidden/ALINE/Outline’: Couldn’t open include file ‘aline_common_line.cginc’. at line 23
Shader error in ‘Hidden/ALINE/Outline’: Couldn’t open include file ‘aline_common_line.cginc’. at line 58
Shader error in ‘Hidden/ALINE/Outline’: Couldn’t open include file ‘aline_common_line.cginc’. at line 89
Shader error in ‘Hidden/ALINE/Surface’: Couldn’t open include file ‘aline_common_surface.cginc’. at line 24
Shader error in ‘Hidden/ALINE/Surface’: Couldn’t open include file ‘aline_common_surface.cginc’. at line 61
Shader error in ‘Hidden/ALINE/Surface’: Couldn’t open include file ‘aline_common_surface.cginc’. at line 107

That’s odd. Do you have those files?
Does it happen every time you try to build?

Yep the files are there and it is happening every time I build

Do you also have the A* Pathfinding Project installed?

Yep, could there be a conflict? I’m using the latest beta version of A*, the latest version of Aline, and the latest Unity 2021 LTS

@aron_granberg Any ideas on how I can resolve this issue? Haven’t been able to get the latest build out to my players. At this rate, I might have to scrap Aline :confused:

Hi

Would it be possible for you to share a project with me where I can reproduce it?

1 Like

Just messaged you the repro @aron_granberg