playMaker

Author Topic: Import TXT file into string at runtime  (Read 11045 times)

psypol

  • Playmaker Newbie
  • *
  • Posts: 39
Re: Import TXT file into string at runtime
« Reply #15 on: August 04, 2015, 01:45:10 PM »
Hello

im using unity 4.6.1f1 and i tried to use this script
when i drag&droped the file into the Project i have these errors :

Quote
Assets/external_scripts/ImportTXT.cs(9,2): error CS0246: The type or namespace name `Tooltip' could not be found. Are you missing a using directive or an assembly reference?
+
Quote
Assets/external_scripts/ImportTXT.cs(9,2): error CS0104: `TooltipAttribute' is an ambiguous reference between `UnityEngine.TooltipAttribute' and `HutongGames.PlayMaker.TooltipAttribute'

Any idea how to get rid of those ?
thanks

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: Import TXT file into string at runtime
« Reply #16 on: August 06, 2015, 01:41:30 AM »
Hi,

 This action need to be refactored and put into PlayMaker Action namespace to avoid conflicts with Unity. Where did you get it?

Bye,

 Jean

psypol

  • Playmaker Newbie
  • *
  • Posts: 39
Re: Import TXT file into string at runtime
« Reply #17 on: August 06, 2015, 04:14:16 AM »
Hello Jean. I got this action here in this thread (see start of page 1)

edufurla

  • Junior Playmaker
  • **
  • Posts: 56
Re: Import TXT file into string at runtime
« Reply #18 on: August 06, 2015, 10:45:51 AM »
Hi.
Someone knows how write the path to get a txt file inside my assets folder.
I want publish the project with the txt file included.

psypol

  • Playmaker Newbie
  • *
  • Posts: 39
Re: Import TXT file into string at runtime
« Reply #19 on: August 06, 2015, 11:22:27 AM »
Hi.
Someone knows how write the path to get a txt file inside my assets folder.
I want publish the project with the txt file included.

How did you managed to read the file in the first place ?
+1 on your question cause i'm trying to achieve the same thing.

edufurla

  • Junior Playmaker
  • **
  • Posts: 56
Re: Import TXT file into string at runtime
« Reply #20 on: August 06, 2015, 01:03:07 PM »
If I put the txt file in some place like C:\works\txt\text.txt works fine, but I have to create this exact folder structure when I copy the published project to another computer.
I would like to copy just the published folder, so coud be good find a way this action get the txt file from the assets.

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: Import TXT file into string at runtime
« Reply #21 on: August 20, 2015, 01:50:25 PM »
Hi,

 you can, using Resources and the action ResourcesLoad from the Ecosystem

 Bye,

 Jean

edufurla

  • Junior Playmaker
  • **
  • Posts: 56
Re: Import TXT file into string at runtime
« Reply #22 on: August 20, 2015, 03:33:01 PM »
Thank you for the answer Jean. I will try this for next projects.
I already solve the problem using GoogleFu.
 :)

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: Import TXT file into string at runtime
« Reply #23 on: September 14, 2015, 03:17:01 AM »
Hi,

 yep, Googlefu is great indeed
 
Bye,
 Jean