Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

BaseFormatter's "T inherits from UnityEngine.Object" warning doesn't halt serialization properly #63

Open
tconkling opened this issue Mar 11, 2024 · 0 comments

Comments

@tconkling
Copy link

I'm serializing data, and I have set DebugContext.ErrorHandlingPolicy = ErrorHandlingPolicy.ThrowOnWarningsAndErrors.

If my game tries to serialize a UnityEngine.Object subclass, I expect that this warning will result in a serialization error and serialization will halt, but that's not the case.

Is there a way to safely halt serialization of Unity objects?

(I've also tried throwing an Exception from a custom IExternalStringReferenceResolver, when encountering a Unity object that's not in the AssetDatabase, but this seems to result in corruption of data - I get "Sirenix.Serialization.SerializationAbortException : The following error was logged during serialization or deserialization: Reached end of array after 0 elements, when 1 elements were expected." errors when deserializing other unrelated data)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant