Version: Unity 6.6 Alpha (6000.6)
LanguageEnglish
  • C#

ReplacementComponentAttribute

class in UnityEngine

Suggest a change

Success!

Thank you for helping us improve the quality of Unity Documentation. Although we cannot accept all submissions, we do read each suggested change from our users and will make updates where applicable.

Close

Submission failed

For some reason your suggested change could not be submitted. Please <a>try again</a> in a few minutes. And thank you for taking the time to help us improve the quality of Unity Documentation.

Close

Cancel

Description

Marks a deprecated component with a recommended replacement component type.

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.

Properties

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

Constructors

Constructor Description
ReplacementComponentAttributeInitializes the attribute with the replacement type name and an optional display name.