Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

is there a way to get size of sprite asset with code?

i know how to get it in asset viewer: i'd like to get its width and height in code, to auto-scale it.
thanks,

Comments

  • dave1707dave1707 Mod
    Posts: 8,781

    Try this.

    function setup() 
        s=readImage(asset.builtin.Planet_Cute.Character_Horn_Girl)
        print(s.width)
        print(s.height)
    end
    
  • Posts: 825

    neat, thanks, that'll work for me.

Sign In or Register to comment.