quantum-space-buddies/QSB/Tools/ProbeTool/ProbeCreator.cs
2022-02-13 15:30:35 +00:00

21 lines
452 B
C#

using QSB.Player;
using QSB.PlayerBodySetup.Remote;
using UnityEngine;
namespace QSB.Tools.ProbeTool
{
internal static class ProbeCreator
{
public static void CreateProbe(Transform newProbe, PlayerInfo player)
{
var qsbProbe = newProbe.gameObject.GetComponent<QSBProbe>();
player.Probe = qsbProbe;
qsbProbe.SetOwner(player);
FixMaterialsInAllChildren.ReplaceMaterials(newProbe);
newProbe.gameObject.SetActive(true);
}
}
}