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:
And this are the files that apparently don’t export:
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.
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.
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.