As the title says, I’ve created a scriptable object, but when I try to drag it into a value in the inspector, it doesn’t work. I tried selecting it from the asset menu aswell, and it shows up, but when I click it it still doesn’t show up in the serialized value.
Here’s the code for the scriptable object:
using UnityEngine;
[System.Serializable]
[CreateAssetMenu(fileName = "Lighting Preset", menuName = "Scriptables/Lighting Preset", order = 1)]
public class LightingPreset : ScriptableObject
{
public Gradient AmbientColor;
public Gradient DirectionalColor;
public Gradient fogColor;
}
And here’s the value I’m trying to put it in:
[SerializeField]
private LightingPreset preset;
I have no idea why it doesn’t go in. Thanks to anyone who has any advice about this situation.