EditorScript and NormalScripts

I want to change a trail color from a normal script

//normal script
UnityEditor.editor_Shop.GetTrailColors(trail);

and here is the editor script

//editor script
using UnityEngine;
using System.Collections;
using UnityEditor;

namespace UnityEditor
{
	public class editor_Shop : MonoBehaviour
	{
		public static void GetTrailColors (TrailRenderer t)
		{
			TrailRenderer trail = t;
			SerializedObject Trail = new SerializedObject(trail);
			
			for(int i = 0; i < 3; i++)
			{
				Trail.FindProperty("m_Colors.m_Color[" + i + "]").colorValue = new Color(PlayerPrefs.GetFloat("trail" + i + "R", 1), PlayerPrefs.GetFloat("trail" + i + "G", 1), PlayerPrefs.GetFloat("trail" + i + "B", 1), PlayerPrefs.GetFloat("trail" + i + "A", 1));;
				Trail.ApplyModifiedProperties();
			}
		}
	}
}

THE PROBLEM IS WHEN I BUILD, IT GIVES ME ERRORS
and i can’t access the editor script if i put it in “Assets/Editor” which will not give errors on build…

so what to do

You can’t use the Unity Editor Namespace in builds. When you add an editor script to an “Editor” folder it isn’t included in the build which is why you don’t get an error.