Por razones, necesito usar PowerShell para obtener información sobre la IP de la computadora. Por lo tanto, intenté usar System.Management.Automation junto con NugetForUnity, pero VS sigue diciendo que The type or namespace name 'Automation' does not exist in the namespace 'System.Management' (are you missing an assembly reference?) Lo sé por un hecho que he instalado el paquete, pero no he llegado a ninguna parte con este proyecto durante las últimas 4 horas. ¿Alguien tiene algún consejo? Aquí está mi código:
using System.Management.Automation; using System.Collections; using System.Collections.Generic; using UnityEngine; public class getLocation : MonoBehaviour { // Start is called before the first frame update void Start() { //https://www.codeproject.com/Questions/1206308/Powershell-commands-from-Csharp //Modified by @alex#6555 using (var ps = PowerShell.Create()) { ps.AddCommand("curl"); ps.AddArgument("ipinfo.io"); } } // Update is called once per frame void Update() { } }Si alguien sabe qué hacer, algunos consejos serían muy apreciados.