根据反馈修改
This commit is contained in:
parent
90b1694ab8
commit
17ae9098bf
@ -23,8 +23,7 @@ public class Body3DObjItem : MonoBehaviour
|
||||
|
||||
private void Awake()
|
||||
{
|
||||
shader = GetComponent<Renderer>()?.material.shader;
|
||||
TypeEventSystem.Global.Register<OnChangeMat>(OnChangeMatEvent).UnRegisterWhenGameObjectDestroyed(this);
|
||||
|
||||
#if VR
|
||||
#if Turing
|
||||
|
||||
@ -77,7 +76,6 @@ public class Body3DObjItem : MonoBehaviour
|
||||
#endif
|
||||
private void OnChangeMatEvent(OnChangeMat t)
|
||||
{
|
||||
|
||||
if (t.shader != null)
|
||||
{
|
||||
GetComponent<Renderer>().material.shader = t.shader;
|
||||
@ -97,7 +95,8 @@ public class Body3DObjItem : MonoBehaviour
|
||||
public void Init(Body3D.Body body)
|
||||
{
|
||||
this.body = body;
|
||||
|
||||
shader = GetComponent<Renderer>()?.material.shader;
|
||||
TypeEventSystem.Global.Register<OnChangeMat>(OnChangeMatEvent).UnRegisterWhenGameObjectDestroyed(this);
|
||||
if (body.subBody == null || body.subBody.Count == 0)
|
||||
{
|
||||
if (body.toggle != null)
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user