Playmaker Forum
PlayMaker Help & Tips => PlayMaker Help => Topic started by: Silicon Power on September 21, 2019, 10:43:12 AM
-
Hi. Is there any action to get Texture2D from an object and store inside a texture variable?
-
Hi.
I know that there are get sprite actions.
Maybe 'Material Get Texture'
-
Hi.
I know that there are get sprite actions.
Maybe 'Material Get Texture'
Unfortunately doesn't work in this case. Seems there is no action for getting Texture2D from an Object.
-
Hi.
Is it on a object or inside a material?
What kind of object is it?
-
Hi.
Is it on a object or inside a material?
What kind of object is it?
It's on an object. Like below pic.
-
Hi.
Mean on wich component (on a Game Object) .
You are now showing the variable (object type Texture2d) :)
-
Hi.
Mean on wich component (on a Game Object) .
You are now showing the variable (object type Texture2d) :)
I want to save this Texture2D value inside a texture variable.
-
Hi.
So you mean to convert the Texture 2d to a Texture variable?
Most i find on unity answers is to convert to Sprite.
Are you getting the Texture2d from a external source?
If the Texture2d is in your project folder, you can change the type btw :)
Sorry if i misunderstood :D (or still misunderstanding, if so can you give more details where you are getting the Texture2d etc.)
-
Hi.
So you mean to convert the Texture 2d to a Texture variable?
Most i find on unity answers is to convert to Sprite.
Are you getting the Texture2d from a external source?
If the Texture2d is in your project folder, you can change the type btw :)
Sorry if i misunderstood :D (or still misunderstanding, if so can you give more details where you are getting the Texture2d etc.)
It's an asset that creates icon form a 3d model in runtime and save the result into Texture2D inside an Object.
Now I need to convert this Texture 2D to a Texture variable so then I can use it for Unity UI system.
-
I'm still stuck on this! Can somebody please create this action? I mean an action to get Texture2D from object and save inside a Texture variable.
-
Looks like you need to extract the data of the t2d texture into a regular texture type.
Something similar to what is shown here:
What's the aspect of this "object" your plugin creates?
Is it already a uGUI raw image?
In this case data might be extracted in PM with the appropriate action.
Are you sure the texture data is definitely saved as a texture2d?
Oddly, I have a Texture 2D To PNG String action, somehow related to EasySave (that's a plugin) but the file can't be found and there's a path-related error involved there (it's looking for some C:/Projects/... on a Mac).
-
Looks like you need to extract the data of the t2d texture into a regular texture type.
Something similar to what is shown here:
What's the aspect of this "object" your plugin creates?
Is it already a uGUI raw image?
In this case data might be extracted in PM with the appropriate action.
Are you sure the texture data is definitely saved as a texture2d?
Oddly, I have a Texture 2D To PNG String action, somehow related to EasySave (that's a plugin) but the file can't be found and there's a path-related error involved there (it's looking for some C:/Projects/... on a Mac).
Hi. thanks for trying to help. it's a free asset you can't find in the asset store.
https://assetstore.unity.com/packages/tools/camera/runtime-preview-generator-112860
Can you please create a PlayMaker action for this?
-
When you use it, do you at least know where this t2d is saved? Is it put in cache or is turned into a real asset or object you can pick and interact with?
-
When you use it, do you at least know where this t2d is saved? Is it put in cache or is turned into a real asset or object you can pick and interact with?
Please look at below pic. It stores there inside an object variable.
(https://hutonggames.com/playmakerforum/index.php?action=dlattach;topic=21118.0;attach=14661)
-
Sure, you created a FsmObject variable of Texture2D type, but the plugin would not know how to save the t2d into this Playmaker variable.
That's why I am trying to see if the plugin actually produces an element in the scene, game object, asset, else, which you might point to from Playmaker.
Other than that, I'm not sure your problem can be solved. Someone who can code for well might have a clue.
-
Hi. Is there any action to get Texture2D from an object and store inside a texture variable?
I still have this problem! Isn't really a way to get a texture 2D from object variable and save inside a texture variable?