Thank you very much for your reply! I surely use dataField and fill the name of my skeletonDataAsset field in. But I still recieve an error. I believe it has something to do with my customly serialized C# classes. For instance, I wrote a code to serialize C# queue to see it in inspector. It looks like this:
[System.Serializable]
public class UnitySerializedQueue : Queue<DialogueNode>, ISerializationCallbackReceiver
{
[SerializeField, HideInInspector]
private List<DialogueNode> _dialogueLines = new List<DialogueNode>();
public void OnAfterDeserialize()
{
Clear();
foreach (var item in _dialogueLines)
{
Enqueue(item);
}
}
public void OnBeforeSerialize()
{
_dialogueLines.Clear();
foreach (var item in this)
{
_dialogueLines.Add(item);
}
}
And the script where I have skeletonDataAsset Reference and animation field:
public class DialogueNode : IEmotion, IHasSkeletonDataAsset
{
public Speaker Speaker => _speaker;
public SkeletonDataAsset SkeletonDataAsset
{
get
{
return _skeletonDataAsset;
}
set
{
_skeletonDataAsset = value;
}
}
public List<GameObject> Bubbles => _bubbles;
public string Animation => _animation;
public bool Loop => _loop;
public AudioSource AudioSource => _audioSource;
public float LifeTime => _lifeTime;
public float WaitTime => _waitTime;
public int Chance => _chance;
[PropertyOrder(1)]
public UnityEvent Outcome;
[SerializeField]
private Speaker _speaker;
[SerializeField]
private SkeletonDataAsset _skeletonDataAsset;
[SerializeField]
private List<GameObject> _bubbles;
[SerializeField, SpineAnimation(dataField = "_skeletonDataAsset")]
private string _animation;
[SerializeField]
private bool _loop;
[SerializeField]
private AudioSource _audioSource;
[SerializeField]
private float _lifeTime, _waitTime;
[SerializeField]
private int _chance;
}
I guess it doesn't go that deep. Do you have any hints for me? Thanks once again!