public object Copy() { StaticAssetRef <T> r = new StaticAssetRef <T>(); r._index = _index; r._obj = _obj; return(r); }
public static bool Serialize <T>(Archive archive, ref T asset) where T : Object, StaticAsset.Indexed { StaticAssetRef <T> assetRef = asset; object boxed = assetRef; var r = instance.Serialize(archive, null, ref boxed, null); assetRef = (StaticAssetRef <T>)boxed; asset = assetRef.obj; return(r); }