Yes, if your movement method is First Person, then the First Person camera is switched to automatically during gameplay.
A note about switching movement method, though: as this is a field in the Settings Manager, changes made to it at runtime will survive the ending of Play Mode. Therefore, you'll need to set this to your intended initial value when the game begins.
This can most easily be done by assigning an "ActionList on start game" asset file at the top of the Settings Manager, containing an "Engine: Manage systems" Action to handle the change.
Yes. It's a bit more tricky than the tutorial, as you'll have to use AC's AssetLoader class to handle the conversion between the texture asset and a save-able string. This ought to do it, though:
using UnityEngine;
namespace AC
{
[RequireComponent (typeof (BackgroundImage))]
public class RememberBackgroundImage : Remember
{
public override string SaveData ()
{
BackgroundImageData data = new BackgroundImageData();
data.objectID = constantID;
data.savePrevented = savePrevented;
BackgroundImage backgroundImage = GetComponent<BackgroundImage> ();
data.textureID = AssetLoader.GetAssetInstanceID (backgroundImage.backgroundTexture);
return Serializer.SaveScriptData <BackgroundImageData> (data);
}
public override void LoadData (string stringData)
{
BackgroundImageData data = Serializer.LoadScriptData <BackgroundImageData> (stringData);
if (data == null) return;
SavePrevented = data.savePrevented; if (savePrevented) return;
BackgroundImage backgroundImage = GetComponent<BackgroundImage> ();
backgroundImage.backgroundTexture = AssetLoader.RetrieveAsset (backgroundImage.backgroundTexture, data.textureID);
}
}
[System.Serializable]
public class BackgroundImageData : RememberData
{
public string textureID;
public BackgroundImageData () { }
}
}
This'll require associated textures to follow the Resources save rule outlined in the Manual's "Saving asset references" chapter.
Comments
I'm so sorry. My bad. I forgot to switch the movement method. There is no any problem.
Yes, if your movement method is First Person, then the First Person camera is switched to automatically during gameplay.
A note about switching movement method, though: as this is a field in the Settings Manager, changes made to it at runtime will survive the ending of Play Mode. Therefore, you'll need to set this to your intended initial value when the game begins.
This can most easily be done by assigning an "ActionList on start game" asset file at the top of the Settings Manager, containing an "Engine: Manage systems" Action to handle the change.
Thank you, Chris! And I have one more question. Is it real to change a background image for the 25D Game Camera some way?
You can change a BackgroundImage's texture by calling its SetImage function in a custom script.
Yes. It's a bit more tricky than the tutorial, as you'll have to use AC's AssetLoader class to handle the conversion between the texture asset and a save-able string. This ought to do it, though:
This'll require associated textures to follow the Resources save rule outlined in the Manual's "Saving asset references" chapter.
Okay! Thanks a lot, Chris!