Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How can I use the Node3DGizmo class? #82654

Closed
unicornlox opened this issue Oct 2, 2023 · 3 comments · Fixed by #82681
Closed

How can I use the Node3DGizmo class? #82654

unicornlox opened this issue Oct 2, 2023 · 3 comments · Fixed by #82681

Comments

@unicornlox
Copy link

Godot version

mono c# 4.1.1

System information

Deepin os, opengl

Issue description

How can I use the Node3DGizmo class? Where is the source code of this class? I could not use this feature for some reason.

Steps to reproduce

my code:
var gizmo = new Node3DGizmo();
error:
'Node3DGizmo' does not contain a constructor that takes 0 arguments

Minimal reproduction project

using Godot;
using System;

public partial class Gizmo : Node3D
{
	// Called when the node enters the scene tree for the first time.
	public override void _Ready()
	{
		var gizmo = new Node3DGizmo();
		//AddGizmo(gizmo);
	}

	// Called every frame. 'delta' is the elapsed time since the previous frame.
	public override void _Process(double delta)
	{
	}
}
@akien-mga
Copy link
Member

Please note that this platform is for reporting bugs, not questions on how to use Godot or its API. Please refer to other community platforms for user support: https://godotengine.org/community/

Still, some docs were missing for this class so I'm adding them in #82681. What you should look at is EditorNode3DGizmo, which has ample documentation.

@akien-mga akien-mga added this to the 4.2 milestone Oct 2, 2023
akien-mga added a commit to akien-mga/godot that referenced this issue Oct 2, 2023
@unicornlox
Copy link
Author

Actually, what I was trying to explain was that the Node3DGizmo class could not be created, I thought it was a bug. I think it is necessary to use the EditorNode3DGizmo class, but I don't understand why this Node3DGizmo was created, if it cannot be used?

@YuriSizov
Copy link
Contributor

@unicornlox It's an abstract class, we have a few in our API. You are not supposed to use them directly.

In this case, the reason it exists is purely internal, so updating the docs to mention that users shouldn't bother with the class should be sufficient.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants