Expand my Community achievements bar.

add instance when initial count=0

Avatar

Level 6
Hello,



Can someone tellme how to dynamically add an instance of a section, when that section as at design time a initial count of zero?



just doing: objectsection.instanceManager.addInstance (1);

doesn´t work.



Thank you
1 Reply

Avatar

Former Community Member
If the object does not exist yet then the addInstance method will not work (as you have found out). There is a syntax that allows for this buy using:



_objectsection.addInstance(1)



The underscore (_) indicates that you want to communicate with the instanceManager.