playMaker

Author Topic: Image varible?  (Read 500 times)

Daffodil

  • Playmaker Newbie
  • *
  • Posts: 4
Image varible?
« on: April 15, 2023, 01:46:25 PM »
Hi all, I am new here! Nice to meet you all!

I am getting my head around Playmaker and so far so good, its just I cannot seem to find if its possible to save an image to a varible and be able to call up again later on?

Tubbritt

  • Playmaker Newbie
  • *
  • Posts: 8
Re: Image varible?
« Reply #1 on: April 16, 2023, 09:59:01 AM »
Did you set the variable to “Texture” so that it can store the image, and not just text or values? See attached iamge for example.

Daffodil

  • Playmaker Newbie
  • *
  • Posts: 4
Re: Image varible?
« Reply #2 on: April 16, 2023, 02:01:32 PM »
I have assigned it to Texture, but I cannot seem to figure out how to call that now.

Tubbritt

  • Playmaker Newbie
  • *
  • Posts: 8
Re: Image varible?
« Reply #3 on: April 16, 2023, 04:35:53 PM »
Hello.
Use the action “Set Texture Value” to specify the image you want to store in your Variable.

You can then use the action “Set Material Texture” to load the contents of the variable into any Material. See attached image for an example.

djaydino

  • Administrator
  • Hero Member
  • *****
  • Posts: 7616
    • jinxtergames
Re: Image varible?
« Reply #4 on: April 17, 2023, 08:10:15 AM »
Hi.
For (Canvas) Image component, you need to use 'UI Image Set Sprite'.
and use the sprite variable.

for Sprite Renderer component, you can use 'Set Sprite'

texture is mostly use for 3d objects and materials

Daffodil

  • Playmaker Newbie
  • *
  • Posts: 4
Re: Image varible?
« Reply #5 on: April 17, 2023, 10:28:57 AM »
Hi.
For (Canvas) Image component, you need to use 'UI Image Set Sprite'.
and use the sprite variable.

for Sprite Renderer component, you can use 'Set Sprite'

texture is mostly use for 3d objects and materials

Hiya, I am attempting this (you are quite right, it is 2D UI) I cant set it as a sprite in variables, it keeps defaulting to GameObject.

Daffodil

  • Playmaker Newbie
  • *
  • Posts: 4
Re: Image varible?
« Reply #6 on: April 17, 2023, 12:50:15 PM »
I got it work! Thank you!