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

Method GetObjectType

Source/Editor/Scripting/TypeUtils.cs:25–34  ·  view source on GitHub ↗

Gets the script type of the object. The object. The scripting type of that object.

(object o)

Source from the content-addressed store, hash-verified

23 /// <param name="o">The object.</param>
24 /// <returns>The scripting type of that object.</returns>
25 public static ScriptType GetObjectType(object o)
26 {
27 if (o is FlaxEngine.Object flaxObject && FlaxEngine.Object.GetUnmanagedPtr(flaxObject) != IntPtr.Zero)
28 {
29 var type = flaxObject.GetType();
30 var typeName = flaxObject.TypeName;
31 return type.FullName != typeName ? GetType(typeName) : new ScriptType(type);
32 }
33 return o != null ? new ScriptType(o.GetType()) : ScriptType.Null;
34 }
35
36 /// <summary>
37 /// Gets the typename name for UI.

Callers 15

OnShowTooltipMethod · 0.45
GetTooltipMethod · 0.45
InitDefaultValuesMethod · 0.45
GetEntriesMethod · 0.45
GetMemberTypeMethod · 0.45
CaptureSnapshotMethod · 0.45
CompareMethod · 0.45
ScriptItemViewMethod · 0.45
InitializeMethod · 0.45
InitializeMethod · 0.45
CreateEditorMethod · 0.45

Calls 3

GetTypeFunction · 0.85
GetUnmanagedPtrMethod · 0.80
GetTypeMethod · 0.45

Tested by

no test coverage detected