When added before a component class causes the transform component to be hidden inside the inspector view for all GameObjects that contain the component with this attribute.
Attribute Target
Component class
Example
using UnityEngine;
using Sisus.Attributes;
[HideTransformInInspector, DisallowMultipleComponent]
public class ReadOnlyTransform : MonoBehaviour
{
[ShowInInspector]
public Vector3 Position
{
get
{
return transform.localPosition;
}
}
[ShowInInspector]
public Vector3 Rotation
{
get
{
return transform.localEulerAngles;
}
}
[ShowInInspector]
private Vector3 Scale
{
get
{
return transform.localScale;
}
}
}
Example Result
