Page 1 of 1

ES3Type_RectTransform NullReferenceException always occurs

Posted: Sun May 17, 2020 10:06 am
by Ryan
Hello,
My Unity Ver is 2019.3.10f
Easy save 3.3.1f2

I save a gameobject with this line of code.
ES3.Save<GameObject>("GameObject", GameObject.Find("GameObjectName"));

then I load with this line of code.
ES3.LoadInto<GameObject>("GameObject", GameObject.Find("GameObjectName"));

ES3Type_RectTransform NullReferenceException always shows up when ES3.LoadInto runs.
It doesn't matter what kind of GameObject I try to save and load( they are usual just a very simple gameObject with Transform comment attached)

I don't know if I'm doing anything worry, very need some help, thanks.

Re: ES3Type_RectTransform NullReferenceException always occu

Posted: Sun May 17, 2020 10:12 am
by Ryan
update, now the same error is showing up even though I'm not using ES3.Save<GameObject>()
the error comes from

ES3Type_RectTransform

protected override void ReadComponent<T>(ES3Reader reader, object obj)
{
if (obj.GetType() == typeof(UnityEngine.Transform))
obj = ((Transform)obj).gameObject.AddComponent<RectTransform>();

Re: ES3Type_RectTransform NullReferenceException always occu

Posted: Sun May 17, 2020 10:44 am
by Joel
Hi Ryan,

Please could you private message me a basic project which replicates this? I've had no reports of this on recent versions.

All the best,
Joel