outline on hover

This commit is contained in:
2022-03-21 18:36:45 +02:00
parent f76431d855
commit c23213ad50
37 changed files with 2796 additions and 26 deletions

View 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;
}
}

View File

@@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: c93cfeee8cd29624bae7c5203dedb433
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant: