playMaker

Author Topic: Why is get and setting sprites image so hard in playmaker ? [SOLVED]  (Read 1700 times)

t4d

  • Playmaker Newbie
  • *
  • Posts: 49
    • View Profile
Current I doing a really GUI intensive project and I keep running int o the same problem

playmaker can limit option when dealing with Sprites IMage  Raw images image data type

an example I have texture2D i get from a Asset store asset ( screen capture manager ) But I can not use the image directly in  playmaker  I have a work around where i send it to a BOLT variable and then get to back and apply the bolt variable ?? ( seem a poor way around the problem)

Now I;m trying to the image data from a unity Sprite renderer and apply to a unity image

there seem to be no action to deal with sprites to get or set the data and set or get property doesn't seem to get the data and set to a variable ??

what am i doing wrong ?
« Last Edit: June 10, 2018, 06:55:29 AM by djaydino »

t4d

  • Playmaker Newbie
  • *
  • Posts: 49
    • View Profile
Re: Why is get and setting sprites image so hard in playmaker ?
« Reply #1 on: June 05, 2018, 04:01:29 AM »
ok what am i missing please help

I'm trying to work around this issue I'm having by trying to uses an array on textures  ( there no option for an Image array  ?? )

how do I get a picture, image, texture, sprite What ever ,.from a array and apply to a GUI image  in playmaker ??

djaydino

  • Administrator
  • Hero Member
  • *****
  • Posts: 4379
    • View Profile
    • jinxtergames
Re: Why is get and setting sprites image so hard in playmaker ?
« Reply #2 on: June 05, 2018, 09:48:27 AM »
Hi,
You can find several 'sprite' actions on the Ecosystem

But maybe there should be indeed a set sprite added to the standard actions :)
FOR HIRE:Playmaker/C#

Playmaker Samples <-------------> Easy Exporter <---------------------> TPA Actions

t4d

  • Playmaker Newbie
  • *
  • Posts: 49
    • View Profile
Re: Why is get and setting sprites image so hard in playmaker ?
« Reply #3 on: June 05, 2018, 10:14:06 PM »
no sprite or any texture action can not access the texture2D object that I get from teh Screen capture manager (i using screen capture manager because i need to capture the GUI as well )

playmaker not give access to a Texture2D object is the problem

djaydino

  • Administrator
  • Hero Member
  • *****
  • Posts: 4379
    • View Profile
    • jinxtergames
Re: Why is get and setting sprites image so hard in playmaker ?
« Reply #4 on: June 06, 2018, 02:00:14 AM »
Hi.
I have closed your other post as it is about the same issue.

Can you give the link to the asset that you are using?

Maybe i can make a custom action so it will store the image into a playmaker array instead, then you can use them directly.

