- Home /
How do I make a field that accepts a scene object that is linked to a prefab? EditorGUILayout.ObjectField does not allow this.
I would like to make a custom inspector field that accepts a camera from the scene even if the camera is linked to a prefab. EditorGUILayout.ObjectField has a parameter - bool allowSceneObjects - if this is set to false I can not add scene object, if it set true I can add scene objects but not if the object is linked to a prefab. The default inspector a monobehaviour will accept scene objects that are prefabs. I would like to duplicate this behaviour.
Your answer
Follow this Question
Related Questions
EditorGUILayout.ObjectField cannot be changed. 1 Answer
How do I get the default scene GUI for a CustomEditor for RectTransform? 1 Answer
Applying WordWrap to an existing Editor Text Field 0 Answers
Recreate default editor look manually without base.OnInspectorGUI [UnityEditor] 2 Answers
Positioning a button at the bottom of an editor window 1 Answer