UnityGame/Library/PackageCache/com.unity.multiplayer.center/Editor/Questionnaire/QuestionnaireObject.cs

29 lines
851 B
C#
Raw Normal View History

2024-10-27 10:53:47 +03:00
using System;
using UnityEditor;
using UnityEngine;
namespace Unity.Multiplayer.Center.Questionnaire
{
/// <summary>
/// The questionnaire scriptable object, used to store and edit the data
/// </summary>
[FilePath("Packages/com.unity.multiplayer.center/Editor/Questionnaire/Questionnaire.questionnaire", FilePathAttribute.Location.ProjectFolder)]
internal class QuestionnaireObject : ScriptableSingleton<QuestionnaireObject>
{
public QuestionnaireData Questionnaire;
public void ForceReload()
{
DestroyImmediate(QuestionnaireObject.instance);
var questions = QuestionnaireObject.instance.Questionnaire;
}
public void ForceSave()
{
base.Save(saveAsText:true);
AssetDatabase.Refresh();
}
}
}