Search Unity

  1. Unity 6 Preview is now available. To find out what's new, have a look at our Unity 6 Preview blog post.
    Dismiss Notice
  2. Unity is excited to announce that we will be collaborating with TheXPlace for a summer game jam from June 13 - June 19. Learn more.
    Dismiss Notice

Question Line rendering Game

Discussion in 'UGUI & TextMesh Pro' started by SalmanMoussa1254, May 2, 2024.

  1. SalmanMoussa1254

    SalmanMoussa1254

    Joined:
    May 2, 2024
    Posts:
    1
    hello i need help with this im trying to create a level in my game that uses line rendering to draw a arrow from a user to another and im having a problem with making it i watched all youtube videos availble for this topic but nothing worked the idea of the level is like this i want to create a canvas this canvas has multiple words and i click on a world and drag a line from it to another world this picture is a example of my idea :
    Screenshot 2024-05-02 185525.png
    like this picture the idea looks simple but the line is not showed and nothing from youtube is herlping if someone could guide me how to do it it would be really helpful
     
  2. Kurt-Dekker

    Kurt-Dekker

    Joined:
    Mar 16, 2013
    Posts:
    39,066
    If the above is UI you will need to do a lot of extra mapping to get the LineRendering coordinate space to match up, plus layering it to get it to show up where you want it will be tricky.

    You might consider looking into the UI-extensions open source package, which has a line-draw function that comes in via CanvasRenderer.

    https://github.com/Unity-UI-Extensions/com.unity.uiextensions

    There's plenty of other forks out there too.