mirror of
https://github.com/vrm-c/UniVRM.git
synced 2026-07-24 11:40:45 -05:00
Merge branch 'fix/ForceUniqueName_timing' of ssh://github.com/ousttrue/UniVRM into fix/ForceUniqueName_timing
This commit is contained in:
commit
3f72ebe41c
|
|
@ -65,6 +65,15 @@ namespace UniHumanoid
|
|||
}
|
||||
|
||||
HumanPoseHandler m_handler;
|
||||
public void Dispose()
|
||||
{
|
||||
if (m_handler != null)
|
||||
{
|
||||
m_handler.Dispose();
|
||||
m_handler = null;
|
||||
}
|
||||
}
|
||||
|
||||
public void OnEnable()
|
||||
{
|
||||
if (TryGetComponent<Animator>(out var animator))
|
||||
|
|
@ -75,12 +84,18 @@ namespace UniHumanoid
|
|||
Setup();
|
||||
}
|
||||
|
||||
void OnDisable()
|
||||
{
|
||||
Dispose();
|
||||
}
|
||||
|
||||
public void Setup()
|
||||
{
|
||||
if (Avatar == null)
|
||||
{
|
||||
return;
|
||||
}
|
||||
Dispose();
|
||||
m_handler = new HumanPoseHandler(Avatar, transform);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user