armory/Sources/armory/logicnode/GetObjectNode.hx
QuantumCoderQC c185882db8 Revert commit that creates an object if not in scene.
Returns object only if present in active scene
2021-05-01 22:19:29 +02:00

21 lines
414 B
Haxe

package armory.logicnode;
import iron.data.SceneFormat;
import iron.object.Object;
class GetObjectNode extends LogicNode {
/** Scene from which to take the object **/
public var property0: Null<String>;
public function new(tree: LogicTree) {
super(tree);
}
override function get(from: Int): Dynamic {
var objectName: String = inputs[0].get();
return iron.Scene.active.getChild(objectName);
}
}