using System.Collections;
using System.Collections.Generic;
using UnityEngine;
#if UNITY_EDITOR
using UnityEditor;
#endif

public class HideLayers : MonoBehaviour {

	
	[SerializeField] bool hideLayers = true;

	void OnValidate () {
		if (hideLayers) {
			LockAndHide ();
			hideLayers = false;
		}
	}
		
	void LockAndHide () {
		#if UNITY_EDITOR
		Tools.lockedLayers = ((1 << LayerMask.NameToLayer ("UI")) | 
			(1 << LayerMask.NameToLayer("Wall")));
		Tools.visibleLayers = ((1 << LayerMask.NameToLayer ("Default")) |
			(1 << LayerMask.NameToLayer ("Ground")) |
			(1 << LayerMask.NameToLayer ("TransparentFX")) |
			(1 << LayerMask.NameToLayer ("Ignore Raycast")) |
			(1 << LayerMask.NameToLayer ("Water")) |
			(1 << LayerMask.NameToLayer ("PostProcessing")) |
			(1 << LayerMask.NameToLayer ("Track")) |
			(1 << LayerMask.NameToLayer ("Trigger Area")));
		#endif
	}
}
