Add support for multiple VisibleIf attributes, and properly set up the VisibleIf entries for ImportMaterialsAsInstances and InstanceToImportAs.

This commit is contained in:
Menotdan
2024-01-01 01:24:36 -05:00
parent b275ffc146
commit 8bcc526dd6
3 changed files with 57 additions and 42 deletions

View File

@@ -5,11 +5,11 @@ using System;
namespace FlaxEngine
{
/// <summary>
/// Shows property/field in the editor only if the specified member has a given value. Can be used to hide properties based on other properties (also private properties). The given member has to be bool type.
/// Shows property/field in the editor only if the specified member has a given value. Can be used to hide properties based on other properties (also private properties). The given member has to be bool type. Multiple VisibleIf attributes can be added for additional conditions to be met.
/// </summary>
/// <seealso cref="System.Attribute" />
[Serializable]
[AttributeUsage(AttributeTargets.Field | AttributeTargets.Property)]
[AttributeUsage(AttributeTargets.Field | AttributeTargets.Property, AllowMultiple = true)]
public sealed class VisibleIfAttribute : Attribute
{
/// <summary>