🗒️
Ultimate Attributes Pack
  • Introduction
  • Decorators
  • Variable aspect
  • Buttons
  • Folded infos
  • Conditionals
  • Validators
  • Component getters
  • Popups
Powered by GitBook
On this page

Folded infos

PreviousButtonsNextConditionals

Last updated 1 year ago

AssetPreview

Displays a folded interractive preview of the game object, the mesh or the image (Sprite, Texture, Texture2D) in the inspector.

Supported property types

  • GameObject

  • Mesh

  • Sprite

  • Texture

  • Texture2D

Parameters

  • PreviewSize

Code Example

using UltimateAttributesPack;

public class AssetPreviewExample : MonoBehaviour
    {
        // AssetPreview attribute displays a interactive preview of a mesh, a gameobject or an image (Sprite, Texture, Texture2D)
        [AssetPreview]
        public Mesh specificMesh;

        // You can also change the size of the preview
        [AssetPreview(PreviewSize.Large)]
        public GameObject specificObject;

        [AssetPreview(PreviewSize.Medium)]
        public Texture specificTexture;
    }

TransformInfo

Displays a folded menu with all the values of the Transform in the inspector.

Supported property types

  • Transform

Parameters

  • CanModifyValues

Code Example

using UltimateAttributesPack;

public class TransformInfoExample : MonoBehaviour
    {
        // If you use TransformInfo attribute, it displays a folfout menu with all the values of the transform
        [TransformInfo]
        public Transform transformValue;

        // You can set the param to true to modify the Transform values in the foldout menu
        [TransformInfo(true)]
        public Transform transformValueModifiable;
    }

RectTransformInfo

Displays a folded menu with all the values of the RectTransform in the inspector.

Supported property types

  • RectTransform

Parameters

  • CanModifyValues

Code Example

using UltimateAttributesPack;

public class RectTransformInfoExample : MonoBehaviour
    {
        // If you use RectTransformInfo attribute, it displays a folfout menu with all the values of the RectTransform
        [RectTransformInfo]
        public RectTransform rectTransformValue;

        // You can set the param to true to modify the RectTransform values in the foldout menu
        [RectTransformInfo(true)]
        public RectTransform rectTransformValueModifiable;
    }