mirror of
https://github.com/bdunderscore/modular-avatar.git
synced 2024-12-29 02:35:06 +08:00
fix(rc): constant-off objects are not handled correctly (#1249)
Closes: #1233
This commit is contained in:
parent
02204c272f
commit
409592f952
@ -35,7 +35,9 @@ namespace nadena.dev.modular_avatar.core.editor
|
||||
|
||||
public bool Inverted;
|
||||
|
||||
public bool IsConstant => ControllingConditions.Count == 0 || ControllingConditions.All(c => c.IsConstant);
|
||||
public bool IsConstant => ControllingConditions.Count == 0
|
||||
|| ControllingConditions.All(c => c.IsConstant)
|
||||
|| ControllingConditions.Any(c => c.IsConstant && !c.InitiallyActive);
|
||||
public bool IsConstantOn => IsConstant && InitiallyActive;
|
||||
|
||||
public override string ToString()
|
||||
|
@ -144,7 +144,7 @@ namespace nadena.dev.modular_avatar.core.editor
|
||||
HashSet<GameObject> toggledObjects = new();
|
||||
|
||||
if (asc == null) return;
|
||||
|
||||
|
||||
foreach (var targetProp in shapes.Keys)
|
||||
if (targetProp is { TargetObject: GameObject go, PropertyName: "m_IsActive" })
|
||||
toggledObjects.Add(go);
|
||||
|
@ -183,7 +183,7 @@ GameObject:
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 0
|
||||
m_IsActive: 1
|
||||
--- !u!4 &569625391371299408
|
||||
Transform:
|
||||
m_ObjectHideFlags: 0
|
||||
@ -250,6 +250,7 @@ MonoBehaviour:
|
||||
isSynced: 1
|
||||
isSaved: 1
|
||||
isDefault: 0
|
||||
automaticValue: 0
|
||||
--- !u!114 &664065153831629983
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
|
Loading…
Reference in New Issue
Block a user