I thought I could use the following but ‘number_of_layers’ returns undefined. Whats wrong?
var instance = modelAsset.resource.instantiate();
number_of_layers=instance.children.length;
Thanks
I thought I could use the following but ‘number_of_layers’ returns undefined. Whats wrong?
var instance = modelAsset.resource.instantiate();
number_of_layers=instance.children.length;
Thanks
Works fine for me in a test project.
Have you defined the variable number_of_layers
? Or should it be:
var number_of_layers = instance.children.length;