BlueRaja Posted February 12, 2016 Share Posted February 12, 2016 Ok, this has been driving me mad.According to the documentation, dynamic arrays can be initialized via config files like so:MyClass.uc: class MyClass extends whatever config(Namespace); var config array<MyType> MyArray; XComMyClass.ini: [Namespace.MyClass] MyArray=(A=1,B=1) MyArray=(A=2,B=2) In this case, according to the documentation, MyArray should have two elements. Indeed, XCOM does this all over the place, and it seems to work correctly for them (search for eg. BodyPartTemplateConfig).However, when I attempt it.... MyArray has only a single element, (A=2,B=2)What's even more maddening is that if I put + before each line in the config, it works correctly, with MyArray having two elements. According to the documentation, the only thing + does is prevent duplicates from being added, so it makes no sense that adding a + would fix my issue.Could someone with more knowledge of UDK please explain WTF is going on!? Link to comment Share on other sites More sharing options...
Kenshkrix Posted February 13, 2016 Share Posted February 13, 2016 The dynamic array in BodyPartTemplateConfig has no parentheses when inputting data into the array. Thus it would appear that the arrays do not automatically assume you're adding new elements when they are explicitly inside parentheses, so the + helps it delineate this behavior from simply overwriting the old value. Link to comment Share on other sites More sharing options...
Drakous79 Posted February 13, 2016 Share Posted February 13, 2016 What about this? [Namespace.MyClass] MyArray=(A=1,B=1) .MyArray=(A=2,B=2) Link to comment Share on other sites More sharing options...
Recommended Posts