Highlighting System插件控制

 

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

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章