Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. We have updated the language to the Editor Terms based on feedback from our employees and community. Learn more.
    Dismiss Notice
  3. Join us on November 16th, 2023, between 1 pm and 9 pm CET for Ask the Experts Online on Discord and on Unity Discussions.
    Dismiss Notice

Model preview in editor window

Discussion in 'Scripting' started by papabooish, Apr 27, 2013.

  1. papabooish

    papabooish

    Joined:
    Apr 26, 2013
    Posts:
    2
    Hey

    I'm working on an editor extension and I need to render a preview of up to several models to an editor window (preferably with the ability to rotate and zoom as well). I've found AssetPreview.GetAssetPreview but it only renders the model to a 128x128 texture, which is way to low res for what I need and doesn't offer zoom.

    Using a hidden camera and only rendering a specific layer would work, but I'd rather like to avoid it, since it robs the user of a layer.

    I was then considering using Graphics.DrawMeshNow as part of a camera's post process hook (with the camera not rendering anything), but then I won't get any lighting on my models.

    Does anyone have a fourth suggestion that might work?

    Cheers
    /asger
     
  2. startassets

    startassets

    Joined:
    Feb 13, 2017
    Posts:
    11