Howdy all, I am creating an .asset file from a ScriptableObject I have storing some basic information:
using UnityEngine;
public class CompiledBuild : ScriptableObject
{
public string[] WordStrings;
public Color[][] WordColors;
public int ChunkSizeMs;
public int FrameLengthChunks;
public int DownSampleFactor;
public string NetworkConfig;
}
The asset I am creating seems to be all good. I am creating these assets from an “Editor” project of mine and I intend to import these “CompiledBuild” assets into a separate “Game” project (the editor code is in no way needed to ship with the game so it is a separate project), however I am having trouble reading the .asset file within the main game project. I have this CompiledObject class in both projects (I have even tried placing them in exactly the same location in the project heirarchy) and they are identical, however it doesn’t seem like Unity can read the exported asset if I paste it into the main game Project. If I have an object reference to a CompiledBuild object in the scene the Inspector shows there are no CompiledBuild assets, and if I click to drag the asset into the reference the text while dragging says “Nothing Selected” (the string hardcoded into Unity for missing script references).
My question is this: Is sharing an .asset file between projects possible? Or are they tied to the project they were created in. I have also tried right-clicking my asset and choosing “Export Package”, but the export window seems to want to include my entire project of script files as “dependencies” even though it is a pure ScriptableObject class.
Is it possible? Or do I need to share my data differently? Any help much appreciated. I have searched around for this a fair amount online but cannot find anybody who is trying to share assets like this.