Explorar o código

Add hrt.prefab.Prefab.ignoreEditorOnly

Leonardo Jeanteur hai 1 ano
pai
achega
fde993034a
Modificáronse 1 ficheiros con 7 adicións e 1 borrados
  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.
 		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.
 		Tells if the prefab will create an instance when used in editor. Also apply to this prefab children.