Skip to content

Commit 830af7c

Browse files
Changed Updatable to EditableAnywhere. Updated README with documentation for EditableAnywhere
1 parent 351c12a commit 830af7c

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,7 @@ private ParticleSystem[] _particles;
130130
- `ExcludeSelf` only affects `Parent` and `Child`, and determines whether components on this `GameObject` are included in the results. By default, components on this `GameObject` are included.
131131
- `Editable` only affects `Parent`, `Child` and `Scene`, and allows you to edit the resulting reference. This is useful, for example, if you have two children who would satisfy a reference but you want to manually select which reference is used.
132132
- `Filter` allows you to implement custom logic to filter references. See **Filters** below.
133-
133+
- `EditableAnywhere` has the same effect as `Editable` but will not validate the supplied reference. This allows you to manually specify a reference with an automatic fallback.
134134
### Filters
135135

136136
This project also provides support for filtering references based on custom logic.

SceneRefAttribute.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ public enum Flag
6565
/// <summary>
6666
/// Allows the user to manually set the reference and does not validate the location if manually set
6767
/// </summary>
68-
Overridable = 1 << 4 | Editable
68+
EditableAnywhere = 1 << 4 | Editable
6969
}
7070

7171
/// <summary>

SceneRefAttributeValidator.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -425,7 +425,7 @@ private static bool ValidateRef(SceneRefAttribute attr, Component c, FieldInfo f
425425
{
426426
Type fieldType = field.FieldType;
427427
bool isCollection = IsCollectionType(fieldType, out bool _, out bool _);
428-
bool isOverridable = attr.HasFlags(Flag.Overridable);
428+
bool isOverridable = attr.HasFlags(Flag.EditableAnywhere);
429429

430430
if (value is ISerializableRef ser)
431431
{

0 commit comments

Comments
 (0)