Yes you can. It is a read only property:
Yeah, but how to get the GO that in the sceen and after that get sprite property, i canât understand code. Please give example.
Weird I thought otherwiseâŚ
Oh, thank you so much, i will check it when back home
The only problem is, your code is in âmain.scriptâ, which is not the script on the card object, so you canât use the relative URL like that ("#card-tile"). If you only give the component ID, then it will look for it on the current object. You need to use a URL that is relative to where âmain.scriptâ is, or an absolute URL.
yeah, can you give an example of absolute url?
Open your card script, and in the init function, put:
print(msg.url())
Then, when you run your game, you will see the absolute URLs of all your cards, in the console. (The part inside the square brackets.)
oh, thanks. I forgot about it .
You can also see an example of this in the Sprite Size example I created:
local square_size = go.get("square#stone", "size")
âRead the size of the sprite with id stone
on the game object with id square
.â
yeah, they already helped me)