浏览代码

allow #if editor in dynamic shaders

Nicolas Cannasse 4 年之前
父节点
当前提交
e108d105d1
共有 1 个文件被更改,包括 1 次插入0 次删除
  1. 1 0
      hide/tools/ShaderLoader.hx

+ 1 - 0
hide/tools/ShaderLoader.hx

@@ -82,6 +82,7 @@ class ShaderLoader {
 
 	function loadShaderString( file : String, content : String, name : String ) {
 		var parser = new hscript.Parser();
+		parser.preprocesorValues.set("editor", true);
 		var decls = parser.parseModule(content, file);
 		var cl = null, cf = null;
 		for( d in decls ) {