mirror of
https://github.com/bdunderscore/modular-avatar.git
synced 2024-12-29 18:55:06 +08:00
fix: missing observations in LocateReactions (#1210)
This commit is contained in:
parent
de1744b080
commit
13b0ffe0b5
@ -82,7 +82,7 @@ namespace nadena.dev.modular_avatar.core.editor
|
|||||||
Parameter = GetActiveSelfProxy(cursor.gameObject),
|
Parameter = GetActiveSelfProxy(cursor.gameObject),
|
||||||
DebugName = cursor.gameObject.name,
|
DebugName = cursor.gameObject.name,
|
||||||
IsConstant = false,
|
IsConstant = false,
|
||||||
InitialValue = cursor.gameObject.activeSelf ? 1.0f : 0.0f,
|
InitialValue = _computeContext.Observe(cursor.gameObject, go => go.activeSelf) ? 1.0f : 0.0f,
|
||||||
ParameterValueLo = 0.5f,
|
ParameterValueLo = 0.5f,
|
||||||
ParameterValueHi = float.PositiveInfinity,
|
ParameterValueHi = float.PositiveInfinity,
|
||||||
ReferenceObject = cursor.gameObject,
|
ReferenceObject = cursor.gameObject,
|
||||||
@ -228,7 +228,8 @@ namespace nadena.dev.modular_avatar.core.editor
|
|||||||
|
|
||||||
if (!objectGroups.TryGetValue(key, out var group))
|
if (!objectGroups.TryGetValue(key, out var group))
|
||||||
{
|
{
|
||||||
group = new AnimatedProperty(key, target.activeSelf ? 1 : 0);
|
var active = _computeContext.Observe(target, t => t.activeSelf);
|
||||||
|
group = new AnimatedProperty(key, active ? 1 : 0);
|
||||||
objectGroups[key] = group;
|
objectGroups[key] = group;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user