CreateMenuAsset is ignored

I’m unable to progress on my lecture, because of this problem:

CreateAssetMenu attribute on WaveConfig will be ignored as WaveConfig is not derived from ScriptableObject.
UnityEditor.EditorApplication:Internal_CallUpdateFunctions()

This is my current source code:

 * WaveConfig.cs
 * Created by Phaxtolgia
 * 
 * Summary: 1 of 4 scripts that determine how the enemy ships behave.
 * TBD
 *****/

using System.Collections;
using System.Collections.Generic;
using UnityEngine;

[CreateAssetMenu(menuName = "Enemy Wave Config")]
public class WaveConfig : MonoBehaviour
{
    // Start is called before the first frame update
    void Start()
    {
        
    }

    // Update is called once per frame
    void Update()
    {
        
    }
}

What’s going on here?

I don’t think CreateAssetMenu works for MonoBehaviour, it’s gotta inherit from ScriptableObject.

public class WaveConfig : ScriptableObject

FML. He even typed that in the lecture. I need to be more attentive.

This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.