[CreateAssetMenu(fileName = "Data", menuName = "ScriptableObjects/SpawnManagerScriptableObject", order = 1)]
public class SpawnManagerScriptableObject : ScriptableObject
{
public string prefabName;
public int numberOfPrefabsToCreate;
public Vector3[] spawnPoints;
}
using UnityEngine;
public class SerializableScriptableObject : ScriptableObject
{
[SerializeField] Guid _guid;
public Guid Guid => _guid;
void OnValidate()
{
#if UNITY_EDITOR // UnityEditor namespace is not available in Release/Builds
var path = UnityEditor.AssetDatabase.GetAssetPath(this);
_guid = new Guid(UnityEditor.AssetDatabase.AssetPathToGUID(path));
#endif
}
}