- Home /
How to transfer back to original scene and animation
I hate asking questions like this. I hate asking these question because I know if I asked them correctly in Google, I'd find the answer, or if I knew the proper terminology I could find what I'm looking for via the documentation. But alas, I don't. Sorry :( For the sake of not clogging up the answers section, I'm consolidating both questions into one post. The first is this: I'm making an RPG. There is a world scene, building scenes, town scenes, cave scenes, etc. I know to transfer to a scene I use "Application.Loadlevel" but what about transferring back? The way I understand it right now, I'd be right back to the beginning of the world map, with no stats, items, etc. If someone can even point me in the right direction of a tutorial I'd be so thankful. Second is animation. I hit such a brick wall on this, because I'm just not grasping it. I watched tutorial after tutorial video on Youtube of moving items around, and I get how to get something from point A to point B, but let's say I'm trying to animate an NPC human. How do I do that? I imported some .anim files like "walking, running, etc." but can I apply them to my 3d models, or is it not as simple as that? One tutorial showed a 3d model being configured directly in Unity, not an outside program like blender, using "bones, joints," etc., and looked incredibly easy, but I don't see anything that remotely looks like that in mine, so I'm wondering if that sort of thing isn't available in the free version. Thanks so much, everyone, for your patience with this noob. God bless.
Answer by sparkzbarca · Aug 29, 2013 at 09:42 PM
as to switching back and forth you actually save the game state and then load that saved state.
What your going to want to google is level serialization.
there are free options out there I believe (i know there are free options i'm just not sure on the status as far as when last updated etc)
WhyDoIDoIt for example (a common contributor on here) has a free version.
so yea thats how you solve that.
animations pretty much yea they just can be applied. Assuming your generic bipedal model properly rigged and all you basically just drop the animation onto it and then call the animation and loop it.
I guess youtube up some mechanim tutorials.
I have been doing game design but i'm making a space combat thing so i've not had any need yet for animations really. But mechanim is pretty much trying really hard to automate stuff and make it all but drag and drop and it works as long as the model is good.
as I was thinking about it just a $$anonymous$$ute ago I was thinking something like a savestate/loadstate thing. This wouldn't be nearly as easy as something like "Application.Savestate" would it? Oh, that would be so cool. Thanks for your advice, I'm going to start searching.
EDIT: Oh goodness. I downloaded Unity Serializer (and have looked up level serialization) and am completely in over my head. $$anonymous$$eeping player position when transferring scenes can't really be this involved and complex, can it?
there really is alot to track and yea i kinda think it is, i'm going to have to use it soon so I guess i'm about to find out but yea i mean tracking every objects position and rotation and any components attached to that object and the state of that component ( active/disabled, the value of any variables in that class etc)
I mean your basically saving every instance of every class in the game and when you consider that gameobject is a class, and all compoennts like transform,rigidbody, renderer any custom classes etc are all there, that's alot to save and you need to do it without creating a 1 gig file.
Ok, I have no idea at all if this is going to help, but... I found an "RPG Starter $$anonymous$$it" via youtube: HERE but after downloading it there are no tutorials, documentation, anything, just script after script. I know I'm just a dumb noob here, am just hoping someone would be kind enough to explain how to use it so I can get past this one issue I'm having. Thanks :)
Your answer
![](https://koobas.hobune.stream/wayback/20220613113229im_/https://answers.unity.com/themes/thub/images/avi.jpg)