| 2762 | } |
| 2763 | |
| 2764 | Error CSharpScript::load_source_code(const String &p_path) { |
| 2765 | Error ferr = read_all_file_utf8(p_path, source); |
| 2766 | |
| 2767 | ERR_FAIL_COND_V_MSG(ferr != OK, ferr, |
| 2768 | ferr == ERR_INVALID_DATA |
| 2769 | ? "Script '" + p_path + "' contains invalid unicode (UTF-8), so it was not loaded." |
| 2770 | " Please ensure that scripts are saved in valid UTF-8 unicode." |
| 2771 | : "Failed to read file: '" + p_path + "'."); |
| 2772 | |
| 2773 | #ifdef TOOLS_ENABLED |
| 2774 | source_changed_cache = true; |
| 2775 | #endif |
| 2776 | |
| 2777 | return OK; |
| 2778 | } |
| 2779 | |
| 2780 | void CSharpScript::_clear() { |
| 2781 | type_info = TypeInfo(); |
no test coverage detected