在远程计算机上运行时,invoke-command无法找到文件

时间:2016-02-04 02:09:51

标签: powershell powershell-v3.0 powershell-remoting

![错误信息图片] [1]

脚本在本地计算机上运行正常。当尝试在远程计算机上运行时,它无法读取位于脚本当前目录中的config.xml文件。  这是我的代码:

--GameManager.cs

public class GameManager : MonoBehaviour{
    [SerializeField] private CreatureDatabase creatureDatabase;
    private Creature SummonMoonDancer(){
        CreatureData creatureData;
        bool success = creatureDatabase.CreatureDatabaseDictionary.TryGetValue(typeof(Creature_MoonDancer), out creatureData);
        if(success == false){
            Debug.LogError("Tried summoning MoonDancer when creature database did not have a typeof(MoonDancer) key");
        }
        else{
            return new Creature_MoonDancer(creatureData), Player.GetInt("NumberOfMoonorbsInPlayersPouch");
        }

    }
}

[1]:http://i.stack.imgur.com/shEyg.jpg 强文

0 个答案:

没有答案