private void Awake() { MessageBoxFactory = new UIMessageBoxFactory(); // Load the message box config for bad name TextAsset configAsset = Resources.Load <TextAsset>(OPEN_BAD_NAME_MESSAGE_BOX_CONFIG_RESOURCE); Assert.IsNotNull(configAsset); OpenBadNameMessageBoxConfig = JsonUtility.FromJson <MessageBoxConfig>(configAsset.text); // Load the message box config for no file configAsset = Resources.Load <TextAsset>(OPEN_NO_FILE_MESSAGE_BOX_CONFIG_RESOURCE); Assert.IsNotNull(configAsset); OpenNoFileMessageBoxConfig = JsonUtility.FromJson <MessageBoxConfig>(configAsset.text); }
private void Awake() { MessageBoxFactory = new UIMessageBoxFactory(); // Load the message box config for save overwrite TextAsset configAsset = Resources.Load <TextAsset>(SAVE_OVERWRITE_MESSAGE_BOX_CONFIG_RESOURCE); Assert.IsNotNull(configAsset); SaveOverwriteMessageBoxConfig = JsonUtility.FromJson <MessageBoxConfig>(configAsset.text); // Load the message box config for bad name configAsset = Resources.Load <TextAsset>(SAVE_BAD_NAME_MESSAGE_BOX_CONFIG_RESOURCE); Assert.IsNotNull(configAsset); SaveBadNameMessageBoxConfig = JsonUtility.FromJson <MessageBoxConfig>(configAsset.text); }