MCPcopy Create free account
hub / github.com/FlaxEngine/FlaxEngine / GetAttribute

Method GetAttribute

Source/Editor/Scripting/ScriptType.cs:604–613  ·  view source on GitHub ↗

Retrieves a custom attribute of a specified type that is applied to a specified member. The type of attribute to search for. A custom attribute that matches type, or if no such attribute is found.

(Type type)

Source from the content-addressed store, hash-verified

602 /// <param name="type">The type of attribute to search for.</param>
603 /// <returns>A custom attribute that matches type, or <see langword="null" /> if no such attribute is found.</returns>
604 public object GetAttribute(Type type)
605 {
606 var attr = GetAttributes(true);
607 for (int i = 0; i < attr.Length; i++)
608 {
609 if (attr[i].GetType() == type)
610 return attr[i];
611 }
612 return null;
613 }
614
615 /// <summary>
616 /// Retrieves a custom attribute of a specified type that is applied to a specified member.

Callers 13

LoadPanelMethod · 0.45
LoadBoundsMethod · 0.45
OnAssemblyLoadedFunction · 0.45
OnLayoutDeserializeMethod · 0.45
OnLayoutDeserializeMethod · 0.45
OnLayoutDeserializeMethod · 0.45
OnLayoutDeserializeMethod · 0.45
OnLayoutDeserializeMethod · 0.45
OnLayoutDeserializeMethod · 0.45
OnLayoutDeserializeMethod · 0.45
OnLayoutDeserializeMethod · 0.45

Calls 1

GetTypeMethod · 0.45

Tested by

no test coverage detected