playMaker

Author Topic: Changing a texture on game object from variable.  (Read 2033 times)

tal1m0n

  • Guest
Changing a texture on game object from variable.
« on: July 12, 2013, 06:57:57 PM »
For practice I was trying to set up a little store where it pulls images from google search and places them onto the store items.

Thanks to the awsome SQLitekit product, I was able to get the data down correctly.

The WWWObject actionscript converts the url to a image stored in a texture variable.

Final step is to Set Material Texture to the game object.

It creates an instance of my shader onto the object like it's supposed too, but with no texture.

I can see the texture in the variable so I know that's correct. But what's strange is I am unable to find the texture in the Asset's list. So maybe that's why the game object can't find it either?


First image shows the text image is loaded.
Second image shows the variable holds the image.
Third image shows how the white shader is loaded... but without the texture...

I don't know what else to try

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: Changing a texture on game object from variable.
« Reply #1 on: July 15, 2013, 02:44:25 AM »
Hi,

 it's likely that the data is not matching, or a problem of logic in your fsm.

try to load that particular image on the first attempt, not on the thrid, to rule out data corruption. then debug the flow of the fsm to make sure all variables are set properly.

bye,

 Jean