InvalidCastException: Specified cast is not valid.

Discussion and help for Easy Save 3
Post Reply
jrbaxendale
Posts: 3
Joined: Sat May 22, 2021 6:16 pm

InvalidCastException: Specified cast is not valid.

Post by jrbaxendale »

This is my error.

<b>gameobject</b> (writing property)

--<b>__type</b> (writing property)

--<b>value</b> (writing property)

InvalidCastException: Specified cast is not valid.

This is my code:

public void SaveBtn()

{
ES3.Save("gameobject", Cubey); // Cubey is just a cube
Debug.Log("SavedSuccess");

}

It leads me to this:

((ES3Type_GameObject)type).saveChildren = settings.saveChildren;


I am simply trying to save a cube. I have an Easysave Manager, Cubey is added as a ref to the manager, it is not instantiated. What am I not getting Joel? thanks. :| :| :|
User avatar
Joel
Moodkie Staff
Posts: 4846
Joined: Wed Nov 07, 2012 10:32 pm

Re: InvalidCastException: Specified cast is not valid.

Post by Joel »

Hi there,

I don't appear to be able to replicate this at my end. Please could you replicate this in a new, blank project and private message it to me with instructions.

All the best,
Joel
Joel @ Moodkie Interactive
Purchase Easy Save | Contact | Guides | Docs | Getting started
Post Reply