Hi,
why are the preferred types saved in editor prefs?
I was just trying to start a new project with NodeCanvas for testing (and for sending you an isolated part of my project to look at) when I noticed that NC didn’t work and was giving exceptions due to missing components (that of course are not there in the new empty project with only NC added).
So what I will have to do is save my preferred types from my main project as a preset, reset them to the defaults, do stuff in the empty project and when I come back load from the defaults?
Preferred Types list is saved in EditorPrefs because it is an editor thing only and by no means it should affect either runtime, nor whether or not graphs are loaded correctly. The list there is simply a preference.
So, graphs created in project A, should correctly load and run in project B, considering that classes used in project A, exist in B of course.
What is the problem you are facing more specifically please?
Ok,
I want to start a new clean project with NodeCanvas (Project B). Without the preferred types from Project A, without any code from project A other than the NodeCanvas plugin itself of course. That gives me exceptions since it is apparently looking for the types from the preferred types list from the EditorPrefs.
Are you referring to an error like this: “Requested Type with name ‘XXXX’, could not be loaded.”
If so, this is totally harmless and a log I could potentially simply remove. It just states that the type does not exist in the project, but other than that it does not affect neither the editor nor the runtime.
If you think it is an annoying log, then you can indeed do what you said in your previous post. That is, saving a preset for each of your projects and loading them back when you switch between one another.
The only alternatives I could have made for the types list to be “per project”, would be to either use a ScriptableObject asset in some Resources folder, which is clunky to say the least, or use a real class that contains the list of types which mostly defeats the purpose of the editor. Thus why the presets exist 🙂
If you have something different to suggest, I’d like to hear it of course.
that’s the error I meant. Maybe it could be a warning at least that can be disabled in the settings, if it’s not important.
I’ll use the preset functionality then.
Cheers,
Felix
Author
Posts
Viewing 5 posts - 1 through 5 (of 5 total)
You must be logged in to reply to this topic.
Login
Register
By registering on this website you agree to our Privacy Policy.