A
A
AliminVerckon2022-02-07 18:32:07
Unity
AliminVerckon, 2022-02-07 18:32:07

Why does it return null when passing ScriptableObject through Inspector?

[SerializeField] private LevelProps props;
ScriptableObject

[CreateAssetMenu(fileName = "levelProps", menuName = "levelProps", order = 0)]
    public class LevelProps : ScriptableObject
    {
        [SerializeField] public List<GameObject> planets;
        [SerializeField] public List<GameObject> asteroids;
        [SerializeField] public List<GameObject> massiveObjects;
        [SerializeField] public List<GameObject> massiveObjectsWholes;
        [SerializeField] public List<GameObject> stations;
    }


in the first code I throw through the scriptableObject inspector and there is null
the first code is in a separate file
62013b7536135808016774.png

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question