problem : tiles dont have an update loop, neither do they have a start / destroy method solution : finished working on a way to create a custom start/update/destroy pipeline for the projects custom tiles. it's using LevelManagerScript as to Update. note : also created a database and a start of serialization system so we can save and load stuff.
29 lines
562 B
C#
29 lines
562 B
C#
#if UNITY_EDITOR
|
|
using UnityEditor;
|
|
#endif
|
|
|
|
using UnityEngine;
|
|
|
|
namespace GatherAndDefend.LevelEditor
|
|
{
|
|
[RequireComponent(typeof(Grid))]
|
|
public class LevelEditor : MonoBehaviour
|
|
{
|
|
#if UNITY_EDITOR
|
|
[SerializeField]
|
|
private DefaultAsset _path;
|
|
#endif
|
|
[SerializeField]
|
|
private Level _level;
|
|
public Level Level
|
|
{
|
|
get => _level;
|
|
set => _level = value;
|
|
}
|
|
public DefaultAsset Path
|
|
{
|
|
get => _path;
|
|
set => _path = value;
|
|
}
|
|
}
|
|
} |