Merge pull request #1639 from Sandy10000/master

Mark return value for CanvasGetPosition nodes
This commit is contained in:
Lubos Lenco 2020-04-09 15:31:13 +02:00 committed by GitHub
commit 3edccefddf
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -12,7 +12,7 @@ class CanvasGetPositionNode extends LogicNode {
}
#if arm_ui
override function get(from: Int) {
override function get(from: Int): Dynamic { // Null<Int>
if (canvas == null) canvas = Scene.active.getTrait(CanvasScript);
if (canvas == null) canvas = Scene.active.camera.getTrait(CanvasScript);
if (canvas == null || !canvas.ready) return null;