浏览代码

Add hrt.prefab.Prefab.ignoreEditorOnly

Leonardo Jeanteur 1 年之前
父节点
当前提交
fde993034a
共有 1 个文件被更改,包括 7 次插入1 次删除
  1. 7 1
      hrt/prefab/Prefab.hx

+ 7 - 1
hrt/prefab/Prefab.hx

@@ -39,7 +39,13 @@ class Prefab {
 	/**
 		Tells if the prefab will create an instance when used in an other prefab or in game. Also apply to this prefab children.
 	**/
-	@:s public var editorOnly : Bool = false;
+	@:s public var editorOnly(get, default) : Bool = false;
+	function get_editorOnly() {
+		if (ignoreEditorOnly)
+			return false;
+		return editorOnly;
+	}
+	public static var ignoreEditorOnly = false;
 
 	/**
 		Tells if the prefab will create an instance when used in editor. Also apply to this prefab children.