Saving Scriptable Objects to Prefab?

Is there a way to save the settings of a scriptable object when its parent object is being added to a Prefab?

By scriptable object, I mean:

class GUIConfig extends ScriptableObject
{
      ...
}

When I dragged a gameobject with the following script to a prefab:

public var guiconfig:GUIConfig;

The prefab shows guiconfig as not being set, even though if I have set it.

I have the same problem. I have managed to work around the issue by not extending “ScriptableObject” and declaring the class has serializable as follows:

class GUIConfig extends System.Object {

}

After playing around, I have assumes that ScriptableObject is for creating links in the scene only and that those links are not transposed when creating a prefab. Another way of looking at this is that a prefab needs a way to be configured for each instance and this is where ScritableObject come in play. To create a master copy of the data that is centralized in the prefab, I simply use the standard .NET serialization. Unity will keep track of the overrides in the instances of the prefab and will apply the values from the prefab (which can be changed) for those instances that do not have overrides.

Good luck,
…reinual

I have the same problem. I have managed to work around the issue by not extending “ScriptableObject” and declaring the class has serializable as follows:

class GUIConfig extends System.Object {

}

After playing around, I have assumes that ScriptableObject is for creating links in the scene only and that those links are not transposed when creating a prefab. Another way of looking at this is that a prefab needs a way to be configured for each instance and this is where ScritableObject come in play. To create a master copy of the data that is centralized in the prefab, I simply use the standard .NET serialization. Unity will keep track of the overrides in the instances of the prefab and will apply the values from the prefab (which can be changed) for those instances that do not have overrides.

Good luck,
…reinual