Build viewer/editor #13
1 changed files with 4 additions and 2 deletions
|
@ -27,12 +27,14 @@ struct ArrayProperty : public UnrealPropertyBase {
|
|||
propertyType = "ArrayProperty";
|
||||
}
|
||||
|
||||
auto at(std::size_t index) -> UnrealPropertyBase* {
|
||||
template<typename T>
|
||||
std::enable_if_t<std::is_base_of<UnrealPropertyBase, T>::value, T*>
|
||||
at(std::size_t index) {
|
||||
if(index >= items.size()) {
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
return items[index].get();
|
||||
return static_cast<T*>(items[index].get());
|
||||
}
|
||||
|
||||
std::string itemType;
|
||||
|
|
Loading…
Reference in a new issue