Announcing AvatarScriptLink.NET 1.1.6
· 2 min read
AvatarScriptLink.NET version 1.1.6 is now available on NuGet. This release refines the behavior of setting a FieldObject as required or optional.
With the release:
SetRequiredField()
will no longer set the FieldObject as Enabled as well. UseSetEnabledField()
as well if this is the desired result.SetDisabledField()
will no longer set the FieldObject as Optional as well. UseSetOptionalField()
well if this is the desired result.
Migrating from 1.0.x to 1.1.x
Due to the change of behavior there could be unintended changes to the behavior of implemented ScriptLink APIs. If your implementation relies on the assumptions that "all required fields are enabled" or "all disabled fields are optional" then you may need to apply the following updates to your project.
For SetRequiredField()
, add another line to SetEnabledField()
to ensure the FieldObject is enabled as expected.
// In version 1.0 SetRequiredField would also enable the FieldObject
optionObject.SetRequiredField(fieldNumber);
// In version 1.1 and later this must must explicitly requested.
optionObject.SetEnabledField(fieldNumber);
For SetDisabledField()
, add another line to SetOptionalField()
to ensure the FieldObject is set to optional as expected.
// In version 1.0 SetDisabledField would also set the FieldObject as optional (not required)
optionObject.SetDisabledField(fieldNumber);
// In version 1.1 and later this must must explicitly requested.
optionObject.SetOptionalField(fieldNumber);