using System.Collections; using System.Collections.Generic; using UnityEngine; public class MonsterCoreDrop : MonoBehaviour { private GameObject _monsterCorePrefab; public void Start() { Debug.Log("MONSTER CORING SSO HARD"); // Si le prefab n'est pas fixé via l'inspector, tenter de le charger depuis Resources/"Food" //if (_monsterCorePrefab == null) //{ // _monsterCorePrefab = Resources.Load("yieldFood"); // if (_monsterCorePrefab == null) // { // Debug.LogWarning("MonsterCoreDrop: prefab 'yieldFood' introuvable dans le dossier Resources. Assignez-le dans l'inspector ou placez-le dans Resources/yieldFood."); // } //} } public void Death() { //if (_monsterCorePrefab != null) //{ // Instantiate(_monsterCorePrefab, transform.position, Quaternion.identity); //} Debug.Log("MONSTER CORE DROPPEDD"); } private void OnDestroy() { //if (_monsterCorePrefab != null) //{ // Instantiate(_monsterCorePrefab, transform.position, Quaternion.identity); //} Debug.Log("MONSTER CORE DROPPEDD"); } }