AssetReleaser.cs 333 B

12345678910111213141516171819
  1. using System.Collections;
  2. using UnityEngine;
  3. namespace GFGGame
  4. {
  5. public class AssetReleaser : MonoBehaviour
  6. {
  7. public string resPath;
  8. private void OnDestroy()
  9. {
  10. if(!string.IsNullOrEmpty(resPath))
  11. {
  12. GFGAsset.Release(resPath);
  13. }
  14. }
  15. }
  16. }