Skip to content

Scriptable object attribute gets reset #123

@musjj

Description

@musjj

I have a scriptable object like this:

using System;
using System.Collections.Generic;
using Alchemy.Serialization;
using UnityEngine;

[CreateAssetMenu(fileName = "FooSO", menuName = "Scriptable Objects/FooSO")]
[AlchemySerialize]
public partial class FooSO : ScriptableObject
{
    [AlchemySerializeField, NonSerialized]
    public HashSet<BarSO> BarSOs;
}

BarSO here is another normal non-Alchemy scriptable object. Sometimes when restarting the editor or switching scenes, all scriptable object assets derived from FooSO gets their BarSOs attribute reset to null.

I'm not sure how to reproduce it, but it seems to happen pretty frequently.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions