using the thing one more place

This commit is contained in:
Aleksander Waage 2020-08-23 10:07:43 +02:00
parent 3f4faa04b3
commit 809b1f946d
2 changed files with 7 additions and 3 deletions

View File

@ -1,4 +1,5 @@
using QSB.Tools;
using QSB.Utility;
using UnityEngine;
namespace QSB.TransformSync
@ -35,9 +36,7 @@ namespace QSB.TransformSync
{
var probe = GetProbe();
probe.gameObject.SetActive(false);
var body = Instantiate(probe);
probe.gameObject.SetActive(true);
var body = probe.InstantiateInactive();
Destroy(body.GetComponentInChildren<ProbeAnimatorController>());

View File

@ -25,5 +25,10 @@ namespace QSB.Utility
return copy;
}
public static Transform InstantiateInactive(this Transform original)
{
return original.gameObject.InstantiateInactive().transform;
}
}
}