Problem with script made asset not exporting

So I have this problem.

When I export the game (to pc or iOS iPhone 6) it apparently dosent export some of the assets with it. The exported game basically acts as if they don’t exist.

This is the script I use to create the assets.

using UnityEngine;
using System.Collections;

[CreateAssetMenu(fileName = "NewPart", menuName = "PartTypes/Part", order = 1)]
[System.Serializable]
public class Part : ScriptableObject {
    public string partName;
    public float mass; //mass of the part
    public bool top, bottom, left, right; //where other parts can be attached
    public Sprite texture; //the sprite-texture of the part
    public Transform prefab;
    public bool betweenPart;
    public bool sidePart;
}

[CreateAssetMenu(fileName = "NewFuelTank", menuName = "PartTypes/FuelTank", order = 2)]
[System.Serializable]
public class FuelTankPart : Part {
    public float fuel;
}

[CreateAssetMenu(fileName = "NewEingen", menuName = "PartTypes/Eingen", order = 3)]
[System.Serializable]
public class EingenPart : Part {
    public float thrust;
    public float fuelConsumption;
}

This are errors that I get when I export the game:
2850368--208281--upload_2016-11-13_1-7-25.png
And this are the files that apparently don’t export:
2850368--208282--upload_2016-11-13_1-8-58.png

If they aren’t referenced in the game, they won’t be included in the build

They are referenced. But apparently still don’t export…

2850596--208317--upload_2016-11-13_11-31-23.png

If you want to guarantee they’re included in the build, you can put them in a Resources folder. If anything just to see if that works to verify the issue is that they’re left out of the build.

Sorry for the dumb question, but where is the resource folder? I have actually never even heard of it.

You can create it at the root level of your Assets folder (it can be anywhere though, and you can have multiple). Just name it “Resources”. I’m sure eventually Unity will move away from this method, but right now anything in a Resources folder is included in the build with or without a reference.

Nope, it did not work. (also i’m a idiot for deleting the workaround I found : ^) Edit: thanks god unity now saves the deleted files to trash bin)

The workaround that I found was to create a gameObject prefab with a instance of the class with the info.

That shouldn’t be necessary. What exactly are the objects in your scene that are throwing those warnings, do they show missing scripts? That doesn’t particularly make sense because ScriptableObject classes and instances do not exist in the scene. Things in the scene should only have references to the assets.