mirror of
https://github.com/sinai-dev/UnityExplorer.git
synced 2025-01-03 16:13:25 +08:00
fix ParameterHandler parsing Types
This commit is contained in:
parent
7b477a8b0e
commit
274352d665
@ -80,9 +80,18 @@ namespace UnityExplorer.Tests
|
||||
ExplorerCore.Log($"Test3 {typeof(T).FullName}");
|
||||
}
|
||||
|
||||
public static void TestArgumentParse(string s, int i, Color color, CameraClearFlags flags, Vector3 vector, Quaternion quaternion, object obj)
|
||||
public static void TestArgumentParse(string _string,
|
||||
int integer,
|
||||
Color color,
|
||||
CameraClearFlags flags,
|
||||
Vector3 vector,
|
||||
Quaternion quaternion,
|
||||
object obj,
|
||||
Type type)
|
||||
{
|
||||
ExplorerCore.Log($"{s}, {i}, {color.ToString()}, {flags}, {vector.ToString()}, {quaternion.ToString()}, {obj?.ToString() ?? "null"}");
|
||||
ExplorerCore.Log($"_string: {_string}, integer: {integer}, color: {color.ToString()}, flags: {flags}, " +
|
||||
$"vector: {vector.ToString()}, quaternion: {quaternion.ToString()}, obj: {obj?.ToString() ?? "null"}," +
|
||||
$"type: {type?.FullName ?? "null"}");
|
||||
}
|
||||
|
||||
private static void Init_Mono()
|
||||
|
@ -97,6 +97,9 @@ namespace UnityExplorer.UI.Widgets
|
||||
{
|
||||
var input = this.inputField.Text;
|
||||
|
||||
if (typeof(Type).IsAssignableFrom(paramType))
|
||||
return ReflectionUtility.GetTypeByName(input);
|
||||
|
||||
if (paramType == typeof(string))
|
||||
return input;
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user