Quantcast
Channel: Questions in topic: "namespace"
Viewing all articles
Browse latest Browse all 398

Game Foundation: C# "using" namespace error

$
0
0
Hi! I'm trying out Game Foundation and I want to save all the changes that are made in Runtime. So I found this code in the official tutorial: using UnityEngine; using UnityEngine.GameFoundation; public class SaveGame : MonoBehaviour { IDataPersistence localPersistence; void Awake() { // choose what format you want to use JsonDataSerializer dataSerializer = new JsonDataSerializer(); // choose where and how the data is stored localPersistence = new LocalPersistence(dataSerializer); // tell Game Foundation to initialize using this // persistence system. Only call Initialize once per session. GameFoundation.Initialize(localPersistence); } public void Save() { GameFoundation.Save(localPersistence); } public void Load() { GameFoundation.Load(localPersistence); } } But I'm having this problem: ![alt text][1] [1]: /storage/temp/172228-безымянныи.png Any help will be appreciated!

Viewing all articles
Browse latest Browse all 398

Trending Articles