Unity, Save transform values in play mode script.

edited in Projects
Hi
Before sharing this on the unity forums I wanted to find out if any of you guys would find it useful (also I like you guys more than those "off-shore-ers").

It's kind of like doing a "copy component values" in play mode to keep the way you transformed your object during play mode after you go back into edit mode BUT it lets you save the positions for multiple Transforms.

I've been finding it very useful while in play mode to attach a trail rendered to the player, jump like madman, press pause and then place collectable items along the jump arcs.

Like I say if you find this useful, let me know so I can share it with the rest of the world.

You can get the code and instructions at (it's just some simple copy and pasting):
https://gist.github.com/mushutehk/6636510

Lastly, thanks to SIJO for letting me release this into the wild, yaaaaaaaay!

Comments

  • @Mushu said:
    I've been finding it very useful while in play mode to attach a trail rendered to the player, jump like madman, press pause and then place collectable items along the jump arcs.
    Hah! Sarcasm win :D ^5
  • edited
    I think there is already something like this on the Unity store? (that doesn't mean that a better, more useable, one isn't going to be useful)

    Unless I was somehow looking at your script? (I know I've seen a script that does this before)
  • @BlackShipsFillTheSky AFAIK the one on the asset store costs $5 where this one is free. If you have (or can find) the link to the script you're talking about please give me the link coz I couldn't find a decent free one.
  • @dislekcia Ha yeah that was pretty much the case till I got that script working XD
  • @mushu hi, i think ive found what ive been looking for! ive been trying to find a code where i can save the gameobject's transform position when it moves during playmode. A few questions tho, after copying the codes, how do i use them? do i have to attached the script to something?
  • "Playmode persist" on the store. Apparently it's on the native todo list for Unity.
Sign In or Register to comment.