Forum Discussion
bordy131
7 years agoHonored Guest
GearVR Line Renderer
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
Replies have been turned off for this discussion
Quick Links
- Horizon Developer Support
- Quest User Forums
- Troubleshooting Forum for problems with a game or app
- Quest Support for problems with your device
Other Meta Support
Related Content
- 1 year ago
- 2 years ago
- 9 months ago