You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

26 lines
412 B

using UnityEngine;
using System.Collections;
[RequireComponent(typeof(Camera))]
public class wireframe : MonoBehaviour {
public KeyCode wireFrameKey;
public bool wireFrameMode;
public void Start()
{
}
void OnPreRender() {
if(wireFrameMode)
GL.wireframe = true;
else
GL.wireframe = false;
}
void Update()
{
if(Input.GetKeyDown(wireFrameKey))
wireFrameMode = !wireFrameMode;
}
}