playMaker

Author Topic: wwwObject bug? [SOLVED]  (Read 6393 times)

elvis75k

  • Beta Group
  • Junior Playmaker
  • *
  • Posts: 97
    • nRender
wwwObject bug? [SOLVED]
« on: January 12, 2012, 04:51:30 PM »
hi. I can't set/select anything in the Store Movie Texture field, even if the object var is declared.
Store Texture work just fine.. I think is a bug. Can i workaround this using set property instead of wwwObject.
Cheers!
« Last Edit: January 15, 2012, 06:39:19 PM by elvis75k »

elvis75k

  • Beta Group
  • Junior Playmaker
  • *
  • Posts: 97
    • nRender
Re: wwwObject bug?
« Reply #1 on: January 12, 2012, 05:45:37 PM »
ok.. added an Object Type: UnityEngine.MovieTexture and now i can set the var in the Store Movie Texture. How can now assign this loaded movieTexture to my object?

Alex Chouls

  • Administrator
  • Hero Member
  • *****
  • Posts: 4000
  • Official Playmaker Support
    • LinkedIn
Re: wwwObject bug?
« Reply #2 on: January 12, 2012, 11:52:28 PM »
Hmmm... I'm not at my computer right now, but try opening the WWWObject script and changing the type of storeMovieTexture from FsmObject to FsmTexture. That should work, but I'll take a look at it tomorrow...

Since Object variables are fairly new, a lot of the older actions don't use them. Should probably have an action to save an object variable value in another variable type, so you can convert when required...

elvis75k

  • Beta Group
  • Junior Playmaker
  • *
  • Posts: 97
    • nRender
Re: wwwObject bug?
« Reply #3 on: January 13, 2012, 06:00:05 AM »
Thanks, i've spent almost all night looking at the script, and now i'm reading this with only one eye.
I'm sure that the movie is loaded just fine; in fact i see the texture icon changing into a green reel with the play button. I think (i'm too not in front of my pc right now) that i can't assign that stored movieTexture to anything because of the missing action setMaterialMovieTexture.
I'll try changing what you said in the script and will use setMovieTexture to select my stored var to assign the movie. My guess is that it will not work because the var type is different but i hope i'm wrong.
Will report asap ;)

elvis75k

  • Beta Group
  • Junior Playmaker
  • *
  • Posts: 97
    • nRender
Re: wwwObject bug?
« Reply #4 on: January 13, 2012, 07:56:01 AM »
Tested the new script (FsmTexture) and i can now select the variable as texture instead of object.
Anyway i can't use the var in the action SetMaterialTexture so i can't really do nothing with that loaded movie.
What can i do to assign this movie to the material?

Alex Chouls

  • Administrator
  • Hero Member
  • *****
  • Posts: 4000
  • Official Playmaker Support
    • LinkedIn
Re: wwwObject bug?
« Reply #5 on: January 14, 2012, 08:03:27 PM »
Does SetMaterialTexture not see the Texture variable?

Do you have the movie url I could use to test with?

elvis75k

  • Beta Group
  • Junior Playmaker
  • *
  • Posts: 97
    • nRender
Re: wwwObject bug?
« Reply #6 on: January 15, 2012, 04:49:41 AM »
SetMaterialTexture does see the var but how can i play, stop, pause if it is a texture and not a movie? I can't give you any url yet because i'm testing on a local file://c: ..
Please I need this working for tomorrow on my deadline job.

edit: when the movie is loaded i can see only the first frame and i cannot handle it with movie actions (the var is not see by movie actions). Hope you understand.
« Last Edit: January 15, 2012, 05:19:20 AM by elvis75k »

qholmes

  • 1.2 Beta
  • Hero Member
  • *
  • Posts: 509
Re: wwwObject bug?
« Reply #7 on: January 15, 2012, 10:33:14 AM »
I am not sure if this is the same thing...

I made a variable of UnityEngine.MovieTexture and assigned it a movie. I could then use the movie actions to play and pause etc the texture.. I did not try assigning it to anything.

Q

Alex Chouls

  • Administrator
  • Hero Member
  • *****
  • Posts: 4000
  • Official Playmaker Support
    • LinkedIn
Re: wwwObject bug?
« Reply #8 on: January 15, 2012, 10:52:58 AM »
I understand. The missing link in the chain is an action that can assign the downloaded movie texture to a material.

Ideally the texture variable dropdown in Set Material Texture would see FsmObject variables of UnityEngine.MovieTexture type, but it doesn't currently.

A workaround is a new action to apply movie textures: SetMaterialMovieTexture.

I've attached this action. Let me know if it works.

BTW, you should revert the previous changes to WWWObject (keep the variable as an FsmObject).

qholmes

  • 1.2 Beta
  • Hero Member
  • *
  • Posts: 509
Re: wwwObject bug?
« Reply #9 on: January 15, 2012, 10:56:07 AM »
Ok i just modified Set Texture to Set Movie Texture and now i can use my variable to set the texture on my material. And control it with the Play and Pause and Stop functions.

Is that what you wanted to do?

To be honest i have not looked at the wwwObject. But it seemed like you just wanted to use a movie stored in a variable?

Q

qholmes

  • 1.2 Beta
  • Hero Member
  • *
  • Posts: 509
Re: wwwObject bug?
« Reply #10 on: January 15, 2012, 10:57:36 AM »
Hehh It seems Alex and i were doing the same thing.. I was just about to attach mine.  ::)

Q

elvis75k

  • Beta Group
  • Junior Playmaker
  • *
  • Posts: 97
    • nRender
Re: wwwObject bug?
« Reply #11 on: January 15, 2012, 06:35:28 PM »
That was great, thanks for the new action. I hope you will add the possibility to save an object variable value in another variable type, so it can be convert when required... as you said on this thread.
Beers  :)

elvis75k

  • Beta Group
  • Junior Playmaker
  • *
  • Posts: 97
    • nRender
Re: wwwObject bug? [SOLVED]
« Reply #12 on: January 16, 2012, 07:03:03 AM »
hmm.. i think i can't handle the audio.clip loaded with the movie :(

edit: tried MovieTextutreAudioSetting (the only action where stored movieTexture var can be seen)..
no way to get the audio out of the loaded movie?!

edit2: ok i've managed to pull the audio from the loaded movie, with SetObjectValue :) and then i can handle it just with audioPlay, stop, pause...

« Last Edit: January 16, 2012, 09:58:56 AM by elvis75k »

Alex Chouls

  • Administrator
  • Hero Member
  • *****
  • Posts: 4000
  • Official Playmaker Support
    • LinkedIn
Re: wwwObject bug? [SOLVED]
« Reply #13 on: January 17, 2012, 11:11:36 PM »
Sweet! GetObjectValue and SetObjectValue should let you do a lot of things that would have required custom actions before.

Movie Texture Audio Settings assigns a Game Object with an Audio Source component to play the movie's audio track. Normally you'd want the video and sound to stay in sync, and this is the easiest way to do that. The audio will automatically pause/play as you pause/play the movie.

See the PlayMakerSamples/TestLab/Material/MovieTexture scene for an example.