Search Unity

Getting warning about obsolete function

Discussion in 'Scripting' started by BeauDaniel, Mar 25, 2013.

  1. BeauDaniel

    BeauDaniel

    Joined:
    Mar 25, 2013
    Posts:
    4
    I'm getting the following Warning that I can't find out what it is trying to tell me.

    WARNING: 'UnityEditor.EditorGUILayout.ObjectField(UnityEngine.Object, System.Type, *UnityEngine.GUILayoutOption[])' is obsolete. Check the docs for the usage of the new parameter 'allowSceneObjects'.

    function OnInspectorGUI ()
    {
    theCamera.cameraTarget = EditorGUILayout.ObjectField(theCamera.cameraTarget, Object);
    theCamera.offsetFromTarget = EditorGUILayout.Vector3Field ("Offset From Target", theCamera.offsetFromTarget);
    theCamera.offsetForLook = EditorGUILayout.Vector3Field ("Offset For Look", theCamera.offsetForLook);
    theCamera.damping = EditorGUILayout.FloatField("Damping", theCamera.damping);
    theCamera.hardAttach = EditorGUILayout.Toggle ("Hard Attach", theCamera.hardAttach);

    theCamera.HardUpdate();
    //EditorUtility.SetDirty(theCamera);
    }

    Can anyone tell me what to do or where to find it?
     
  2. Jaimi

    Jaimi

    Joined:
    Jan 10, 2009
    Posts:
    6,208