Skip to content

Object Preview

[ObjectPreview] attribute used for drawing Object preview window.


Support Types

All Object types.


Parameters

Name Description
Height Height of the preview window.
Expandable Set true to hided in expandable foldout.

Examples

[ObjectPreview]
public Object values;

[ObjectPreview(Height = 120)]
public GameObject weapon;

[ObjectPreview(Height = 200, Expandable = true)]
public GameObject sword;
Note

Make sure that you have added ApexInspector namespace in your script, to get access to all attributes.

using ApexInspector;


Demo

using ApexInspector;
using UnityEngine;

public class ExampleComponent : MonoBehaviour
{
    [ObjectPreview(Expandable = true)]
    public GameObject someObject;
}

Live-demo

Live demo