playMaker

Author Topic: Persisting changes back to editor  (Read 2634 times)

Harford

  • Playmaker Newbie
  • *
  • Posts: 6
Persisting changes back to editor
« on: March 02, 2012, 08:30:50 AM »
Is it possible that when we make changes in game view to get them to persist.
Eg - I use game view to shoot rays ( bullets )  at a wall based on certain criteria to get hit patterns.
Then I want those hit patterns to persist back to the editor, so I have my decals now.
I can think of other examples if this isn't clear.
Either it writes object positions/instancing, rotations etc, to a script I can then run in the editor ? Or is simply persists.

Appreciate the help
Thanks

Alex Chouls

  • Administrator
  • Hero Member
  • *****
  • Posts: 4000
  • Official Playmaker Support
    • LinkedIn
Re: Persisting changes back to editor
« Reply #1 on: March 02, 2012, 04:57:40 PM »
You can try pausing the game and creating prefabs from the game objects you want to persist (just drag them into the project view). Then stop the game and drag those prefabs into the scene...

Harford

  • Playmaker Newbie
  • *
  • Posts: 6
Re: Persisting changes back to editor
« Reply #2 on: March 03, 2012, 12:29:23 PM »
Hi Alex,
That would certainly work. I hadn't thought of that.
However there is going to be quite a few ( maybe hundreds ) of objects. I wonder if this can be done a different, more automated way?

Alex Chouls

  • Administrator
  • Hero Member
  • *****
  • Posts: 4000
  • Official Playmaker Support
    • LinkedIn
Re: Persisting changes back to editor
« Reply #3 on: March 03, 2012, 03:23:18 PM »
You could parent all the created objects to a single object (e.g., WorldRoot at 0,0,0), then just drag that one object over. You can then edit that prefab as necessary (e.g., add CombineMeshes, tweak positions, set layers etc.). Unity already has a powerful scene/property editor, so it might be better to use that instead of building an alternate pipeline around text files... But I don't know exactly what you're trying to do either...

Harford

  • Playmaker Newbie
  • *
  • Posts: 6
Re: Persisting changes back to editor
« Reply #4 on: March 03, 2012, 04:31:27 PM »
Those are good ideas Alex, thanks.
I'll try it out, but I'm not quite sure it will suit.

I'm trying to create what would be a simple creation system running inside my game. But I want to save out the created designs to be used in new scenes.
So that's a lot of users creating things - like a kitchen design, and then when they click save, it would put it back to the editor, or into a script for me to run that would let us have that back in unity.

Even though unity has a pretty great system for this, it's an idea that I could create something very customized that runs with post effects and everything animating , etc.. in game. Then I could add buttons and color changers etc.. and we could save it back out.

Appreciate the help so far