Page 1 of 2

The name 'ES3' does not exist in the current context?

Posted: Sat Apr 04, 2020 10:58 pm
by ryzeonline
OK, I took the plunge and bought the asset.

Imported it from the asset store into a project.

Created a script copied straight from the getting started guide:

...yadda yaddad class declaration...

Code: Select all

{
public float myKey;

// This checks whether "myKey" exists before trying to load it.
if(ES3.KeyExists("myKey"))
    myValue = ES3.Load<float>("myKey");
}

It refuses to compile and spits out this error:

Code: Select all

 error CS0103: The name 'ES3' does not exist in the current context
I've spent hours backing up my project, re-installing the asset, testing in a new project, etc. and can't figure it out. It's probably something I'm doing wrong, but I'd appreciate any help if possible, thanks everyone.

Re: The name 'ES3' does not exist in the current context?

Posted: Sun Apr 05, 2020 8:30 am
by Joel
Hi there,

The most common cause for this is that there are other errors being thrown in the console, so Unity cannot compile Easy Save 3 until these are resolved. Please could you check that there are no other errors in console?

Also have you moved Easy Save from the Assets/Plugins folder? It's placed in this location to ensure that it's compiled before anything else, so removing it from here will prevent you from being able to access Easy Save from any scripts which are compiled in the first pass.

If neither of these resolve the issue, please could you private message me a basic project which replicates this?

All the best,
Joel

Re: The name 'ES3' does not exist in the current context?

Posted: Sun Apr 05, 2020 3:35 pm
by ryzeonline
Thanks so much for the tips and ideas Joel, especially on a Sunday! I appreciate it, I'll look into all your suggestions and let you know about my progress.

Re: The name 'ES3' does not exist in the current context?

Posted: Wed Apr 08, 2020 2:23 pm
by ryzeonline
Ok, so I cleared up a bunch of compiler errors, and my project is clean AF :)


But I still get the ES3 doesn't exist error with a simple import and copy the 2 line script test from the guides.


So I tried it in a blank project, and there were no errors.


So I guess it's something in my project that's causing the problem, but now that I've fixed all compiler errors, I don't see how that could be.


Anyway, since I need this to work with my project, and I can't figure out what's left to fix, I think I'll have to pass on the asset and explore other options, sadly. Thanks for all your help and pointers Joel, and I can tell it's an amazing asset, just not for me. Am I able to get a refund?

Re: The name 'ES3' does not exist in the current context?

Posted: Wed Apr 08, 2020 2:27 pm
by Joel
Hi there,

If you send me a project which replicates this then I should be able to immediately see what is happening.

However, if you would prefer a refund please private message me your invoice number and I’ll request an approval from Unity.

All the best,
Joel

Re: The name 'ES3' does not exist in the current context?

Posted: Wed Apr 08, 2020 5:35 pm
by ryzeonline
Joel wrote:Hi there,

If you send me a project which replicates this then I should be able to immediately see what is happening.

However, if you would prefer a refund please private message me your invoice number and I’ll request an approval from Unity.

All the best,
Joel

I totally appreciate it Joel, truly.


Unfortunately, it works fine on a fresh import in a fresh project - so no real point sending you that. But on a fresh import on my now-clean project, it doesn't. I could try sending you that, but the project is like 8gb .zipped.


I may buy it again later when I have a superior coder on my team or perhaps it gets updated or I'll consider it when I start a new project.


Thanks for being so understanding, I'll PM you, wishing you a great day.

Re: The name 'ES3' does not exist in the current context?

Posted: Fri Apr 02, 2021 2:15 pm
by HuldaGnodima
I have the same error right now!
Everything works perfectly though and my projects compiles without any errors. Attached image of it showing red below:

Image

Did anyone figure out what the issue is? Odd that Visual code shows there's an error when Unity compiles it fine! :)

Re: The name 'ES3' does not exist in the current context?

Posted: Fri Apr 02, 2021 2:28 pm
by Joel
Hi there,

If Easy Save 3 is in your project, there are no errors in console, this will be an issue at Unity's end rather than ours. If this is the case, I recommend getting in touch with them for more information as unfortunately we're unable to debug their Editor code.

All the best,
Joel

Re: The name 'ES3' does not exist in the current context?

Posted: Fri Apr 02, 2021 2:30 pm
by HuldaGnodima
Joel wrote: Fri Apr 02, 2021 2:28 pm Hi there,

If Easy Save 3 is in your project, there are no errors in console, this will be an issue at Unity's end rather than ours. If this is the case, I recommend getting in touch with them for more information as unfortunately we're unable to debug their Editor code.

All the best,
Joel
Thank you for your quick response! :)
Yes, it doesn't seem to be at Easy Save's end!

Re: The name 'ES3' does not exist in the current context?

Posted: Tue Mar 22, 2022 2:15 pm
by gooby
Hi, I don't mean to necropost but the solution to this problem is to go to Unity>Edit>Preferences>External Tools>Regenerate Project Files. Also try a reimport of ES3 plugin by right clicking the folder>Reimport if that doesnt work.