Documentation

Unity Engine


User Manual

Script Reference

Unity Engine


ReplacementComponentAttribute

Marks a deprecated component with a recommended replacement component type.
Read time 3 minutesLast updated 6 days ago

Definition

public class ReplacementComponentAttribute : Attribute

Remarks

Use this attribute on a component class to tell the Unity Editor which component should replace it.
When you apply this attribute to a deprecated component, the Inspector displays a helper button that lets users add the recommended replacement component to the same GameObject.

Constructors

Constructor

Description

ReplacementComponentAttribute(System.String,System.String)Initializes the attribute with the replacement type name and an optional display name.

Properties

Property

Description

DisplayNameThe name Unity displays for the replacement component in the Inspector.
TypeNameThe full type name (including namespace) of the replacement component.

Inheritance

Inherited Members