Can't even get simple getProperty to work!

I’ve spent an hour trying to figure out what should be a stupid simple thing.

let rabbit = Scene.getItem("nK7SXb3X") as AnimatedItem;
Debug.log(rabbit.getProperty( "opacity" ));

It doesn’t matter what Animated item property I try, getProperty only returns null.
Please! What am I missing?

Frustrated as F*&^%$%%%%!!!

1 Like

Hi @jlfjlf,

Check the docs for BaseItem.getProperty: “Gets a custom property from this object.”. It’s talking about CoSpace Properties, which are global variables you can create and access across scenes and scripts.

All object properties are accessible via standard JS dot notation, so:

let rabbit = Scene.getItem("nK7SXb3X") as AnimatedItem;

Hope that helps! Let me know if you have further queries about this. If this post solves your problem, please mark it as the Solution.

Many thanks,
Geoff @ TechLeap