Initial Commit
This commit is contained in:
commit
ee5c2f922d
2255 changed files with 547750 additions and 0 deletions
20
Assets/Scripts/Data/AnimatorStateData.cs
Normal file
20
Assets/Scripts/Data/AnimatorStateData.cs
Normal file
|
|
@ -0,0 +1,20 @@
|
|||
using Unity.Entities;
|
||||
using UnityEngine;
|
||||
|
||||
namespace DefaultNamespace
|
||||
{
|
||||
[GenerateAuthoringComponent]
|
||||
public struct AnimatorStateData : IComponentData
|
||||
{
|
||||
public AnimatorStateInfo State { get; set; }
|
||||
|
||||
public int TransitionName { get; set; }
|
||||
|
||||
public int TransitionPath { get; set; }
|
||||
|
||||
public bool IsTransitionName(string name)
|
||||
{
|
||||
return Animator.StringToHash(name) == TransitionName || Animator.StringToHash(name) == TransitionPath;
|
||||
}
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue