CapersProject/Assets/02.Scripts/BuildableEvent.cs

30 lines
819 B
C#

// using System;
// using SoulGames.EasyGridBuilderPro;
// using UnityEngine;
//
// namespace BlueWater
// {
// public class BuildableEvent : MonoBehaviour
// {
// private async void Start()
// {
// while (!EasyGridBuilderPro.Instance)
// {
// await Awaitable.NextFrameAsync();
// }
//
// EasyGridBuilderPro.Instance.OnObjectPlaced += OnParentSet;
// }
//
// private void OnDestroy()
// {
// EasyGridBuilderPro.Instance.OnObjectPlaced -= OnParentSet;
// }
//
// public void OnParentSet(object o, EventArgs eventArgs)
// {
// var obj = (BuildableGridObject)o;
// obj.GetComponent<SetParent>()?.OnParentSet();
// }
// }
// }