4ian / GDevelop

🎮 Open-source, cross-platform 2D/3D/multiplayer game engine designed for everyone.
https://gdevelop.io
Other
10.83k stars 850 forks source link

Show static functions in the object function list #3094

Closed D8H closed 2 years ago

D8H commented 3 years ago

Description

Context

Actual

Expected

User story

Solution suggested

The editor could look at the object and behavior parameters to add the static function in the object function list.

Alternatives considered

Restrict it to only object parameters that are the 1st visible one?

4ian commented 3 years ago

There are a few special cases that are listed in this file: https://github.com/4ian/GDevelop/blob/master/newIDE/app/src/InstructionOrExpression/EnumerateInstructions.js - would it be enough to apply the same thing for the linked objects condition?

D8H commented 3 years ago

There are a few special cases that are listed in this file: https://github.com/4ian/GDevelop/blob/master/newIDE/app/src/InstructionOrExpression/EnumerateInstructions.js - would it be enough to apply the same thing for the linked objects condition?

Ok, It should work for this. I forgot to explain it in the description, but what about event based functions? Do you think it must be explicitly chosen by the person writing the extension?

4ian commented 3 years ago

Yeah not sure about these. Might be worth adding a flag in the instruction metadata in the future to "consider as object instruction". So we could expose it in extensions directly.