you know how a preview of a prefab shows up in a browser or in the inspector, i’d like to know how they do that
trying to avoid making a GUI icon for each and every object in my game, and thought if they can do the previews, I should be able to use that for my problem… if i knew how they did it that is…
Unfortunately, AssetPreview.GetAssetPreview(); is probably what they’re using to make the previews, so you sort of already know the answer to your own question.
well yes actually i ment how do they do AssetPreview…
do i imagine a scene with a cam in somewhere behind the editor interface where every prefab poses in front of the cam to get their picture taken and then the return is that result??
Your idea of how that is done is pretty close, which is why you’d be able to do it with RenderTexture. Although, if you don’t have Unity Pro, I would just write a script for and do it that way.
You can do it without pro as well, but it will be slower without renderTexture.
Just position the camera close to the object, read the screen pixels and put them into a texture, than save it as png if needed.
Pretty easy to do with a script.
Edit: Also, do you really need it during runtime? One thing to consider is saving them as images with an editor script.