mirror of
https://github.com/MirrorNetworking/Mirror.git
synced 2024-11-18 11:00:32 +00:00
adding IsParameterControlledByCurve check (#1547)
This commit is contained in:
parent
2d1b142276
commit
cf8b979cce
@ -1,5 +1,6 @@
|
||||
using UnityEngine;
|
||||
using UnityEngine.Serialization;
|
||||
using System.Linq;
|
||||
|
||||
namespace Mirror
|
||||
{
|
||||
@ -66,7 +67,9 @@ void Awake()
|
||||
{
|
||||
// store the animator parameters in a variable - the "Animator.parameters" getter allocates
|
||||
// a new parameter array every time it is accessed so we should avoid doing it in a loop
|
||||
parameters = animator.parameters;
|
||||
parameters = animator.parameters
|
||||
.Where(par => !animator.IsParameterControlledByCurve(par.nameHash))
|
||||
.ToArray();
|
||||
lastIntParameters = new int[parameters.Length];
|
||||
lastFloatParameters = new float[parameters.Length];
|
||||
lastBoolParameters = new bool[parameters.Length];
|
||||
|
Loading…
Reference in New Issue
Block a user