A.cs 467 B

1234567891011121314151617181920212223
  1. using System.Collections;
  2. using System.Collections.Generic;
  3. using UnityEngine;
  4. using pkpy;
  5. public class A : MonoBehaviour
  6. {
  7. // Start is called before the first frame update
  8. void Start()
  9. {
  10. var vm = new pkpy.VM();
  11. vm.exec("print('Hello world')");
  12. PyOutput o = vm.read_output();
  13. Debug.Log(o.stdout.Trim());
  14. //Debug.Log(o.stderr);
  15. }
  16. // Update is called once per frame
  17. void Update()
  18. {
  19. }
  20. }