Add support for array of Visual Script objects

This commit is contained in:
Wojtek Figat
2022-05-01 20:42:05 +02:00
parent c5bfdc66a4
commit 74b23d0e00
20 changed files with 221 additions and 62 deletions

View File

@@ -203,7 +203,7 @@ namespace FlaxEditor.Windows.Assets
{
if (isArray)
{
singleValueType = new ScriptType(param.Type.GetElementType());
singleValueType = param.Type.GetElementType();
arrayType = param.Type;
dictionaryType = ScriptType.MakeDictionaryType(new ScriptType(typeof(int)), singleValueType);
b = cmType.ContextMenu.AddButton(window.Surface.GetTypeName(singleValueType) + "[]...", () => OnChangeType(item => window.SetParamType(index, ((ScriptType)item.Tag).MakeArrayType())));