playMaker

Author Topic: Load Texture from custom folder[SOLVED]  (Read 3104 times)

edufurla

  • Playmaker Newbie
  • *
  • Posts: 42
    • View Profile
Load Texture from custom folder[SOLVED]
« on: September 04, 2015, 05: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
« Last Edit: September 09, 2015, 01:11:19 AM by jeanfabre »

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 14388
  • Official Playmaker Support
    • View Profile
Re: Load Texture from custom folder
« Reply #1 on: September 09, 2015, 01:11:05 AM »
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 is also on the Ecosystem

 Bye,

 Jean

edufurla

  • Playmaker Newbie
  • *
  • Posts: 42
    • View Profile
Re: Load Texture from custom folder[SOLVED]
« Reply #2 on: September 09, 2015, 05:00:34 AM »
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.

« Last Edit: September 09, 2015, 05:02:26 AM by edufurla »

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 14388
  • Official Playmaker Support
    • View Profile
Re: Load Texture from custom folder[SOLVED]
« Reply #3 on: September 09, 2015, 06:11:58 AM »
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


edufurla

  • Playmaker Newbie
  • *
  • Posts: 42
    • View Profile
Re: Load Texture from custom folder[SOLVED]
« Reply #4 on: September 09, 2015, 06:26:42 AM »
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.

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 14388
  • Official Playmaker Support
    • View Profile
Re: Load Texture from custom folder[SOLVED]
« Reply #5 on: September 09, 2015, 10:04:09 AM »
Hi,

 For this I made recently an action to load a sprite from www:

wwwSprite

You can get it from the Ecosystem.

Bye,

 Jean

edufurla

  • Playmaker Newbie
  • *
  • Posts: 42
    • View Profile
Re: Load Texture from custom folder[SOLVED]
« Reply #6 on: September 10, 2015, 07:39:19 AM »
Hi Jean.
That's works great.
Thank you.