Unity3D/Problems

EditorGUILayout.ObjectField obsolete?

일등하이 2016. 6. 9. 17:29
반응형




7
Best Answer

Answer by frarees 

Use the recommended overloads instead. In your case:

  1. target.myClass = EditorGUILayout.ObjectField("Label:", target.myClass, typeof(MyClass), true);

That true above tells the editor property to allow also scene objects. Set to false if you only want assets to be allowed.

Add comment · Share

반응형