SeeThroughCallbackTest.cs 541 B

12345678910111213141516171819202122
  1. using System.Collections;
  2. using System.Collections.Generic;
  3. using UnityEngine;
  4. public class SeeThroughCallbackTest : MonoBehaviour
  5. {
  6. // Start is called before the first frame update
  7. void Start()
  8. {
  9. API_GSXR_Slam.GSXR_Add_SeeThrough_Callback(OnSeeThroughCallback);
  10. }
  11. private void OnDestroy()
  12. {
  13. API_GSXR_Slam.GSXR_Remove_SeeThrough_Callback(OnSeeThroughCallback);
  14. }
  15. private void OnSeeThroughCallback(bool isShowSeeThrough)
  16. {
  17. this.gameObject.SetActive(isShowSeeThrough);
  18. }
  19. }