mirror of
https://github.com/FriendshipIsEpic/FiE-Game.git
synced 2024-11-23 14:17:59 +01:00
25 lines
469 B
C#
25 lines
469 B
C#
using UnityEngine;
|
|
using System.Collections;
|
|
using ParticlePlayground;
|
|
|
|
[ExecuteInEditMode()]
|
|
public class PlaygroundTrailParent : MonoBehaviour {
|
|
|
|
public PlaygroundTrails trailsReference;
|
|
|
|
private GameObject _gameObject;
|
|
|
|
void Awake () {
|
|
_gameObject = gameObject;
|
|
}
|
|
|
|
void Update () {
|
|
if (_gameObject != trailsReference.GetParentGameObject())
|
|
{
|
|
if (Application.isPlaying)
|
|
Destroy (_gameObject);
|
|
else
|
|
DestroyImmediate(_gameObject);
|
|
}
|
|
}
|
|
}
|