Files
AppleHillsProduction/Assets/Scripts/DamianExperiments/Dump/Teleporter.cs
2025-12-08 08:48:35 +01:00

23 lines
607 B
C#

using UnityEngine;
public class Teleporter : MonoBehaviour
{
public GameObject ObjectToTeleportA;
public GameObject ObjectToTeleportB;
public Transform TeleportLocationA;
public Transform TeleportLocationB;
public void TeleporObjects()
{
if (ObjectToTeleportA != null && TeleportLocationA != null)
{
ObjectToTeleportA.transform.position = TeleportLocationA.position;
}
if (ObjectToTeleportB != null && TeleportLocationB != null)
{
ObjectToTeleportB.transform.position = TeleportLocationB.position;
}
}
}