소스 검색

Fix hxd Res

Tom SPIRA 6 년 전
부모
커밋
e35b5cac63
1개의 변경된 파일7개의 추가작업 그리고 1개의 파일을 삭제
  1. 7 1
      hrt/shgraph/ShaderGraph.hx

+ 7 - 1
hrt/shgraph/ShaderGraph.hx

@@ -49,7 +49,13 @@ class ShaderGraph {
 
 		var json : Dynamic;
 		try {
-			var content = hxd.Res.load(this.filepath).toText();
+			var content : String = null;
+			#if editor
+			content = sys.io.File.getContent(hide.Ide.inst.resourceDir + "/" + this.filepath);
+			#else
+			content = hxd.res.Loader.currentInstance.load(this.filepath).toText();
+			//content = hxd.Res.load(this.filepath).toText();
+			#end
 			if (content.length == 0) return;
 			json = haxe.Json.parse(content);
 		} catch( e : Dynamic ) {