|
@@ -1255,6 +1255,30 @@ Vector3 CSGBox3D::get_size() const {
|
|
return size;
|
|
return size;
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+#ifndef DISABLE_DEPRECATED
|
|
|
|
+// Kept for compatibility from 3.x to 4.0.
|
|
|
|
+bool CSGBox3D::_set(const StringName &p_name, const Variant &p_value) {
|
|
|
|
+ if (p_name == "width") {
|
|
|
|
+ size.x = p_value;
|
|
|
|
+ _make_dirty();
|
|
|
|
+ update_gizmos();
|
|
|
|
+ return true;
|
|
|
|
+ } else if (p_name == "height") {
|
|
|
|
+ size.y = p_value;
|
|
|
|
+ _make_dirty();
|
|
|
|
+ update_gizmos();
|
|
|
|
+ return true;
|
|
|
|
+ } else if (p_name == "depth") {
|
|
|
|
+ size.z = p_value;
|
|
|
|
+ _make_dirty();
|
|
|
|
+ update_gizmos();
|
|
|
|
+ return true;
|
|
|
|
+ } else {
|
|
|
|
+ return false;
|
|
|
|
+ }
|
|
|
|
+}
|
|
|
|
+#endif
|
|
|
|
+
|
|
void CSGBox3D::set_material(const Ref<Material> &p_material) {
|
|
void CSGBox3D::set_material(const Ref<Material> &p_material) {
|
|
material = p_material;
|
|
material = p_material;
|
|
_make_dirty();
|
|
_make_dirty();
|