I creating game about tank battle. I have already wrote script which be constructor for all tanks Node. Part of this script export tank's Texture and then make Node. this look like this:
export (Texture) var chassis_texture;
func _init():
var chassis_collision = CollisionShape2D.new();
var chassis_shape = RectangleShape2D.new();
var chassis_sprite = Sprite.new();
chassis_sprite.texture = chassis_texture;
chassis_shape.extents = chassis_texture.get_size()
chassis_collision.shape = chassis_shape;
add_child(chassis_sprite);
So even if I specify the texture in the editor, chassis_texture equals Null How fix this? thanks in advance and sorry for my English.