ES3Type_RectTransform NullReferenceException always occurs

Discussion and help for Easy Save 3
Post Reply
Ryan
Posts: 2
Joined: Sun May 17, 2020 9:50 am

ES3Type_RectTransform NullReferenceException always occurs

Post 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.

Ryan
Posts: 2
Joined: Sun May 17, 2020 9:50 am

Re: ES3Type_RectTransform NullReferenceException always occu

Post 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>();

User avatar
Joel
Moodkie Staff
Posts: 2755
Joined: Wed Nov 07, 2012 10:32 pm

Re: ES3Type_RectTransform NullReferenceException always occu

Post 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
Joel @ Moodkie Interactive
Twitter - Unity

Post Reply