Unsupported types

What the capture refuses, why each one is refused, and the alternative the Inspector suggests instead.

Unity NexusForge Persistence 0.2.0 Updated

Refused with a reason, never dropped silently#

TypeWhyWhat to do instead
Texture2D, Material, Mesh, AudioClip, AnimationClip, Sprite, ShaderEditor content, not game stateStore a key you manage (a name, an index, an asset id) and resolve it when you load
UnityEvent, delegatesA binding, not a valueSave the state the event acts on
IntPtr, TypeNo stable text formStore a name or an id
A Unity object with no persistent idNothing stable to point atAdd PersistentIdentity, or derive the asset from PersistableScriptableObject
Anything deeper than the capture limitA cyclic or runaway graphFlatten the structure, or raise the limit deliberately

A refused field makes the capture unusable (IsUsable == false) rather than producing a save that quietly lost data. The report names the field, says why, and names the alternative.

The usual fix is a key, not a copy#

Saving a Texture2D would mean writing pixels into the save, which is slow, large, and wrong: the texture is content the build already ships. Save the choice instead:

csharp
public sealed class EquippedSkin : MonoBehaviour
{
    public string skinKey = class="tok-str">"default";   // resolved against your own catalogue at load
}

Where these appear#

The Inspector's Data section shows refusals as you assign sources, and the generated code in the Code section never mentions a refused type. The same findings are visible in Advanced mode and in Beginner mode — a refusal is not hidden because a view is simple.

Next#

Something wrong on this page? Every page here describes behaviour that is checked in the repository. If a page and the package disagree, the package wins.

Report a documentation problem · Frequently asked questions · Troubleshooting