Script API methods must return Ref<T> instead of Reference*
ptrcall assumes methods that return a Reference type do so with Ref<T>. Returning Reference* from a method exposed to the scripting API completely breaks ptrcalls to this method (it can be quite hard to debug!).
This commit is contained in:
parent
270af6fa08
commit
aa9908e4f6
4 changed files with 10 additions and 3 deletions
|
|
@ -119,7 +119,7 @@ public:
|
|||
|
||||
void set_spatial_node(Spatial *p_node);
|
||||
Spatial *get_spatial_node() const { return spatial_node; }
|
||||
EditorSpatialGizmoPlugin *get_plugin() const { return gizmo_plugin; }
|
||||
Ref<EditorSpatialGizmoPlugin> get_plugin() const { return gizmo_plugin; }
|
||||
Vector3 get_handle_pos(int p_idx) const;
|
||||
bool intersect_frustum(const Camera *p_camera, const Vector<Plane> &p_frustum);
|
||||
bool intersect_ray(Camera *p_camera, const Point2 &p_point, Vector3 &r_pos, Vector3 &r_normal, int *r_gizmo_handle = NULL, bool p_sec_first = false);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue