trouble-in-terror-town/Assets/ParentCheck.cs
Mikolaj 2bbacbea09 did some more work on networking and removed EOS in favor of LRM
did some more work on networking and removed EOS in favor of Light Reflective Mirror
2022-05-31 15:04:31 +02:00

21 lines
459 B
C#

using Chronity;
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class ParentCheck : MonoBehaviour
{
void Awake()
{
Debug.Log("checking parrents");
if (transform.parent == null)
{
Debug.Log("No parent, deleting object");
GameObject.Destroy(gameObject);
}
else
{
Debug.Log("Parent is " + transform.parent.name);
}
}
}