godot-docs icon indicating copy to clipboard operation
godot-docs copied to clipboard

PoolVector3Array is missing from Mono

Open AntonioNoack opened this issue 3 years ago • 7 comments

Your Godot version: v3.4.4.stable.mono.offical[419e713a2]

Issue description: I was looking at extracting triangle/vertex information from meshes, and while looking trough the docs, I found ArrayMesh.GetFaces() which returns a PoolVector3Array (https://docs.godotengine.org/en/stable/classes/class_poolvector3array.html). However, when I wanted to use that class in C#, it doesn't exist. Instead, there Vector3[] is used.

I recommend, that a small section is added to the docs that tells you that. E.g. The class PoolVector3Array does not exist in the C# Mono environment. Vector3 arrays are used instead.

URL to the documentation page (if already existing): https://docs.godotengine.org/en/stable/classes/class_poolvector3array.html

AntonioNoack avatar May 06 '22 06:05 AntonioNoack

Isn't that the case for all Pool*Array types (and Packed*Array in master)?

Calinou avatar May 06 '22 16:05 Calinou

Probably. I only noticed it because of my experiment. I haven't done a lot with Godot yet.

AntonioNoack avatar May 06 '22 16:05 AntonioNoack

I recommend, that a small section is added to the docs that tells you that. E.g. The class PoolVector3Array does not exist in the C# Mono environment. Vector3 arrays are used instead.

I think it's already mentioned: 3.4 docs (source) (it seems unchanged in the newer versions).

Is it not enough? If not, any improvement suggestions?

kleonc avatar May 10 '22 11:05 kleonc

@kleonc well I found awkward to be missing. I think it would be good to add, as long as there is no dedicated C# Docs. I might not be the only developer who wonders about it. Knowing the return type of a function is important, so you know how to further process the data for your needs.

AntonioNoack avatar May 10 '22 18:05 AntonioNoack

I think it would be good to add, as long as there is no dedicated C# Docs.

C# class reference is documented within the assemblies. But yeah, there's no official on-line/in-editor class reference for C# (however here's example of unofficial one).

And to be clear: do you suggest to add a note about C# to the GDScript's class reference? For example something like:

Note: In C# there's no PoolVector3Array class, Vector3[] is used instead.

in here?


Knowing the return type of a function is important, so you know how to further process the data for your needs.

Again, it's documented within the assemblies. You can check the return type within your IDE (at least you should be able to do so):

Code_u5kEP1OIPa Code_HO28jwjnq3 Code_pixotc2m8o rLD9KRneSn Code_75kmeWA4he

kleonc avatar May 10 '22 19:05 kleonc

"in here?" yes.

Good to know there is unofficial C# Docs :)

and yeah, I just used Godot with VSCode (because it feels better than the built-in editor), but didn't setup the project fully, because I wasn't aware you could do that properly. That way I didn't have Godot assemblies, which showed me anything.

Plus when going after the tutorial on https://gist.github.com/paulloz/30ae499c1fc580a2f3ab9ecebe80d9ba to do that, the menus aren't showing up, but that probably should be another bug report 😄. Screenshot (1041)

AntonioNoack avatar May 11 '22 05:05 AntonioNoack

I created a bug report for that :) https://github.com/godotengine/godot/issues/60940

AntonioNoack avatar May 11 '22 07:05 AntonioNoack

This is already documented in the C# API differences to GDScript page.

It may still be worth it to add a mention to this in the Pool*Array classref (somewhat related discussion in https://github.com/godotengine/godot/pull/70852).

raulsntos avatar Jan 11 '23 18:01 raulsntos