Open
Description
Project Type
2D, 3D
Feature Description
It would be nice if phantom camera included a C# wrapper to ease use with C#.
Use Cases
Currently to call phantom camera methods in C# you have to do something like this:
var cameraActive = (bool)GetNode("PhantomCamera2D").Call("is_active");
This is prone to causing runtime issues, for example if phantom camera changed the is_active
method to active
this would still compile but cause runtime issues.
(Optional) Proposed Solution
Phantom Camera could ship a C# wrapper that would prevent the above from happening.
One such example:
https://github.com/Portponky/better-terrain/blob/main/addons/better-terrain/BetterTerrain.cs
The above example could then be changed to:
var cameraActive = GetNode<PhantomCamera>("PhantomCamera2D").is_active();
Upon such an update where is_active
is changed to active
this would then cause a compile error, this also integrates better with IDE.
Metadata
Metadata
Assignees
Projects
Status
💬 Requires More Thought