Hello everyone !
I was making a camera script (2018.2.0f2). When i made a unity update (2018.3.1f1), the script has now errors like : the type or namespace ‘PropretyDrawer’ and ‘SerializedProprety’ could not be found.
Here’s my script :
using UnityEngine;
using UnityEditor;
using System.Collections.Generic;
[CustomPropertyDrawer(typeof(TagSelectorAttribute))]
public class TagSelectorPropertyDrawer : PropertyDrawer
{
public override void OnGUI(Rect position, SerializedProperty property, GUIContent label)
{
if (property.propertyType == SerializedPropertyType.String)
{
EditorGUI.BeginProperty(position, label, property);
var attrib = this.attribute as TagSelectorAttribute;
if (attrib.UseDefaultTagFieldDrawer)
{
property.stringValue = EditorGUI.TagField(position, label, property.stringValue);
}
else
{
//generate the taglist + custom tags
List<string> tagList = new List<string>();
tagList.Add("<NoTag>");
tagList.AddRange(UnityEditorInternal.InternalEditorUtility.tags);
string propertyString = property.stringValue;
int index = -1;
if(propertyString =="")
{
//The tag is empty
index = 0; //first index is the special <notag> entry
}
else
{
//check if there is an entry that matches the entry and get the index
//we skip index 0 as that is a special custom case
for (int i = 1; i < tagList.Count; i++)
{
if (tagList *== propertyString)*
{
index = i;
break;
}
}
}
//Draw the popup box with the current selected index
index = EditorGUI.Popup(position, label.text, index, tagList.ToArray());
//Adjust the actual string value of the property based on the selection
if(index==0)
{
property.stringValue = “”;
}
else if (index >= 1)
{
property.stringValue = tagList[index];
}
else
{
property.stringValue = “”;
}
}
EditorGUI.EndProperty();
}
else
{
EditorGUI.PropertyField(position, property, label);
}
}
}
Can someone help me ?
Thanks 
Bunny83
2
This is not a camera script but an editor script. It has to be placed in an editor folder. You probably have it outside an editor folder.