Hi,
I’ve got this script that was actually working before but not now:
[CustomEditor (typeof(GridObject))]
public class GridObjectEditor : Editor {
GridObject gridObj;
public void OnEnable()
{
//Settings
gridObj = (GridObject)target;
SceneView.onSceneGUIDelegate += this.GridObjectUpdate;
gridObj.gameObject.layer = LayerMask.NameToLayer("GridObjectLayer");
SetCollider();
//gridObj.transform.localScale = new Vector3(GridMap.gridWidth, GridMap.gridHeight, GridMap.gridHeight);
}
...
}
FYI, the ‘GridObject’ class is in the “Scripts” folder while the ‘GridObjectEditor’ class is in the “Editor” folder. I tried rebuilding it and en error saying: “The type or namespace name ‘GridObject’ could not be found (are you missing a using directive or an assembly reference?) (CS0246) (Assembly-CSharp-Editor)”. But the weird part is, it actually worked in the past. I only added some code that doesn’t have anything to do with this editor class at all. And when I rebuilt it all, this happens. Why is this happening? Can anybody help me here? Thanks in advance.