The targets array should not be used inside OnSceneGUI or OnPreviewGUI. Use the single target property instead.
UnityEditor.GameObjectInspector:OnEnable()
The serializedObject should not be used inside OnSceneGUI or OnPreviewGUI. Use the target property directly instead.
UnityEditor.TransformInspector:OnEnable()
When i stop the project i get about 20 of those errors.
I have never seen errors that happen after I stop the project so i have no idea what’s happening.
The cause is the functions below
function cleanhead(){
var objects = GameObject.FindGameObjectsWithTag("head");
for (var i : int=0; i<objects.length; i++){
Destroy(objects[i]);
}
}
function CharacterCreation(){
if(changepart == true){
if(headid == 0){
cleanhead();
var head0 : GameObject = Resources.Load("head0") as GameObject;
Instantiate (head0, headhotspot.transform.position, headhotspot.transform.rotation);
changepart = false;
}
if(headid == 1){
cleanhead();
var head1 : GameObject = Resources.Load("head1") as GameObject;
Instantiate (head1, headhotspot.transform.position, headhotspot.transform.rotation);
changepart = false;
}
}
}