Documentation

Page contents

Updated

Generate PDF from page.

Compact mode

Description

Show the textures in the inspector in a compact mode.

Reference

  • Compact Mode – Enable de inspector compact mode.Convex – Enable or disable the Convex property. Only for MeshCollider.Is Trigger – Enable or disable the Is Trigger property.

Use

public class CGFSampleMaterialEditor : CGFMaterialEditorClass
{
    private bool _compactMode;
    MaterialProperty _Texture;

    public override void OnEnable()
    {
        base.OnEnable();
        GetProperties();
    }

    private void GetProperties()
    {
         _Texture = FindProperty("_Texture");
    }

    public override void InspectorGUI()
    {
        CGFMaterialEditorUtilitiesClass.BuildTexture("Texture", "Texture.", _Texture, this, true, _compactMode);
    }
}