Quantcast
Channel: Latest Questions by karl_
Viewing all articles
Browse latest Browse all 90

Open ObjectSelector window from Editor Script

$
0
0
I'm trying to replicate the Material ObjectField seen in the Inspector, except that I also want to view the material modifications to the texture. I've got everything working except for the Select button, which needs to open an Object Picker window. I cannot figure out how to open this window without using the default ObjectField class, which I can't use because it doesn't offer an equivalent to EditorGUI.DrawPreviewTexture(). What I've tried (unsuccessfully) thus far: - Resizing the ObjectField to fit in that small "Select" rectangle - Manually opening the ObejectPicker window: EditorWindow.GetWindow(typeof(ObjectSelector), true, "Object Picker", true); I guess ObjectSelector is hiding somewhere, because I can't seem to figure out what it inherits from.

Viewing all articles
Browse latest Browse all 90

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>