Using Shape Line

Avatar
  • updated
  • Answered

Hi, i would like to know if it's possible to replace line renderer by your line shape ( the objective is to replace line renderer by tomething more beautiful)?

Reporting a bug? please specify Unity version:
Reporting a bug? please specify Shapes version:
Reporting a bug? please specify Render Pipeline:
Built-in render pipeline
Avatar
Freya Holmér creator

it doesn't share all features of the line renderer, so it's not a 1:1 replacement

Shapes doesn't support custom textures/materials, and a lot of its behavior you'll have to code yourself (while Unity's trail renderer etc animates on its own)

Avatar
hugo lammens
Quote from Freya Holmér

it doesn't share all features of the line renderer, so it's not a 1:1 replacement

Shapes doesn't support custom textures/materials, and a lot of its behavior you'll have to code yourself (while Unity's trail renderer etc animates on its own)

Ok thanks for the quick answer, im a beginner in unity and my goal is to replace a plan trajectory represented by a line renderer by something more esthetic like your lines and i dont know how to do that.

Avatar
hugo lammens

My point is , is that actually possible to visualize trajectory with your asset ?

Avatar
Freya Holmér creator

oh, definitely yes! you can do that with a polyline, supply it with all the points in the path, and you're good to go :)

Avatar
hugo lammens

Ok i dont know how to do that for now but i will try it, the problem is i have to go from a  line renderer into a polyline for now, i will try tomorrow, and i will ask you some questions if that does not bother you.  Thanks you again.

Avatar
hugo lammens
Quote from Freya Holmér

it doesn't share all features of the line renderer, so it's not a 1:1 replacement

Shapes doesn't support custom textures/materials, and a lot of its behavior you'll have to code yourself (while Unity's trail renderer etc animates on its own)

But what is he difference between  polyline and line renderer ? They both needs points to be visualized right ?

Avatar
Freya Holmér creator
  • Answered

they have a slightly different feature set, Shapes has corner mitering modes, Unity's does not. Unity's has texture support, Shapes does not, and so on. you can compare the two here:

https://docs.unity3d.com/Manual/class-LineRenderer.html

https://acegikmo.com/shapes/docs/#shape-Polyline

Avatar
hugo lammens

I have to transform this script into another one using polyline

Image 661