playMaker

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

psypol

  • Playmaker Newbie
  • *
  • Posts: 39
    • View Profile
Re: Import TXT file into string at runtime
« Reply #15 on: August 04, 2015, 10:45:10 AM »
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: 14342
  • Official Playmaker Support
    • View Profile
Re: Import TXT file into string at runtime
« Reply #16 on: August 05, 2015, 10:41:30 PM »
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
    • View Profile
Re: Import TXT file into string at runtime
« Reply #17 on: August 06, 2015, 01:14:16 AM »
Hello Jean. I got this action here in this thread (see start of page 1)

edufurla

  • Playmaker Newbie
  • *
  • Posts: 42
    • View Profile
Re: Import TXT file into string at runtime
« Reply #18 on: August 06, 2015, 07: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
    • View Profile
Re: Import TXT file into string at runtime
« Reply #19 on: August 06, 2015, 08: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

  • Playmaker Newbie
  • *
  • Posts: 42
    • View Profile
Re: Import TXT file into string at runtime
« Reply #20 on: August 06, 2015, 10:03:07 AM »
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: 14342
  • Official Playmaker Support
    • View Profile
Re: Import TXT file into string at runtime
« Reply #21 on: August 20, 2015, 10:50:25 AM »
Hi,

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

 Bye,

 Jean

edufurla

  • Playmaker Newbie
  • *
  • Posts: 42
    • View Profile
Re: Import TXT file into string at runtime
« Reply #22 on: August 20, 2015, 12: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: 14342
  • Official Playmaker Support
    • View Profile
Re: Import TXT file into string at runtime
« Reply #23 on: September 14, 2015, 12:17:01 AM »
Hi,

 yep, Googlefu is great indeed
 
Bye,
 Jean