mirror of
https://github.com/aharabada/glitchy-engine-beef.git
synced 2026-09-05 13:01:52 +00:00
ComponentWindow finalized
ScriptCore: - ActivatorExtension: Fixed creation of default value or null class - ImGuiExtension: added DragUIntX / DoubleX and CheckboxX
This commit is contained in:
@@ -66,4 +66,13 @@ public static class ActivatorExtension
|
||||
|
||||
return component;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Returns the null for reference types and an initialized value for structs / value types.
|
||||
/// </summary>
|
||||
/// <param name="type">The type to create the default value for.</param>
|
||||
public static object? CreateDefaultValue(Type type)
|
||||
{
|
||||
return type.IsClass ? null : CreateInstanceSafe(type);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user