using System.Collections;
using System.Collections.Generic;
using UnityEngine;

#if UNITY_EDITOR
using UnityEditor;
#endif

public class HayWiresSettings : MonoBehaviour {

    public static HayWiresSettings instance;

    public CableManagerSettings cableManagerInstance;
    public SocketControllerSettings socketSettingsInstance;

    private void Awake ()
    {
            instance = this;
    }

    public static CableManagerSettings cableManager
    {
        get
        {
            if (instance && instance.cableManagerInstance)
            {
                return instance.cableManagerInstance;
            }
            else
            {
#if UNITY_EDITOR
                return (CableManagerSettings)AssetDatabase.LoadAssetAtPath("Assets/_Settings/Cables/CableManager.asset", typeof(CableManagerSettings));
#else
				return null;
#endif
            }
        }
    }

    public static SocketControllerSettings socketSettings
    {
        get
        {
            if (instance && instance.socketSettingsInstance)
            {
                return instance.socketSettingsInstance;
            }
            else
            {
#if UNITY_EDITOR
                return (SocketControllerSettings)AssetDatabase.LoadAssetAtPath("Assets/_Settings/Sockets/SocketsSettings.asset", typeof(SocketControllerSettings));
				#else
				return null;
				#endif
            }
        }
    }
}
