Version 2.1.0.0

GlobalSerializationConfig class

Namespace: Sirenix.Serialization
Assembly: Sirenix.Serialization.Config
[HideMonoScript]
[SirenixGlobalConfig]
public class GlobalSerializationConfig : GlobalConfig<GlobalSerializationConfig>
Not yet documented.
Inheritance

Constructors

GlobalSerializationConfig()
public GlobalSerializationConfig()

Fields

HideNonSerializedShowInInspectorWarningMessages
Whether the user has chosen to hide the warning messages related to the SerializeField and ShowInInspector attributes on non-serialized members.
[ToggleLeft]
[LabelText("Hide Non-Serialized SerializeField/ShowInInspector Warning Messages")]
[InfoBox("Enabling this will hide all warning messages that show up when the SerializeField and the ShowInInspector attributes are used together on non-serialized fields or properties.", InfoMessageType.Info, null)]
public bool HideNonSerializedShowInInspectorWarningMessages
HideOdinSerializeAttributeWarningMessages
Whether the user has chosen to hide the warning messages related to the OdinSerialize attribute.
[ToggleLeft]
[InfoBox("Enabling this will hide all warning messages that will show up in the inspector when the OdinSerialize attribute potentially does not achieve the desired effect.", InfoMessageType.Info, null)]
public bool HideOdinSerializeAttributeWarningMessages
HidePrefabCautionaryMessage
[ToggleLeft]
[DetailedInfoBox("Click to show warning message.", "In 2018.3, Unity introduced a new prefab workflow, and in so doing, changed how all prefabs fundamentally work. Despite our best efforts, we have so far been unable to achieve a stable implementation of Odin-serialized prefab modifications on prefab instances and variants in the new prefab workflow.This has nothing to do with Odin serializer itself, which remains rock solid. Odin-serialized ScriptableObjects and non-prefab Components/Behaviours are still perfectly stable - you are only seeing this message because this is an Odin-serialized prefab asset or instance.\n\nWe are currently in the process of doing an in-depth review of possible ways of implementing Odin-serialized modifications properly with the new prefab workflow. Meanwhile, using prefabs with Odin serialization in 2018.3 and above will be considered a *deprecated feature*.\n\nWe would like to emphasize that *our efforts may fail*. There is a real chance that we will conclude that we simply cannot support this feature any more in the new prefab workflow, in which case it will be deprecated *permanently*. We hope it won't come to that, but we sadly cannot promise that it won't happen. If we do deprecate the feature, we will not remove it, but we *will* stop supporting it. You may continue using it, but only at your own risk.\n\nPlease keep all this in mind, if you wish to continue using Odin-serialized prefabs.", InfoMessageType.Info, null)]
public bool HidePrefabCautionaryMessage
HideSerializationCautionaryMessage
Whether the user has chosen to hide the cautionary serialization warning.
[Title("Warning messages", null, TitleAlignments.Left, true, true)]
[ToggleLeft]
[DetailedInfoBox("Click to show warning message.", "Odin's custom serialization protocol is stable and fast, and doesn't use any reflection on standalone platforms in order to serialize and deserialize your data. It is built to be fast, reliable and resilient above all.\n\n*Words of caution* \nHowever, caveats apply - there is a reason Unity chose such a drastically limited serialization protocol. It keeps things simple and manageable, and limits how much complexity you can introduce into your data structures. It can be very easy to get carried away and shoot yourself in the foot when all limitations suddenly disappear, and hence we have included this cautionary warning.\n\nThere can of course be valid reasons to use a more powerful serialization protocol such as Odin's. However, please read the 'Words of caution' section under 'Serialize Anything' in the Manual, so you know what you're getting into.\n\n*For those on AOT platforms* \nAdditionally, if you are building to AOT platforms, you should be aware that Odin's serialization currently makes use of reflection behind the scenes on all AOT platforms, which may result in lag spikes in your game if you make heavy use of it.", InfoMessageType.Info, null)]
public bool HideSerializationCautionaryMessage
ODIN_PREFAB_CAUTIONARY_WARNING_BUTTON_TEXT
Text for the hide button for the cautionary prefab warning shown in the inspector.
public const string ODIN_PREFAB_CAUTIONARY_WARNING_BUTTON_TEXT = "I understand that prefabs might break. Hide message forever."
ODIN_PREFAB_CAUTIONARY_WARNING_TEXT
public const string ODIN_PREFAB_CAUTIONARY_WARNING_TEXT = "In 2018.3, Unity introduced a new prefab workflow, and in so doing, changed how all prefabs fundamentally work. Despite our best efforts, we have so far been unable to achieve a stable implementation of Odin-serialized prefab modifications on prefab instances and variants in the new prefab workflow.This has nothing to do with Odin serializer itself, which remains rock solid. Odin-serialized ScriptableObjects and non-prefab Components/Behaviours are still perfectly stable - you are only seeing this message because this is an Odin-serialized prefab asset or instance.\n\nWe are currently in the process of doing an in-depth review of possible ways of implementing Odin-serialized modifications properly with the new prefab workflow. Meanwhile, using prefabs with Odin serialization in 2018.3 and above will be considered a *deprecated feature*.\n\nWe would like to emphasize that *our efforts may fail*. There is a real chance that we will conclude that we simply cannot support this feature any more in the new prefab workflow, in which case it will be deprecated *permanently*. We hope it won't come to that, but we sadly cannot promise that it won't happen. If we do deprecate the feature, we will not remove it, but we *will* stop supporting it. You may continue using it, but only at your own risk.\n\nPlease keep all this in mind, if you wish to continue using Odin-serialized prefabs."
ODIN_SERIALIZATION_CAUTIONARY_WARNING_BUTTON_TEXT
Text for the hide button for the cautionary serialization warning shown in the inspector.
public const string ODIN_SERIALIZATION_CAUTIONARY_WARNING_BUTTON_TEXT = "I know what I'm about, son. Hide message forever."
ODIN_SERIALIZATION_CAUTIONARY_WARNING_TEXT
Text for the cautionary serialization warning shown in the inspector.
public const string ODIN_SERIALIZATION_CAUTIONARY_WARNING_TEXT = "Odin's custom serialization protocol is stable and fast, and doesn't use any reflection on standalone platforms in order to serialize and deserialize your data. It is built to be fast, reliable and resilient above all.\n\n*Words of caution* \nHowever, caveats apply - there is a reason Unity chose such a drastically limited serialization protocol. It keeps things simple and manageable, and limits how much complexity you can introduce into your data structures. It can be very easy to get carried away and shoot yourself in the foot when all limitations suddenly disappear, and hence we have included this cautionary warning.\n\nThere can of course be valid reasons to use a more powerful serialization protocol such as Odin's. However, please read the 'Words of caution' section under 'Serialize Anything' in the Manual, so you know what you're getting into.\n\n*For those on AOT platforms* \nAdditionally, if you are building to AOT platforms, you should be aware that Odin's serialization currently makes use of reflection behind the scenes on all AOT platforms, which may result in lag spikes in your game if you make heavy use of it."

Properties

BuildSerializationFormat
Not yet documented.
public DataFormat BuildSerializationFormat { get; set; }
EditorSerializationFormat
Not yet documented.
public DataFormat EditorSerializationFormat { get; set; }
ErrorHandlingPolicy
Not yet documented.
public ErrorHandlingPolicy ErrorHandlingPolicy { get; set; }
Logger
Not yet documented.
public ILogger Logger { get; }
LoggingPolicy
Not yet documented.
public LoggingPolicy LoggingPolicy { get; set; }

This website is brand new and built with the Odin 2.1 beta in mind. This means you might discover some features such as attribute expressions that are only available in the beta.

You can download the 2.1 beta from here and read the patch-notes here.