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

Method IsAssignableFrom

Source/Editor/Scripting/ScriptType.cs:1080–1091  ·  view source on GitHub ↗

Determines whether an instance of a specified type can be assigned to an instance of the current type. The type to compare with the current type. true if any of the following conditions is true: and the current instance represent the same type. is derived either directly or indirectly from the

(ScriptType c)

Source from the content-addressed store, hash-verified

1078 /// <paramref name="c" /> is derived either directly or indirectly from the current instance. <paramref name="c" /> is derived directly from the current instance if it inherits from the current instance; <paramref name="c" /> is derived indirectly from the current instance if it inherits from a succession of one or more classes that inherit from the current instance. The current instance is an interface that <paramref name="c" /> implements.
1079 /// <c>false</c> if none of these conditions are true, or if <paramref name="c" /> is <see cref="Null"/>.</returns>
1080 public bool IsAssignableFrom(ScriptType c)
1081 {
1082 if (IsInterface)
1083 return c.HasInterface(this);
1084 while (c != Null)
1085 {
1086 if (c == this)
1087 return true;
1088 c = c.BaseType;
1089 }
1090 return false;
1091 }
1092
1093 /// <summary>
1094 /// Determines whether the specified attribute was defined for this type.

Callers 15

IterateNodesCacheMethod · 0.45
GetConnectionColorMethod · 0.45
OnLoadedMethod · 0.45
GetClipboardValueMethod · 0.45
BuildActorNodeMethod · 0.45
GetEntriesMethod · 0.45
CanConvertMethod · 0.45
SearchMethod · 0.45
IsValidMethod · 0.45
CanConvertMethod · 0.45

Calls 1

HasInterfaceMethod · 0.45

Tested by

no test coverage detected