Hello,
I need to get the username in order to save data with the action "Write to file" to a specific location. I dind't found any way to set a location not specific to my computer.
I made a custom action but it doesn't works :
using System;
using UnityEngine;
namespace HutongGames.PlayMaker.Actions
{
[ActionCategory(ActionCategory.Application)]
[Tooltip("Save the UserName in a string, useful to save data")]
public class SaveUserName : FsmStateAction
{
[RequiredField]
[UIHint(UIHint.Variable)]
[Tooltip("Store the final String in a variable.")]
public FsmString storeResult;
void DoBuildPath()
{
string result = System.Security.Principal.WindowsIdentity.GetCurrent().Name; ;
storeResult.Value = result;
}
}
}
Can you help me with it ?