using UnityEngine; public sealed class ResourceTextProbe : MonoBehaviour { [SerializeField] private string resourceKey = "SharpRune/Message"; private TextAsset loaded; private void OnEnable() { if (string.IsNullOrWhiteSpace(resourceKey)) { Debug.LogError("Assign the extension-free Resources key.", this); return; } loaded = Resources.Load(resourceKey); if (loaded == null) { Debug.LogError("TextAsset missing or wrong type at key: " + resourceKey, this); return; } Debug.Log("Resource text: " + loaded.text, this); } private void OnDisable() { // This component borrows a potentially shared asset; it does not unload it globally. loaded = null; } }