![]() |
Attention | Topic was automatically imported from the old Question2Answer platform. |
![]() |
Asked By | q4a |
I have custom class FSDirectory with custom iterators and this code works fine:
var my_dir = FSDirectory.new(sub_dir1, sub_dir2) for i in my_dir: print("sub_FullName=" + i.FullName())
But I get error, if I call this:
var my_dir = FSDirectory.new(sub_dir1, sub_dir2) print("sub2_FullName=" + my_dir[1].FullName())
FileBrowser.gd:48 - Invalid get index ‘1’ (on base: ‘Object (FSDirectory.gd)’)
So, is it possible to access items of custom class via [id]
?