Parent of RectTransform is being set with parent property. Consider using the SetParent method instead, with the worldPositionStays argument set to false. This will retain local orientation and scale rather than world orientation and scale, which can prevent common UI scaling issues.
I am getting this error when I load game objects that have rects inside of them. I saw in other threads that this is possibly being updated? Or is this another matter entirely? Its a warning on load which is not terrible, but I have a lot of game objects being loaded which produces a lot of warnings. Is there any way to mitigate this?
This shouldn't be an issue in the latest versions of Easy Save. If you're already on the latest version, please could you send the full error message with line numbers?
Sorry to necro but I'm encountering this again with version 3.5.19, although the package manager shows 3.5.18.
Attached is a screenshot of the package manager.
Parent of RectTransform is being set with parent property. Consider using the SetParent method instead, with the worldPositionStays argument set to false. This will retain local orientation and scale rather than world orientation and scale, which can prevent common UI scaling issues.
UnityEngine.Transform:set_parent (UnityEngine.Transform)
ES3Types.ES3UserType_RectTransform:ReadComponent<UnityEngine.Component> (ES3Reader,object) (at Assets/Easy Save 3/Types/ES3UserType_RectTransform.cs:76)
ES3Types.ES3ComponentType:ReadUnityObject<UnityEngine.Component> (ES3Reader,object) (at Assets/Plugins/Easy Save 3/Scripts/Types/ES3ComponentType.cs:36)
ES3Types.ES3UnityObjectType:ReadObject<UnityEngine.Component> (ES3Reader,object) (at Assets/Plugins/Easy Save 3/Scripts/Types/ES3UnityObjectType.cs:64)
ES3Types.ES3ObjectType:ReadInto<UnityEngine.Component> (ES3Reader,object) (at Assets/Plugins/Easy Save 3/Scripts/Types/ES3ObjectType.cs:75)
ES3Types.ES3Type_GameObject:ReadComponents (ES3Reader,UnityEngine.GameObject) (at Assets/Plugins/Easy Save 3/Scripts/Types/Unity Types/ES3Type_GameObject.cs:248)
ES3Types.ES3Type_GameObject:ReadObject<object> (ES3Reader,object) (at Assets/Plugins/Easy Save 3/Scripts/Types/Unity Types/ES3Type_GameObject.cs:184)
ES3Types.ES3ObjectType:ReadInto<object> (ES3Reader,object) (at Assets/Plugins/Easy Save 3/Scripts/Types/ES3ObjectType.cs:75)
ES3Types.ES3Type_GameObject:ReadObject<object> (ES3Reader) (at Assets/Plugins/Easy Save 3/Scripts/Types/Unity Types/ES3Type_GameObject.cs:144)
ES3Types.ES3ObjectType:Read<object> (ES3Reader) (at Assets/Plugins/Easy Save 3/Scripts/Types/ES3ObjectType.cs:52)
ES3Reader:ReadObject<object> (ES3Types.ES3Type) (at Assets/Plugins/Easy Save 3/Scripts/Readers/ES3Reader.cs:253)
ES3Reader:Read<object> (ES3Types.ES3Type) (at Assets/Plugins/Easy Save 3/Scripts/Readers/ES3Reader.cs:282)
ES3Types.ES3CollectionType:ReadICollection<object> (ES3Reader,System.Collections.Generic.ICollection`1<object>,ES3Types.ES3Type) (at Assets/Plugins/Easy Save 3/Scripts/Types/Collection Types/ES3CollectionType.cs:52)
ES3Types.ES3ArrayType:Read (ES3Reader) (at Assets/Plugins/Easy Save 3/Scripts/Types/Collection Types/ES3ArrayType.cs:36)
ES3Reader:Read<object> (ES3Types.ES3Type) (at Assets/Plugins/Easy Save 3/Scripts/Readers/ES3Reader.cs:278)
ES3:Deserialize (ES3Types.ES3Type,byte[],ES3Settings) (at Assets/Plugins/Easy Save 3/Scripts/ES3.cs:887)
ES3:Deserialize<UnityEngine.GameObject[]> (byte[],ES3Settings) (at Assets/Plugins/Easy Save 3/Scripts/ES3.cs:876)
ES3File:Load<UnityEngine.GameObject[]> (string,UnityEngine.GameObject[]) (at Assets/Plugins/Easy Save 3/Scripts/ES3File.cs:264)
ES3:Load<UnityEngine.GameObject[]> (string,UnityEngine.GameObject[],ES3Settings) (at Assets/Plugins/Easy Save 3/Scripts/ES3.cs:504)
ES3AutoSaveMgr:Load () (at Assets/Plugins/Easy Save 3/Scripts/Auto Save/ES3AutoSaveMgr.cs:105)
Menus/<LoadAsyncScene>d__76:MoveNext () (at Assets/_Game/Scene_Start/Scripts/Menus.cs:355)
UnityEngine.SetupCoroutine:InvokeMoveNext (System.Collections.IEnumerator,intptr)
newjohnny wrote: ↑Mon Nov 25, 2024 1:19 am
Sorry to necro but I'm encountering this again with version 3.5.19, although the package manager shows 3.5.18.
Attached is a screenshot of the package manager.
Parent of RectTransform is being set with parent property. Consider using the SetParent method instead, with the worldPositionStays argument set to false. This will retain local orientation and scale rather than world orientation and scale, which can prevent common UI scaling issues.
UnityEngine.Transform:set_parent (UnityEngine.Transform)
ES3Types.ES3UserType_RectTransform:ReadComponent<UnityEngine.Component> (ES3Reader,object) (at Assets/Easy Save 3/Types/ES3UserType_RectTransform.cs:76)
ES3Types.ES3ComponentType:ReadUnityObject<UnityEngine.Component> (ES3Reader,object) (at Assets/Plugins/Easy Save 3/Scripts/Types/ES3ComponentType.cs:36)
ES3Types.ES3UnityObjectType:ReadObject<UnityEngine.Component> (ES3Reader,object) (at Assets/Plugins/Easy Save 3/Scripts/Types/ES3UnityObjectType.cs:64)
ES3Types.ES3ObjectType:ReadInto<UnityEngine.Component> (ES3Reader,object) (at Assets/Plugins/Easy Save 3/Scripts/Types/ES3ObjectType.cs:75)
ES3Types.ES3Type_GameObject:ReadComponents (ES3Reader,UnityEngine.GameObject) (at Assets/Plugins/Easy Save 3/Scripts/Types/Unity Types/ES3Type_GameObject.cs:248)
ES3Types.ES3Type_GameObject:ReadObject<object> (ES3Reader,object) (at Assets/Plugins/Easy Save 3/Scripts/Types/Unity Types/ES3Type_GameObject.cs:184)
ES3Types.ES3ObjectType:ReadInto<object> (ES3Reader,object) (at Assets/Plugins/Easy Save 3/Scripts/Types/ES3ObjectType.cs:75)
ES3Types.ES3Type_GameObject:ReadObject<object> (ES3Reader) (at Assets/Plugins/Easy Save 3/Scripts/Types/Unity Types/ES3Type_GameObject.cs:144)
ES3Types.ES3ObjectType:Read<object> (ES3Reader) (at Assets/Plugins/Easy Save 3/Scripts/Types/ES3ObjectType.cs:52)
ES3Reader:ReadObject<object> (ES3Types.ES3Type) (at Assets/Plugins/Easy Save 3/Scripts/Readers/ES3Reader.cs:253)
ES3Reader:Read<object> (ES3Types.ES3Type) (at Assets/Plugins/Easy Save 3/Scripts/Readers/ES3Reader.cs:282)
ES3Types.ES3CollectionType:ReadICollection<object> (ES3Reader,System.Collections.Generic.ICollection`1<object>,ES3Types.ES3Type) (at Assets/Plugins/Easy Save 3/Scripts/Types/Collection Types/ES3CollectionType.cs:52)
ES3Types.ES3ArrayType:Read (ES3Reader) (at Assets/Plugins/Easy Save 3/Scripts/Types/Collection Types/ES3ArrayType.cs:36)
ES3Reader:Read<object> (ES3Types.ES3Type) (at Assets/Plugins/Easy Save 3/Scripts/Readers/ES3Reader.cs:278)
ES3:Deserialize (ES3Types.ES3Type,byte[],ES3Settings) (at Assets/Plugins/Easy Save 3/Scripts/ES3.cs:887)
ES3:Deserialize<UnityEngine.GameObject[]> (byte[],ES3Settings) (at Assets/Plugins/Easy Save 3/Scripts/ES3.cs:876)
ES3File:Load<UnityEngine.GameObject[]> (string,UnityEngine.GameObject[]) (at Assets/Plugins/Easy Save 3/Scripts/ES3File.cs:264)
ES3:Load<UnityEngine.GameObject[]> (string,UnityEngine.GameObject[],ES3Settings) (at Assets/Plugins/Easy Save 3/Scripts/ES3.cs:504)
ES3AutoSaveMgr:Load () (at Assets/Plugins/Easy Save 3/Scripts/Auto Save/ES3AutoSaveMgr.cs:105)
Menus/<LoadAsyncScene>d__76:MoveNext () (at Assets/_Game/Scene_Start/Scripts/Menus.cs:355)
UnityEngine.SetupCoroutine:InvokeMoveNext (System.Collections.IEnumerator,intptr)
Hi there,
This is happening because you've created an ES3UserType for RectTransform and have selected the 'parent' property to be serialized. I strongly recommend using the built-in support for RectTransform instead, which uses SetParent() rather than saving and loading the parent property.