17 lines
381 B
C#
17 lines
381 B
C#
|
using BlueWater.Tycoons;
|
||
|
using UnityEngine;
|
||
|
|
||
|
namespace BlueWater
|
||
|
{
|
||
|
public class SetParent : MonoBehaviour
|
||
|
{
|
||
|
[SerializeField]
|
||
|
private BuildableObjectType _buildableObject;
|
||
|
|
||
|
public void OnParentSet()
|
||
|
{
|
||
|
var parent = TycoonManager.Instance.GetParent(_buildableObject);
|
||
|
transform.parent = parent;
|
||
|
}
|
||
|
}
|
||
|
}
|