0
Fixed

The type or namespace name 'RegisterFormatterAttribute' could not be found

Ilya 1 year ago updated by Lazlo Bonin (Lead Developer) 2 months ago 21 6 duplicates
Unity Version:
Peek Version:

Duplicates 6

+1
Working on Fix

Hi Ilya,

Can you please try this workaround and let me know if it works:

  1. Select Assets/Ludiq/Ludiq.PeekCore/Dependencies/OdinSerializer/AOT/Ludiq.OdinSerializer
  2. In the inspector, check Any Platform
  3. Click Apply

Let me know!

Hello. This fix worked for me. Thanks.

Need More Information

Hi Ilya,

I'm glad the workaround worked for you!

Normally, this is an operation that should be automated by Odin during build.

I'm not sure why it didn't happen automatically in your case.

Without more information about your Unity version or setup, I can't help reproduce the issue.

If anyone else encounters this bug reliably, please comment with your version info and reproduction steps!

Hi,

Same errors on my side using the Unity / Addressables / Build / Build Player Content (iOS).
Checking Any Platform don't resolve the problem.

Best

Ludiq + Bolt + Peek up to date
Unity 2019.3.0b7

Vincent

Hi Vborcard,

Are you getting the exact same errors, or anything slightly different?

If they are the exact same, then the platform enable fix should have worked.

Please send us the log if possible!

Hi,

I modified the settings (any platform)


I get that errors :

log_with_fix.rtf

Hi Vborcard,

Please uncheck the "Exclude Platform" settings you have checked, except for "Editor". You're effectively excluding your target platform.

Hi,

Ok. It works. Checking the "any plateform" automatically check "Editor, Standalone, iOS".
Resolved to uncheck Standalone and iOs.

Many thx

+1

Hi ophilbinbriscoe,

I'm merging your issue with another similar report with a known workaround.

+1
Cannot Reproduce

Hi everyone,

The issue here is that somehow, Odin's build automation script does not automatically kick in and set the right platforms for your current build target, which makes builds fail because the Odin attributes are not found.

This is why manually fixing the Odin DLL importer settings as indicated by the workaround above fixes it.

However, I can't get it to reproduce here at all. The Odin automation build always kicks in and sets the proper targets in the importer settings, even if I purposely uncheck/remove it beforehand.

Here's a test of me building for Peek + Android + IL2CPP + Unity 2019.3:

https://streamable.com/quhex

Unless anyone has clear reproduction steps, I can't help any more in debugging this so I'll have to mark this as cannot reproduce.

Hopefully people faced with the same issue can post repro steps, but otherwise the workaround seems to work for everyone.

Just wanted to provide more details:

- This ScriptableObject (SO) variant should build a Standalone Windows build set to IL2CPP. Didn't work.
Set it to Mono, also didn't work.
- this BuildAutomation stuff is a custom package added via git through the PackageManager


However: I don't know if this is a valid fix, but this worked:
- Located the asmdef of Ludiq.PeekCore.Runtime

- Exluded Windows 32/64-bit Platform

- Mono AND IL2CPP Builds worked

I need confirmation that this is a valid workaround for now or if this will break anything else In Editor or within the builds until there is a fix.

+1
Pending Review

Hi Btsslawa,

Thanks for the report. I'll look into reproducing this on my end.

In the mean time, as I mentioned on Discord, your workaround should be perfectly safe. Peek requires no runtime assembly, it's just a side-effect of how our common library (Ludiq.Core) is structured to also be used with Bolt.

Hi Lazio,

This problem is still here. For me it happens building iOS. The fix from Btsslawa worked, I added "ios" to the "excludePlatforms" in "Ludiq.PeekCore.Runtime".

This should not be the "solution" and I would expect (specially after 7 months) a proper solution from the developers of a paid asset.

Looking forward to see your fix.

Need More Information

Hi RxMarcus,

Sorry about the issue and thank you for the bug report.

I must admit I'm not familiar with Addressables yet. Can you provide a step-by-step guide to reproduce the issue so I can investigate further?

At a glance, it seems like your build is missing the Odin Serializer reference in the Peek assembly definition, but I'm unsure why that would happen. It may be related to the import settings of the OdinSerializer DLLs. 

My apologies for the false alarm. I started from scratch and checked the build while bringing in each package this time and... no issues. Not sure what was going on above.

Fixed (Unreleased)

Hi everyone,

As I stated above, the issue here is that somehow, Odin's build automation script does not automatically kick in and set the right platforms for your current build target, which makes builds fail because the Odin attributes are not found.

This might because you're building from atypical paths -- your custom CI, building from the command line, building for adressables only, etc. In turn, Odin's pre-build automation does not recognize that build path and does not set the platforms properly.

In the next version, I will apply a "forced" fix to this by disabling the compilation Ludiq.PeekCore.Runtime in builds altogether. Normally, this shouldn't be needed, as Peek only runs in the editor, so removing all runtime components should fix build issues (and speed up builds!) while not affecting Peek at all.

I thought of a rearon why Odin occurred this error.

Odin has a mode call "Editor Only Mode" whitch dissable all Serialized function durring runtime.

And I think a lot of us use this mode. 

But I dont guarantee this is the reason, just a vague guess.

Fixed

Hi everyone, this should be fixed in Peek v.1.1.9.