mirror of
https://github.com/vrm-c/UniVRM.git
synced 2026-08-23 19:15:07 -05:00
Merge branch 'master' into fix/ForceUniqueName_timing
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user