I will also check the screenshot action if i can get it to include the ui (it is an older action from before the canvas system, that's why it does not include it in the picture)
FOR HIRE:Playmaker/C#

Playmaker Samples <-------------> Easy Exporter <---------------------> TPA Actions

t4d

  • Playmaker Newbie
  • *
  • Posts: 49
    • View Profile
Re: Why is get and setting sprites image so hard in playmaker ?
« Reply #5 on: June 06, 2018, 02:04:34 AM »
here's the only asset i could find that captures the GUI

https://assetstore.unity.com/packages/tools/utilities/ultimate-screenshot-creator-82008

the Screen capture command in unity has a bug dating back to 2015
that why i'm using this asset
 




djaydino

  • Administrator
  • Hero Member
  • *****
  • Posts: 4379
    • View Profile
    • jinxtergames
Re: Why is get and setting sprites image so hard in playmaker ?
« Reply #6 on: June 06, 2018, 03:39:46 AM »
Hi.
I made a custom action that takes a screenshot including the ui.

You can get it from the attachment below.

The action name is 'Take Screenshot With Ui'

Can you test and see if it works on your end?
« Last Edit: June 07, 2018, 12:35:55 AM by djaydino »
FOR HIRE:Playmaker/C#

Playmaker Samples <-------------> Easy Exporter <---------------------> TPA Actions

djaydino

  • Administrator
  • Hero Member
  • *****
  • Posts: 4379
    • View Profile
    • jinxtergames
Re: Why is get and setting sprites image so hard in playmaker ?
« Reply #7 on: June 06, 2018, 03:42:02 AM »
Hi.
Please remove your other posts as it is related to the same issue.

It will only make it harder to solve issues if you most multiple threads.

i can remove the for you if you don't know how to remove them :)
FOR HIRE:Playmaker/C#

Playmaker Samples <-------------> Easy Exporter <---------------------> TPA Actions

t4d

  • Playmaker Newbie
  • *
  • Posts: 49
    • View Profile
Re: Why is get and setting sprites image so hard in playmaker ?
« Reply #8 on: June 06, 2018, 05:42:35 AM »
remove what you want in replation to forum post

I've saved the image and loaded from Resources,. and now having the issues of it not updating .

it seem no matter what i tried I always find another problem


please is there a way to convert a object-Texture2D to a Texture playmaker can use ??


that is the main issues I'm fighting with it's been 3 days.. =( 
« Last Edit: June 06, 2018, 09:01:53 AM by t4d »

djaydino

  • Administrator
  • Hero Member
  • *****
  • Posts: 4379
    • View Profile
    • jinxtergames
Re: Why is get and setting sprites image so hard in playmaker ?
« Reply #9 on: June 06, 2018, 03:35:37 PM »
Hi.
did you try the attachment?

The actions stores directly in a texture variable.

Resource folder is loaded at the start of the game.
FOR HIRE:Playmaker/C#

Playmaker Samples <-------------> Easy Exporter <---------------------> TPA Actions

t4d

  • Playmaker Newbie
  • *
  • Posts: 49
    • View Profile
Re: Why is get and setting sprites image so hard in playmaker ?
« Reply #10 on: June 06, 2018, 10:11:54 PM »
I'm getting this errors

ReadPixels was called to read pixels from system frame buffer, while not inside drawing frame.
UnityEngine.Texture2D:ReadPixels(Rect, Int32, Int32)
HutongGames.PlayMaker.Actions.TakeScreenshotWithUi:OnEnter() (at Assets/PlayMaker Custom Actions/Application/TakeScreenshotWithUi.cs:31)
HutongGames.PlayMaker.FsmState:ActivateActions(Int32) (at C:/Users/Alex/Documents/Unity/Playmaker/Projects/Playmaker.source.unity/Assets/PlayMaker/Classes/FsmState.cs:205)
HutongGames.PlayMaker.FsmState:OnEnter() (at C:/Users/Alex/Documents/Unity/Playmaker/Projects/Playmaker.source.unity/Assets/PlayMaker/Classes/FsmState.cs:175)
HutongGames.PlayMaker.Fsm:EnterState(FsmState) (at C:/Users/Alex/Documents/Unity/Playmaker/Projects/Playmaker.source.unity/Assets/PlayMaker/Classes/Fsm.cs:2695)
HutongGames.PlayMaker.Fsm:SwitchState(FsmState) (at C:/Users/Alex/Documents/Unity/Playmaker/Projects/Playmaker.source.unity/Assets/PlayMaker/Classes/Fsm.cs:2642)
HutongGames.PlayMaker.Fsm:UpdateStateChanges() (at C:/Users/Alex/Documents/Unity/Playmaker/Projects/Playmaker.source.unity/Assets/PlayMaker/Classes/Fsm.cs:2570)
HutongGames.PlayMaker.Fsm:DoTransition(FsmTransition, Boolean) (at C:/Users/Alex/Documents/Unity/Playmaker/Projects/Playmaker.source.unity/Assets/PlayMaker/Classes/Fsm.cs:2609)
HutongGames.PlayMaker.Fsm:ProcessEvent(FsmEvent, FsmEventData) (at C:/Users/Alex/Documents/Unity/Playmaker/Projects/Playmaker.source.unity/Assets/PlayMaker/Classes/Fsm.cs:2192)
HutongGames.PlayMaker.Fsm:Event(FsmEventTarget, FsmEvent) (at C:/Users/Alex/Documents/Unity/Playmaker/Projects/Playmaker.source.unity/Assets/PlayMaker/Classes/Fsm.cs:2303)
HutongGames.PlayMaker.Fsm:Event(FsmEvent) (at C:/Users/Alex/Documents/Unity/Playmaker/Projects/Playmaker.source.unity/Assets/PlayMaker/Classes/Fsm.cs:2384)
HutongGames.PlayMaker.Fsm:Event(String) (at C:/Users/Alex/Documents/Unity/Playmaker/Projects/Playmaker.source.unity/Assets/PlayMaker/Classes/Fsm.cs:2371)
PlayMakerFSM:SendEvent(String) (at C:/Users/Alex/Documents/Unity/Playmaker/Projects/Playmaker.source.unity/Assets/PlayMaker/PlayMakerFSM.cs:679)
UnityEngine.EventSystems.EventSystem:Update()

[d3d11] attempting to ReadPixels outside of RenderTexture bounds! Reading (0, 0, 1920, 1080) from (1933, 742)


 

djaydino

  • Administrator
  • Hero Member
  • *****
  • Posts: 4379
    • View Profile
    • jinxtergames
Re: Why is get and setting sprites image so hard in playmaker ?
« Reply #11 on: June 07, 2018, 12:35:33 AM »
Hi,

Ah! i did not test when some ui was outside the camera view, updated the action and it should not give this error anymore.

FOR HIRE:Playmaker/C#

Playmaker Samples <-------------> Easy Exporter <---------------------> TPA Actions

t4d

  • Playmaker Newbie
  • *
  • Posts: 49
    • View Profile
Re: Why is get and setting sprites image so hard in playmaker ?
« Reply #12 on: June 09, 2018, 02:04:07 AM »
sorry it's not captureing the GUI and not capturing the Scene correctly =(

does not not seem to update only image is the first frame on load up

t4d

  • Playmaker Newbie
  • *
  • Posts: 49
    • View Profile
Re: Why is get and setting sprites image so hard in playmaker ?
« Reply #13 on: June 09, 2018, 02:15:49 AM »
it's only capturing world space GUI, does not Screen space overlay =(

thanks for the effort

djaydino

  • Administrator
  • Hero Member
  • *****
  • Posts: 4379
    • View Profile
    • jinxtergames
Re: Why is get and setting sprites image so hard in playmaker ?
« Reply #14 on: June 09, 2018, 04:03:11 AM »
Hi.
I just did a test on a scene with 2 canvases, 1 on world space and one in screen space overlay and i both are on my image.

Tested on unity 1.8.3f1 / Playmaker 1.9.0f5

What unity version are you using?
FOR HIRE:Playmaker/C#

Playmaker Samples <-------------> Easy Exporter <---------------------> TPA Actions