daterre / Cradle

Play Twine stories in Unity.
MIT License
298 stars 32 forks source link

Can't import stories! #12

Closed jamoody closed 8 years ago

jamoody commented 8 years ago

Hi!

I'm brand new to unity and C# and I'm super excited to use UnityTwine for the game I'm working on! It looks amazing!

But no matter what I do I can't get my stories to import at C# scripts. I (think) I've followed the instructions to the letter for both Twine 2 and Twine 1.4 but no matter what I try they keep showing up as text files instead of C# scripts.

Any idea what I might be doing wrong?

Basically, what I've done is download UnityTwine into a folder on my desktop, start a new project in Unity 5, create a folder for the Unity Twine Assets in my project, drag the UnityTwine stuff into that folder in Unity, and then follow the instructions for importing a story to the letter. Nothing seems to work!

Any help would be great appreciated. Looking forward to be able to start using your very cool tool!

Thanks!

jamoody commented 8 years ago

P.S. I'm not exaggerating when I say I'm BRAND new to this, so apologies if I'm doing something completely lame-brained. Maybe I just need someone to explain it like I'm five!

daterre commented 8 years ago

Hi, no worries! The UnityTwine folder needs to be added to the Assets/Plugins folder, otherwise it won't work. Let me know if that fixes it.

jamoody commented 8 years ago

Thank you so much for the quick reply!!

So....this is where we get to the explain it like I'm five part...

When I start a new unity project there is no assets folder. I've tried making one in the project and putting the files from the unity twine zip in that folder and it didn't work.

I also looked for an "assets" folder in the unity folder on my hard drive and there was none. There was a folder called "standard assets" which I tried putting the unitytwine files in, but when I started a new project the unitytwine files were not available at the outset and I had to copy them into the project and it didn't work.

Do I need any other assets imported into my project?

I tried importing everything from "standard assets" into a new project and then adding the unitytwine files but that didn't work either.

Clearly I'm messing up something SO basic here...

Sorry I'm having such a hard time with this! Thanks so much for your help!!

On Mar 31, 2016, at 9:42 AM, D. A. Terre notifications@github.com wrote:

Hi, no worries! The UnityTwine folder needs to be added to the Assets/Plugins folder, otherwise it won't work. Let me know if that fixes it.

— You are receiving this because you authored the thread. Reply to this email directly or view it on GitHub

daterre commented 8 years ago

Sure! Okay, here's how a Unity project folder should look on your hard drive (this will be the folder you chose when you created the project):

The Assets folder is where everything related to the project will go. This is also the root folder in the Project tab inside Unity, when the project is open in the editor (the other folders such as Library etc. don't appear in the editor).

Now, you might have a few folders inside the Assets folder (such as Standard Assets you mentioned). The only one we care about is a folder called Plugins. If it's not there, create it. Once you do that, drop the UnityTwine folder in there. So, to recap, this is how your project's folder should look:

Hope that helps... Unity is great but very picky when it comes to folder structure.

jamoody commented 8 years ago

Thanks again for being so responsive and helping out!!

Making some progress. Made a plugins folder, dropped the unity twine folder in there.

Now when I drag a twee file exported from unity 2 it gets imported as a text file AND unity creates a new c# script with the same name.

Unfortunately I can't add that script to the prefab twine player as a story.

Does that sound familiar? Hopefully we're zeroing in on what's going wrong. This seems like the right direction.

Twee files exported from twine 1.4 still just import as text.

Thanks again so much for your help. On Mar 31, 2016 3:16 PM, "D. A. Terre" notifications@github.com wrote:

Sure! Okay, here's how a Unity project folder should look: Assets Library ProjectSettings Temp

The Assets folder is where everything related to the project will go. This is also the root folder in the Project tab inside Unity, when the project is open in the editor (the other folders such as Library etc. don't appear in the editor).

Now, you might have a few folders inside the Assets folder (such as Standard Assets you mentioned). The only one we care about is a folder called Plugins. If it's not there, create it. Once you do that, drop the UnityTwine folder in there. So, to recap, this is how your projects folder should look:

Assets

  • Plugins
    • UnityTwine
  • Library ProjectSettings etc.

Hope that helps... Unity is great but very picky when it comes to folder structure.

— You are receiving this because you authored the thread. Reply to this email directly or view it on GitHub https://github.com/daterre/UnityTwine/issues/12#issuecomment-204086089

daterre commented 8 years ago

You're on the right track. You now need to drag the TwineTextPlayer prefab into your scene, and then add the generated script to the prefab. That'll do the trick. Do get the Unity basics down though before you start messing around ;)

jamoody commented 8 years ago

Ok. I have a feeling this will be the last step!!

Already tried adding the script to the prefab in my scene and I get an error that says it can't add script component because the script class cannot be found.

Oddly if you play the scene without any story attached to the player, and then stop playing you can THEN add the newly imported script as a component on TwineTextPlayer or its children background and ScrollView.

What's weird is that it didn't load the script into the public variable "story" visible from the inspector in the TwineTextPlayer script. If I click on the circle next to that variable it gives the the option of choosing any game object that my story script is attached to. But rather than just set my story as the variable it sets the whole game object in that field with my story script in parentheses.

When Play the scene I get an error that it the passage it was designated to start at does not exist. I checked to make sure everything was named appropriately in the story and the script component and that not the issue. . I'm assuming it's happening because it's got a game object as its story variable and not the story script. I've tried everything I can think of to get the script into that variable by itself, and I've also tried attaching the story script to a variety of game objects (including an empty one) to see if that made a difference.

I'm so close!!!

Any thoughts.

On Mar 31, 2016, at 5:39 PM, D. A. Terre notifications@github.com wrote:

You're on the right track. You now need to drag the TwineTextPlayer prefab into your scene, and then add the generated script to the prefab. That'll do the trick. Do get the Unity basics down though before you start messing around ;)

