Scriptable Objects can be used as data containers in Unity3d. They don't need to be attached to a GameObject in a scene but they can be saved as assets in our project. Most often, they are used as assets which are only meant to store data.
We can do create and add data as below.
[CreateAssetMenu(fileName ="New Player Card" , menuName ="Card")]
public class GameData : ScriptableObject
{
public static string name;
public int health;
public spawnDelay;
}
And then we can create assets by Create->Card.
What I was looking to do is instead of creating assets to the game, create assets based on the data during the gameplay its own. And Destroy them at the end of the game or the scene. Does anybody have an idea of doing this? Any guide/ ideas would be highly appreciated. Thank you.