{"action":"reopened","issue":{"url":"https://api.github.com/repos/Scorr/RetroUnity/issues/4","repository_url":"https://api.github.com/repos/Scorr/RetroUnity","labels_url":"https://api.github.com/repos/Scorr/RetroUnity/issues/4/labels{/name}","comments_url":"https://api.github.com/repos/Scorr/RetroUnity/issues/4/comments","events_url":"https://api.github.com/repos/Scorr/RetroUnity/issues/4/events","html_url":"https://github.com/Scorr/RetroUnity/issues/4","id":148777065,"number":4,"title":"GameManager error in unity3d 5.3.4","user":{"login":"supneo","id":13104673,"avatar_url":"https://avatars.githubusercontent.com/u/13104673?v=3","gravatar_id":"","url":"https://api.github.com/users/supneo","html_url":"https://github.com/supneo","followers_url":"https://api.github.com/users/supneo/followers","following_url":"https://api.github.com/users/supneo/following{/other_user}","gists_url":"https://api.github.com/users/supneo/gists{/gist_id}","starred_url":"https://api.github.com/users/supneo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/supneo/subscriptions","organizations_url":"https://api.github.com/users/supneo/orgs","repos_url":"https://api.github.com/users/supneo/repos","events_url":"https://api.github.com/users/supneo/events{/privacy}","received_events_url":"https://api.github.com/users/supneo/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2016-04-15T21:45:25Z","updated_at":"2016-04-15T23:29:01Z","closed_at":null,"body":"Error\tCS0103\tThe name 'File' does not exist in the current context\r\n\r\nGameManager.cs Old Error:\r\n\r\n```\r\nusing UnityEngine;\r\n\r\npublic class GameManager : MonoBehaviour {\r\n\r\n    private const string CoreName = \"snes9x_libretro.dll\";\r\n    private const string RomName = \"Chrono Trigger (USA).sfc\";\r\n    private LibretroWrapper.Wrapper wrapper;\r\n\r\n    public Renderer Display;\r\n\r\n    private void Start() {\r\n        Application.targetFrameRate = 60;\r\n        LoadRom(Application.streamingAssetsPath + \"/\" + RomName);\r\n    }\r\n\r\n    private void Update() {\r\n        if (wrapper != null) {\r\n            wrapper.Update();\r\n        }\r\n        if (LibretroWrapper.tex != null) {\r\n            Display.material.mainTexture = LibretroWrapper.tex;\r\n        }\r\n\r\n        // debug input\r\n        //if (Input.GetButton(\"B\")) Debug.Log(\"B\");\r\n        //if (Input.GetButton(\"Y\")) Debug.Log(\"Y\");\r\n        //if (Input.GetButton(\"SELECT\")) Debug.Log(\"SELECT\");\r\n        //if (Input.GetButton(\"START\")) Debug.Log(\"START\");\r\n        //if (Input.GetAxisRaw(\"DpadX\") >= 1.0f) Debug.Log(\"UP\");\r\n        //if (Input.GetAxisRaw(\"DpadX\") <= -1.0f) Debug.Log(\"DOWN\");\r\n        //if (Input.GetAxisRaw(\"DpadY\") >= 1.0f) Debug.Log(\"RIGHT\");\r\n        //if (Input.GetAxisRaw(\"DpadY\") <= -1.0f) Debug.Log(\"LEFT\");\r\n        //if (Input.GetButton(\"A\")) Debug.Log(\"A\");\r\n        //if (Input.GetButton(\"X\")) Debug.Log(\"X\");\r\n        //if (Input.GetButton(\"L\")) Debug.Log(\"L\");\r\n        //if (Input.GetButton(\"R\")) Debug.Log(\"R\");\r\n\r\n    }\r\n\r\n    public void LoadRom(string path) {\r\n#if !UNITY_ANDROID\r\n        // Doesn't work on Android because you can't do File.Exists in StreamingAssets folder.\r\n        // Should figure out a different way to perform check later.\r\n        // If the file doesn't exist the application gets stuck in a loop.\r\n        if (!File.Exists(path)) {\r\n            Debug.LogError(path + \" not found.\");\r\n            return;\r\n        }\r\n#endif\r\n        Display.material.color = Color.white;\r\n\r\n        wrapper = new LibretroWrapper.Wrapper(Application.streamingAssetsPath + \"/\" + CoreName);\r\n\r\n        wrapper.Init();\r\n        wrapper.LoadGame(path);\r\n    }\r\n}\r\n\r\n```\r\nGameManager.cs New Fixed :\r\n\r\n```\r\nusing System.IO;\r\nusing UnityEngine;\r\n\r\npublic class GameManager : MonoBehaviour {\r\n\r\n    private const string CoreName = \"snes9x_libretro.dll\";\r\n    private const string RomName = \"Chrono Trigger (USA).sfc\";\r\n    private LibretroWrapper.Wrapper wrapper;\r\n\r\n    public Renderer Display;\r\n\r\n    private void Start() {\r\n        Application.targetFrameRate = 60;\r\n        LoadRom(Application.streamingAssetsPath + \"/\" + RomName);\r\n    }\r\n\r\n    private void Update() {\r\n        if (wrapper != null) {\r\n            wrapper.Update();\r\n        }\r\n        if (LibretroWrapper.tex != null) {\r\n            Display.material.mainTexture = LibretroWrapper.tex;\r\n        }\r\n\r\n        // debug input\r\n        //if (Input.GetButton(\"B\")) Debug.Log(\"B\");\r\n        //if (Input.GetButton(\"Y\")) Debug.Log(\"Y\");\r\n        //if (Input.GetButton(\"SELECT\")) Debug.Log(\"SELECT\");\r\n        //if (Input.GetButton(\"START\")) Debug.Log(\"START\");\r\n        //if (Input.GetAxisRaw(\"DpadX\") >= 1.0f) Debug.Log(\"UP\");\r\n        //if (Input.GetAxisRaw(\"DpadX\") <= -1.0f) Debug.Log(\"DOWN\");\r\n        //if (Input.GetAxisRaw(\"DpadY\") >= 1.0f) Debug.Log(\"RIGHT\");\r\n        //if (Input.GetAxisRaw(\"DpadY\") <= -1.0f) Debug.Log(\"LEFT\");\r\n        //if (Input.GetButton(\"A\")) Debug.Log(\"A\");\r\n        //if (Input.GetButton(\"X\")) Debug.Log(\"X\");\r\n        //if (Input.GetButton(\"L\")) Debug.Log(\"L\");\r\n        //if (Input.GetButton(\"R\")) Debug.Log(\"R\");\r\n\r\n    }\r\n\r\n    public void LoadRom(string path) {\r\n#if !UNITY_ANDROID\r\n        // Doesn't work on Android because you can't do File.Exists in StreamingAssets folder.\r\n        // Should figure out a different way to perform check later.\r\n        // If the file doesn't exist the application gets stuck in a loop.\r\n        if (!File.Exists(path)) {\r\n            Debug.LogError(path + \" not found.\");\r\n            return;\r\n        }\r\n#endif\r\n        Display.material.color = Color.white;\r\n\r\n        wrapper = new LibretroWrapper.Wrapper(Application.streamingAssetsPath + \"/\" + CoreName);\r\n\r\n        wrapper.Init();\r\n        wrapper.LoadGame(path);\r\n    }\r\n}\r\n\r\n```"}}