0
Not a Bug

Error appearing in console when exporting a project as a package and importing it into another project

Andrew Scott 11 months ago updated by Lazlo Bonin (Lead Developer) 11 months ago 3

Ok, first of all both projects are not new projects, both have the same version of Peek. In this example, the only difference was the Version of Unity. Going from say 2019.3.0b12 to 2019.2.10 or 2019.2.12 to 2019.2.10

Steps, make sure that the projects are up to date code and asset wise. Then use the higher version, to modify code or the scene and then do this a few times and export the project as a package. Then import into a previous version and the following error will appear in the console and will not be removed if cleared.

Assets\Ludiq\Ludiq.PeekCore\Runtime\Dependencies\OdinSerializer\OdinBuildAutomation.cs(4,32): error CS0234: The type or namespace name 'Editor' does not exist in the namespace 'Ludiq.OdinSerializer' (are you missing an assembly reference?)

I do not use Odin, so don't know why it is specific to that.

Unity Version:
Peek Version:
1.1.5
Not a Bug

Hi Andrew,

If I understand correctly, you're downgrading your Unity project and trying to import a package of Peek that was imported in a newer version.

This is not officially supported, just like downgrading Unity projects in general, because the serialization format for assets and scenes can change in backwards-incompatible ways when updating Unity.

In this case, you're experiencing the error because the settings for the Odin Serializer DLLs get corrupted, and apparently they try to import editor code during runtime. Peek uses Odin Serializer as an internal dependency, not related to Odin Inspector.

You can fix the error by importing Peek from scratch from the Asset Store. Because we package the files for the lowest compatible Unity version, they should upgrade properly. Don't worry, your project settings will not get overridden, as those are never included in the packages.

No technically I am not down grading, because it is a Unity package that is supported across multiple versions.

When you import the Peek package in Unity 2019, the files inside Peek get changed by Unity to upgrade from 2018.4 (the minimum Peek version) to 2019 (your version). This change is irreversible. If you export Peek from that project, you export a "2019+" version of Peek, and reimporting it in a pre-2019 project is effectively the same as downgrading.

In other words, the Peek package that we ship is supported in both 2018 and 2019. But the Peek package that you updated after importing it in 2019 is no longer compatible with 2018.