Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Unity How To Make A Linerenderer Be Seen Only By Me?

Discussion in 'Scripting' started by brayT, Apr 14, 2019.

  1. brayT

    brayT

    Joined:
    Jan 21, 2018
    Posts:
    65
    how to make a linerenderer be seen only by me... currently its being seen by me and other cameras.... is there a way to make it only be seen by me?
     
  2. dgoyette

    dgoyette

    Joined:
    Jul 1, 2016
    Posts:
    4,193
    Who are 'you'?

    If you mean 'only seen by one camera' then you can put the line renderer on its own layer, and only render that layer on the main camera.
     
    SparrowGS likes this.
  3. brayT

    brayT

    Joined:
    Jan 21, 2018
    Posts:
    65
    doesn't make sense tho because it goes on each of the networked players.... meaning that if it all has the same layer wont they be able to see them
     
  4. dgoyette

    dgoyette

    Joined:
    Jul 1, 2016
    Posts:
    4,193
    You should describe your problem better. You have a multiplayer game, and you want to show a Line Renderer that's only visible to a single player? That should be trivial. It's the same kind of thing you'd do to show a UI to each player, where each player's UI shows only information specific to that player.
     
    SparrowGS likes this.
  5. SparrowGS

    SparrowGS

    Joined:
    Apr 6, 2017
    Posts:
    2,536
    @dgoyette is right, you need to explain more and better.
    and this should really be trivial to create, but it sounds like your architecture is weird...

    Do I understand you right and you have a multiplayer game and every character on each instance of the game has a camera attached to it?
     
    brayT likes this.