using System;
using System.Collections;
using UnityEngine;

public class ModelBuilder : MonoBehaviour
{
    public static ModelBuilder _mainInstance;

    public static ModelBuilder GetInstance()
    {
        return _mainInstance;
    }

    public static T GetInstance<T>() where T : ModelBuilder
    {
        return _mainInstance as T;
    }

    protected virtual void Awake()
    {
        _mainInstance = this;
    }

    public virtual IEnumerator SpawnSerialized(ObjectContainerSerializable oc, Action<GameObject> callback = null)
    {
        throw new NotImplementedException();
    }

    public IEnumerator SpawnAsset(string assetPath, Action<ObjectContainer> callback = null)
    {
        yield return SpawnAsset(AssetTypes.Unknown, assetPath, callback);
    }

    public virtual IEnumerator SpawnAsset(Enum assetType, string assetPath, Action<ObjectContainer> callback = null)
    {
        throw new NotImplementedException();
    }

    public virtual IEnumerator SpawnAsset(AssetSpawnData data, Action<ObjectContainer> callback = null)
    {
        throw new NotImplementedException();
    }
}