Infohazard.Core 1.4.1
Infohazard Core Utility Library
Loading...
Searching...
No Matches
Infohazard.Core.Editor.ObjectValidators Class Reference

Provides methods for validating objects. More...

Static Public Member Functions

static Func< Object, Object > MustImplement (IReadOnlyList< Type > interfaces)
 Ensures an object (or one of its components, if it's a GameObject) implements a list of interfaces. More...
 

Detailed Description

Provides methods for validating objects.

Member Function Documentation

◆ MustImplement()

static Func< Object, Object > Infohazard.Core.Editor.ObjectValidators.MustImplement ( IReadOnlyList< Type >  interfaces)
static

Ensures an object (or one of its components, if it's a GameObject) implements a list of interfaces.

If the object is a GameObject and one of its components implements all interfaces, that component will be returned.

Parameters
interfacesList of interfaces that must be implemented.
Returns
The object or one of its components that implements all interfaces, or null.

The documentation for this class was generated from the following file: