U3D_TobaccoWarehouseISMDTSy.../Assets/OutlineEffect/Samples/Demo/Toggle.cs

24 lines
481 B
C#

using System.Collections;
using System.Collections.Generic;
using UnityEngine;
namespace cakeslice
{
public class Toggle : MonoBehaviour
{
// Use this for initialization
void Start()
{
}
// Update is called once per frame
void Update()
{
if(Input.GetKeyDown(KeyCode.K))
{
GetComponent<Outline>().enabled = !GetComponent<Outline>().enabled;
}
}
}
}