List Serialization and Editor for Scripts #193
|
@ -212,8 +212,10 @@ namespace SHADE
|
|||
System::Type^ listType = System::Collections::Generic::List<int>::typeid->GetGenericTypeDefinition()->MakeGenericType(typeList);
|
||||
// Create a list of the specified type
|
||||
array<int>^ params = gcnew array<int>{ node.size() };
|
||||
object = System::Activator::CreateInstance(listType, params);
|
||||
System::Collections::IList^ list = safe_cast<System::Collections::IList^>(object);
|
||||
System::Collections::IList^ list = safe_cast<System::Collections::IList^>
|
||||
(
|
||||
System::Activator::CreateInstance(listType, params)
|
||||
);
|
||||
|
||||
// Populate the list
|
||||
for (int i = 0; i < LIST_SIZE; ++i)
|
||||
|
@ -227,6 +229,7 @@ namespace SHADE
|
|||
list->Add(obj);
|
||||
}
|
||||
}
|
||||
fieldInfo->SetValue(object, list);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue