Hello and I'm hope whoever is reading this is having a wonderful day today!
So as the title says, I want to create a enemy ID system, nothing to crazy, I have this Scriptable Object
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
//General data for "generic" enemies in the game.
[CreateAssetMenu(fileName = "enemyData")]
public class enemyData : ScriptableObject
{
public string enemyName;
public int enemyHP;
public int enemyCurrentHP;
public int enemyDamage;
public int enemyID;
}
And another script that basically makes that when the player collides with a certain enemy it loads a battle scene, and the enemy in the battle would be based on the enemyID in the SO.
I'm just having problems getting the enemy ID in the time of collision, what is the best way to do something like that?
Add comment
↧