New to the forums? Click here to read the "How To" Guide.

Developer? Click here to go to the Developer Forums.

Line Renderer GEARVR

bordy131bordy131 Posts: 2
using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public class NewBehaviourScript1 : MonoBehaviour {

    // Use this for initialization
    private Transform childObject;
    private ParticleSystem objectParticles;
    private LineRenderer objectLineRenderer;
    void Start () {
        childObject = gameObject.transform.Find("EventHohl");
        objectLineRenderer = childObject.GetComponent<LineRenderer>();
	// Update is called once per frame
	void Update () {
        if (OVRInput.Get(OVRInput.Button.Two));
            objectLineRenderer.enabled = false;


I'm making VR video player with controls based on gearvr controller and I want to add function that will remove line renderer(because it disturbs when you watch video) and turn it back on touchpad click, or swipe up/down, idk. I tried to do this, but it couldn't work, upper you can see my code. EventHohl is eventsystem to which I attached linerenderer


  • LZoltowskiLZoltowski Posts: 6,774 Volunteer Moderator
    Heya, you might find better help in the developer part of the site, as this is a mainly end-user forum
    Core i7-7700k @ 4.9 Ghz | 32 GB DDR4 Corsair Vengeance @ 3000Mhz | 2x 1TB Samsung Evo | 2x 4GB WD Black
    ASUS MAXIMUS IX HERO | MSI AERO GTX 1080 OC @ 2000Mhz | Corsair Carbide Series 400C White (RGB FTW!) 

    Be kind to one another :)
Sign In or Register to comment.