Table of Contents

Class WarningIfNullAttribute

Namespace
Gamelogic.Extensions
Assembly
Gamelogic.Extensions.dll

Mark fields in a MonoBehaviour with this attribute to give a specific warning when the field is not set.

[AttributeUsage(AttributeTargets.Field)]
public class WarningIfNullAttribute : PropertyAttribute
Inheritance
WarningIfNullAttribute
Inherited Members
Extension Methods

Examples

public class MyMonoBehaviour : MonoBehaviour
{
	[WarningIfNull("Assign the prefab")]
	public GameObject playerPrefab;

	//...
}

Constructors

WarningIfNullAttribute(string)

Initializes a new instance of the WarningIfNullAttribute class.

Properties

WarningMessage

Gets the warning message.