mirror of
https://github.com/Relintai/godot_voxel.git
synced 2024-11-19 02:47:18 +01:00
Fix voxel tiles not editable in editor
This commit is contained in:
parent
47a3fe97d3
commit
20d8cf876b
@ -37,7 +37,7 @@ bool Voxel::_set(const StringName &p_name, const Variant &p_value) {
|
||||
// TODO Eventualy these could be Rect2 for maximum flexibility?
|
||||
if (name.begins_with("cube_tiles/")) {
|
||||
|
||||
String s = name.substr(STRLEN("cube_tiles/"), name.length());
|
||||
String s = name.substr(STRLEN("cube_tiles/") - 1, name.length());
|
||||
Cube::Side side = name_to_side(s);
|
||||
if (side != Cube::SIDE_COUNT) {
|
||||
Vector2 v = p_value;
|
||||
@ -61,7 +61,7 @@ bool Voxel::_get(const StringName &p_name, Variant &r_ret) const {
|
||||
|
||||
if (name.begins_with("cube_tiles/")) {
|
||||
|
||||
String s = name.substr(STRLEN("cube_tiles/"), name.length());
|
||||
String s = name.substr(STRLEN("cube_tiles/") - 1, name.length());
|
||||
Cube::Side side = name_to_side(s);
|
||||
if (side != Cube::SIDE_COUNT) {
|
||||
r_ret = _cube_tiles[side];
|
||||
|
Loading…
Reference in New Issue
Block a user