|
When i click the field to select the object it only shows the assets folder objects . Is there any way to show the scenes tab ?
(comments are locked)
|
|
EditorGUILayout.ObjectField takes a parameter to specify which type of object to select. In Unity 2.6.1 you can use ...
In Unity 3.1, the selector is much nicer -- a tabbed dialog with preview instead of a huge long menu -- BUT it always restricts the view to assets. The fact that it's tabbed makes it look like it should should support other groups of objects, but it's not there yet. Not sure if this is a bug or a missing feature. I added a feature request here, vote for it if you want it fixed. this line EditorGUILayout.ObjectField("Action container", toWaitActionHolder, typeof(GameObject)) as GameObject; should then show the scene selection tab, but it doesnt :/
Jan 07 '11 at 05:59 PM
Jeffom
correct me if i'm wrong but the typeof( Type ) field is only to filter the object with the type you want on the selection ,it doesn't really enables or disables the selection from scene or assets.
Jan 07 '11 at 06:05 PM
Jeffom
By setting the type parameter, you control what (types of) objects can be selected. If you use a type that is a native of the scene view (like GameObject or Component) then you will be able to select from objects of that type that are currently in the scene. If you simply use typeof(Object) then you only see objects (assets) from the Project list -- which seems like a bug, but that's how it works. Try it and see.
Jan 07 '11 at 08:57 PM
yoyo
Disclaimer: I was using Unity 2.6 for my tests. I'll try 3.1 later today.
Jan 07 '11 at 08:59 PM
yoyo
Hmm, looks like 3.1 has a better interface, but less functionality. I edited my answer with details and the link to a new feature/fix request.
Jan 07 '11 at 11:58 PM
yoyo
(comments are locked)
|
