37 lines
728 B
C#
37 lines
728 B
C#
using System.Collections;
|
|
using System.Collections.Generic;
|
|
using UnityEngine;
|
|
|
|
public class Model_tip : MonoBehaviour
|
|
{
|
|
public GameObject ui_tip;
|
|
// Start is called before the first frame update
|
|
void Start()
|
|
{
|
|
|
|
}
|
|
void OnTriggerEnter(Collider other)
|
|
{
|
|
if (other.gameObject.CompareTag("MainCamera"))
|
|
{
|
|
ui_tip.SetActive(true);
|
|
Debug.Log("ÏÔʾ");
|
|
|
|
}
|
|
}
|
|
|
|
void OnTriggerExit(Collider other)
|
|
{
|
|
if (other.gameObject.CompareTag("MainCamera"))
|
|
{
|
|
ui_tip.SetActive(false);
|
|
Debug.Log("Òþ²Ø");
|
|
}
|
|
}
|
|
// Update is called once per frame
|
|
void Update()
|
|
{
|
|
|
|
}
|
|
}
|