— You are receiving this because you authored the thread. Reply to this email directly or view it on GitHub

daterre commented 8 years ago

Hey, Well, this behavior is normal:

But rather than just set my story as the variable it sets the whole game object in that field with my story script in parentheses.

It actually means you're set up correctly. I'm more confused about the Script story not existing. Do you have any errors in the console? Here are a few reasons:

Please note that if you do have errors in the console, delete the generated script before trying any renaming / reimporting.

jamoody commented 8 years ago

Thanks!!

I'll double check all of that! On Apr 3, 2016 7:42 AM, "D. A. Terre" notifications@github.com wrote:

Hey, Well, this behavior is normal:

But rather than just set my story as the variable it sets the whole game object in that field with my story script in parentheses.

It actually means you're set up correctly. I'm more confused about the Script story not existing. Do you have any errors in the console? Here are a few reasons:

  • The .twee file name must be a valid C# class name - that means, only letters/number/underscore, no spaces or other characters.
  • You must not rename the generated script file, that can confuse Unity.

Please note that if you do have errors in the console, delete the generated script before trying any renaming / reimporting.

— You are receiving this because you authored the thread. Reply to this email directly or view it on GitHub https://github.com/daterre/UnityTwine/issues/12#issuecomment-204948955

johnbourne commented 8 years ago

jamoody: I am still having problems following all the directions provided. Did you finally have success? When I first tried unitytwine out - I could get the snoozing story to work; now with the latest version, I cannot get it to work - I get the message: "Text player does not have a story to play. Add a story script to the text player game object, or assign the Story variable of the text player." I drag the .twee file into the story slot in the TextPlayer, but it doesn't accept it. It would educationally helpful if the scene would work correcting when loaded... but I could figure how to get it to work in this version. Do you have a list of steps you took to get a working example (snoozing)....

JRBOURNE

daterre commented 8 years ago

Are you using the released (zip) version, or did you download the source from GitHub? Because the source is unstable and in still in development. You should only you use the release. If you want to, you can send me your project and I'll see what's going on there.

johnbourne commented 8 years ago

Thanks .. yes, I was using the zip file from github, - in the hopes that I could use Harlowe now. I’ll wait until the development is complete to try again.

John R. Bourne, Ph.D Editor-in-Chief, International Journal on Innovation in Online Education

On Tue, Apr 12, 2016 at 1:29 AM, D. A. Terre notifications@github.com wrote:

Are you using the released (zip) version, or did you download the source from GitHub? Because the source is unstable and in still in development. You should only you use the release. If you want to, you can send me your project and I'll see what's going on there.

Doron Assayas Terre interactive • storytelling • code

web: daterre.com http://daterre.com/ twitter: @tonicwoods https://twitter.com/tonicwoods

http://www.lofipeople.com/

On Mon, Apr 11, 2016 at 10:55 PM, johnbourne notifications@github.com wrote:

jamoody: I am still having problems following all the directions provided. Did you finally have success? When I first tried unitytwine out - I could get the snoozing story to work; now with the latest version, I cannot get it to work - I get the message: "Text player does not have a story to play. Add a story script to the text player game object, or assign the Story variable of the text player." I drag the .twee file into the story slot in the TextPlayer, but it doesn't accept it. It would educationally helpful if the scene would work correcting when loaded... but I could figure how to get it to work in this version. Do you have a list of steps you took to get a working example (snoozing)....

JRBOURNE

— You are receiving this because you commented. Reply to this email directly or view it on GitHub https://github.com/daterre/UnityTwine/issues/12#issuecomment-208529693

— You are receiving this because you commented. Reply to this email directly or view it on GitHub https://github.com/daterre/UnityTwine/issues/12#issuecomment-208728997

daterre commented 8 years ago

Cradle (UnityTwine version 2) including Harlowe support is now in final beta testing before release.

johnbourne commented 7 years ago

I've been following the comments on this forum and looking forward to the release of Cradle. I'm wondering if it will be a long wait?

daterre commented 7 years ago

Hi, thanks for checking in :) The truth is that Cradle has been stable for quite some time, and is pretty much ready for release. It is in use in multiple projects and feedback has been very positive. The main obstacle at the moment is my available time - I am working towards a release of a game based on Cradle, due out in the summer. So I expect to have time for an Asset Store release around September.

Other than several small bug fixes, the main thing left to do before release is restructuring the GitHub repo to allow for cloning into an existing project (either directly or as a Git submodule).

johnbourne commented 7 years ago

Thanks for the reply! I would be interested in trying out a prerelease of Cradle if it is available. I see the earlier releases here on github, but don't know how to secure the current stable release. I'd love to try it.....

John