Gets the script type of the object. The object. The scripting type of that object.
(object o)
| 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. |
no test coverage detected