Forum rules - please read before posting.

Saving Camera data

Hey,

I wanted to ask, where should I look for code that saves which camera is attached to the main? I want to save some of my own extended data on attached camera, and this instead of custom remember script seemed like a good place to inject the code.

Thanks.

Comments

  • The active camera is stored as an integer variable inside the PlayerData class, inside MainData.cs.

    If you're looking for a way to inject code upon saving, see the related events in the EventManager class.  A tutorial on custom events can be found here.
  • Thanks, the code I'm looking to inject is to add some more saved data related to that specific camera (the data is from my custom class that is attached to the same game object as _Camera), but the data needs to be saved only for the camera that is currently attached, not others so writing a Remember style extension for each _Camera is unnecessary. Anyway, thanks for the guidlines. I'll check those places out. 
Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Welcome to the official forum for Adventure Creator.