outline on hover
This commit is contained in:
36
Assets/Project Files/Scripts/Arlo/Hover.cs
Normal file
36
Assets/Project Files/Scripts/Arlo/Hover.cs
Normal file
@@ -0,0 +1,36 @@
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
|
||||
public class Hover : MonoBehaviour
|
||||
{
|
||||
|
||||
Material material;
|
||||
Color color;
|
||||
Outline outline;
|
||||
|
||||
// Start is called before the first frame update
|
||||
void Start()
|
||||
{
|
||||
material = GetComponent<Renderer>().material;
|
||||
color = material.color;
|
||||
outline = gameObject.GetComponent<Outline>();
|
||||
outline.enabled = false;
|
||||
}
|
||||
|
||||
// Update is called once per frame
|
||||
void Update()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
public void HoverStart()
|
||||
{
|
||||
outline.enabled = true;
|
||||
}
|
||||
|
||||
public void HoverEnd()
|
||||
{
|
||||
outline.enabled = false;
|
||||
}
|
||||
}
|
||||
11
Assets/Project Files/Scripts/Arlo/Hover.cs.meta
Normal file
11
Assets/Project Files/Scripts/Arlo/Hover.cs.meta
Normal file
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: c93cfeee8cd29624bae7c5203dedb433
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
Reference in New Issue
Block a user