using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using HighlightingSystem;
public class hijglingCtrl : MonoBehaviour
{
public static void highlighterObjectByBool(GameObject _obj, bool isOn)//開或關
{
if (_obj.GetComponent<Highlighter>() == null)
{
_obj.AddComponent<Highlighter>();
}
if (isOn)
_obj.GetComponent<Highlighter>().FlashingOn();
else
_obj.GetComponent<Highlighter>().FlashingOff();
}
}
public GameObject men;
hijglingCtrl.highlighterObjectByBool(men, true);
1.相機掛載渲染
2.第二個腳本不需掛載
3.使用合適高亮