mirror of
https://github.com/bdunderscore/modular-avatar.git
synced 2025-01-04 13:45:04 +08:00
fix: warning when object name contains "." (#1123)
* fix: warning when object name contains "." * chore: change RC state and layer names to not reference Shape Changer specifically --------- Co-authored-by: bd_ <bd_@nadena.dev>
This commit is contained in:
parent
566a030730
commit
2735adf55c
@ -96,7 +96,7 @@ namespace nadena.dev.modular_avatar.core.editor
|
|||||||
if (initialStateHolder == null) return;
|
if (initialStateHolder == null) return;
|
||||||
|
|
||||||
_initialStateClip = new AnimationClip();
|
_initialStateClip = new AnimationClip();
|
||||||
_initialStateClip.name = "MA Shape Changer Defaults";
|
_initialStateClip.name = "Reactive Component Defaults";
|
||||||
initialStateHolder.CurrentClip = _initialStateClip;
|
initialStateHolder.CurrentClip = _initialStateClip;
|
||||||
|
|
||||||
foreach (var (key, initialState) in initialStates)
|
foreach (var (key, initialState) in initialStates)
|
||||||
@ -264,7 +264,9 @@ namespace nadena.dev.modular_avatar.core.editor
|
|||||||
{
|
{
|
||||||
var asc = context.Extension<AnimationServicesContext>();
|
var asc = context.Extension<AnimationServicesContext>();
|
||||||
var asm = new AnimatorStateMachine();
|
var asm = new AnimatorStateMachine();
|
||||||
asm.name = "MA Shape Changer " + info.TargetProp.TargetObject.name;
|
|
||||||
|
// Workaround for the warning: "'.' is not allowed in State name"
|
||||||
|
asm.name = "RC " + info.TargetProp.TargetObject.name.Replace(".", "_");
|
||||||
|
|
||||||
var x = 200;
|
var x = 200;
|
||||||
var y = 0;
|
var y = 0;
|
||||||
@ -344,7 +346,10 @@ namespace nadena.dev.modular_avatar.core.editor
|
|||||||
}
|
}
|
||||||
|
|
||||||
var state = new AnimatorState();
|
var state = new AnimatorState();
|
||||||
state.name = group.ControllingConditions[0].DebugName;
|
|
||||||
|
// Workaround for the warning: "'.' is not allowed in State name"
|
||||||
|
state.name = group.ControllingConditions[0].DebugName.Replace(".", "_");
|
||||||
|
|
||||||
state.motion = clip;
|
state.motion = clip;
|
||||||
state.writeDefaultValues = false;
|
state.writeDefaultValues = false;
|
||||||
states.Add(new ChildAnimatorState
|
states.Add(new ChildAnimatorState
|
||||||
@ -559,7 +564,7 @@ namespace nadena.dev.modular_avatar.core.editor
|
|||||||
new AnimatorControllerLayer
|
new AnimatorControllerLayer
|
||||||
{
|
{
|
||||||
stateMachine = asm,
|
stateMachine = asm,
|
||||||
name = "MA Shape Changer " + layerName,
|
name = "RC " + layerName,
|
||||||
defaultWeight = 1
|
defaultWeight = 1
|
||||||
}
|
}
|
||||||
).ToArray();
|
).ToArray();
|
||||||
|
Loading…
Reference in New Issue
Block a user