playMaker

Author Topic: Using an outside folder  (Read 1340 times)

Sly

  • Full Member
  • ***
  • Posts: 111
    • View Profile
Using an outside folder
« on: June 23, 2015, 07:18:44 AM »
Hello,

I'm wondering if it's possible to use an outside folder from project in playmaker.

For example, I want the user to be able to add picture in a folder, and playmaker will choose randomly a picture inside this folder. Is it possible?

FritsLyn

  • Full Member
  • ***
  • Posts: 191
    • View Profile
Re: Using an outside folder
« Reply #1 on: June 23, 2015, 12:06:20 PM »
I'm not 100% sure I understand you - but if I do, then I think yo'd want to look into Unity's limitations, and how things (mostly) needs to be inside of the Assets folder.

As I understand you, this is not a PlayMaker related question, but a general Unity question.

Anyway, IF you have a folder that is acessible by Unity in Playtime, then surely, it's not a problem to have PlayMaker handle the rest..

I hope this helps you a little further ;)

Sly

  • Full Member
  • ***
  • Posts: 111
    • View Profile
Re: Using an outside folder
« Reply #2 on: June 23, 2015, 01:40:49 PM »
It's both I guess. For sure yes, you're right, unity itself needs to handle "open folder" outside a project folder.

But for now I'm just wondering if Playmaker can take random item (like picture) from a folder.
For example, I want to choose a random picture from my folder and draw it on an in game object.
That's probably the thing I need to know on Playmaker side.

Thanks for your remark FritsLyn!

Lane

  • Administrator
  • Hero Member
  • *****
  • Posts: 2488
  • Yup.
    • View Profile
    • Cleverous
Re: Using an outside folder
« Reply #3 on: June 23, 2015, 01:53:21 PM »
Yep, use the WWW action.

Look around for WWW info on Unity answers and such for information on giving it the correct path name so it looks on the drive.

Sly

  • Full Member
  • ***
  • Posts: 111
    • View Profile
Re: Using an outside folder
« Reply #4 on: June 25, 2015, 06:28:59 AM »
Thanks Lane! I was thinking the www action was only use for url, but it make sense!

So basically the path needed should be the following:

OSX: "file:///Users/..."
Windows: "file:///c://Users/..."

Lane

  • Administrator
  • Hero Member
  • *****
  • Posts: 2488
  • Yup.
    • View Profile
    • Cleverous
Re: Using an outside folder
« Reply #5 on: June 25, 2015, 06:43:59 AM »
Yeah, theres also built in shortcuts in windows/unity like %ApplicationPath% and others you can use to target specific folders like the current logged in user's photo folders etc, look into those. They're wrapped in % signs.