using System; using System.Collections; using System.Collections.Generic; using Invector; using Invector.Utils; using Lean.Pool; using UnityEngine; namespace Beyond { public class StreamedResource : MonoBehaviour { private SerializedStreamedItem m_streamedItem; public SerializedStreamedItem StreamedItem { set { m_streamedItem = value; } } public void OnEnable() { //find tags and disaple after respawning var comment = GetComponentInChildren(); if (comment != null) { comment.gameObject.SetActive(false); } } public void OnCollect() { if (m_streamedItem != null) m_streamedItem.isAvailable = false; LeanPool.Despawn(gameObject); } public void OnDisable() { //Debug.Log("Test"); } } }