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.使用合适高亮