Playmaker Forum
PlayMaker News => General Discussion => Topic started by: edufurla on September 04, 2015, 08:31:26 PM
-
Is there any way lo load a texture (or sprite) from a specified folder (to a texture/sprite variable) without codding? (image file not inside the assets folder)
I found a lot of examples in internet but I do not understand C#.
I also found some questions about that in this forum, but did't find a solution.
If there is not, would be great if someone make an action to that.
Thx
-
Hi,
It's called inside Unity "Resources", it's folder from where Assets can be loaded at runtime without any hardcoded binding when editing.
you'll find everything here:
http://hutonggames.com/playmakerforum/index.php?topic=3916.0
The action ResourcesLoad (https://github.com/jeanfabre/PlayMakerCustomActions_U3/blob/master/Assets/PlayMaker%20Custom%20Actions/Resources/ResourcesLoad.cs) is also on the Ecosystem (http://j.mp/1Esn1mF)
Bye,
Jean
-
Hi Jean.
I need to load textures and sprites outside the resourses folder.
Using "c:\textures" for example.
Something like the existing action "loadfromfile" that work with string, but working with texture and sprite.
-
Hi,
ah ok, I see.
try these links, explaning how to use the WWW to get it.
http://answers.unity3d.com/questions/813495/can-i-load-textures-outside-the-resources-folder.html
so here use the regular WWWObject action, it's the url path that will make this happen.
Bye,
Jean
-
Hi Jean.
Thats really worked. Thank you.
In this example, for a texture called fur02.png, the path will be:
file://C:/textures/fur02.png
Any ideas to load a sprite? This action has only text, texture and movie texture.
-
Hi,
For this I made recently (http://hutonggames.com/playmakerforum/index.php?topic=10978.msg51956#msg51956) an action to load a sprite from www:
wwwSprite (https://github.com/jeanfabre/PlayMakerCustomActions_U4/blob/master/Assets/PlayMaker%20Custom%20Actions/Sprite/WWWSprite.cs)
You can get it from the Ecosystem (http://j.mp/1Esn1mF).
Bye,
Jean
-
Hi Jean.
That's works great.
Thank you.